gdbarch: fix default value of significant_addr_bit
Commit Message
MIPS targets use signed PC values. Since commit a0de8c21
single-stepping on these targets didn't work due to the addition of
`address_significant` in adjust_breakpoint_address. This commit
sets significant_addr_bit in gdbarch to number of bits in bfd_vma,
as suggested by Maciej W. Rozycki.
Signed-off-by: Vlad Ivanov <vlad.ivanov@lab-systems.ru>
---
gdb/gdbarch.c | 2 +-
gdb/gdbarch.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -622,7 +622,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* 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);
+ gdbarch->significant_addr_bit = TARGET_CHAR_BIT * sizeof (bfd_vma);
/* 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 */
@@ -625,7 +625,7 @@ m;CORE_ADDR;addr_bits_remove;CORE_ADDR addr;addr;;core_addr_identity;;0
# For example, on AArch64, the top bits of an address known as the "tag"
# are ignored by the kernel, the hardware, etc. and can be regarded as
# additional data associated with the address.
-v;int;significant_addr_bit;;;;;gdbarch_addr_bit (gdbarch);
+v;int;significant_addr_bit;;;;;TARGET_CHAR_BIT * sizeof (bfd_vma)
# FIXME/cagney/2001-01-18: This should be split in two. A target method that
# indicates if the target needs software single step. An ISA method to