This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] [AArch64] Remove tag from address for watchpoint


On 17-11-09 16:08:40, Simon Marchi wrote:
> 
> There's gdbarch_addr_bits_remove already as well, I don't know if that has
> the same goal.
> 

Nowadays, it only used for code,

# On some machines there are bits in addresses which are not really
# part of the address, but are used by the kernel, the hardware, etc.
# for special purposes.  gdbarch_addr_bits_remove takes out any such bits so
# we get a "real" address such as one would find in a symbol table.
# This is used only for addresses of instructions, and even then I'm
# not sure it's used in all contexts.  It exists to deal with there
# being a few stray bits in the PC which would mislead us, not as some
# sort of generic thing to handle alignment or segmentation (it's
# possible it should be in TARGET_READ_PC instead).
m:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0

arm and mips reuses the LSB of PC to indicate the execution state change,
arm <-> thumb.  gdbarch_addr_bits_remove for arm and mips clears the LSB
of PC.  However, this gdbarch method can't be used for data address.
armv8 tagged pointer/address can be used for both code and data address.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]