diff options
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index d2b0e5a..f6c7ce8 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -154,8 +154,8 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc / addr_bit will be set from it. If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably - also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer - as well. + also need to set gdbarch_dwarf2_addr_size, gdbarch_pointer_to_address and + gdbarch_address_to_pointer as well. ptr_bit is the size of a pointer on the target */ @@ -167,6 +167,23 @@ extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); extern int gdbarch_addr_bit (struct gdbarch *gdbarch); extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit); +/* dwarf2_addr_size is the target address size as used in the Dwarf debug + info. For .debug_frame FDEs, this is supposed to be the target address + size from the associated CU header, and which is equivalent to the + DWARF2_ADDR_SIZE as defined by the target specific GCC back-end. + Unfortunately there is no good way to determine this value. Therefore + dwarf2_addr_size simply defaults to the target pointer size. + + dwarf2_addr_size is not used for .eh_frame FDEs, which are generally + defined using the target's pointer size so far. + + Note that dwarf2_addr_size only needs to be redefined by a target if the + GCC back-end defines a DWARF2_ADDR_SIZE other than the target pointer size, + and if Dwarf versions < 4 need to be supported. */ + +extern int gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch); +extern void set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch, int dwarf2_addr_size); + /* One if `char' acts like `signed char', zero if `unsigned char'. */ extern int gdbarch_char_signed (struct gdbarch *gdbarch); |