summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorOmair Javaid <omair.javaid@linaro.org>2018-05-26 05:58:51 +0500
committerOmair Javaid <omair.javaid@linaro.org>2018-05-31 07:31:21 +0500
commit5969f0dba74e17c694faf333b120f1e0b95783ed (patch)
tree5b1969d7d5c41099b6e0ec201fbad028b264b4f3 /gdb/gdbarch.c
parent0034eed03a7428c4902244a33a286763bca65016 (diff)
downloadbinutils-gdb-5969f0dba74e17c694faf333b120f1e0b95783ed.tar.gz
Unset gdbarch significant_addr_bit by default
This patch fixes a bug introduced by fix to AArch64 pointer tagging. In our fix for tagged pointer support our agreed approach was to sign extend user-space address after clearing tag bits. This is not same for all architectures and this patch allows sign extension for addresses on targets which specifically set significant_addr_bit. More information about patch that caused the issues and discussion around tagged pointer support can be found in links below: https://sourceware.org/ml/gdb-patches/2018-05/msg00000.html https://sourceware.org/ml/gdb-patches/2017-12/msg00159.html gdb/ChangeLog: 2018-05-31 Omair Javaid <omair.javaid@linaro.org> PR gdb/23210 * gdbarch.sh (significant_addr_bit): Default to zero when not set by target architecture. * gdbarch.c: Re-generated. * utils.c (address_significant): Update.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index c430ebe52a4..558cc555b4b 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -615,8 +615,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
/* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
/* Skip verify of addr_bits_remove, invalid_p == 0 */
- if (gdbarch->significant_addr_bit == 0)
- gdbarch->significant_addr_bit = gdbarch_addr_bit (gdbarch);
+ /* Skip verify of significant_addr_bit, invalid_p == 0 */
/* Skip verify of software_single_step, has predicate. */
/* Skip verify of single_step_through_delay, has predicate. */
/* Skip verify of print_insn, invalid_p == 0 */
@@ -3209,6 +3208,7 @@ int
gdbarch_significant_addr_bit (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
+ /* Skip verify of significant_addr_bit, invalid_p == 0 */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_significant_addr_bit called\n");
return gdbarch->significant_addr_bit;