This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] [AArch64] Remove tag from address for watchpoint
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 9 Nov 2017 21:20:09 +0000
- Subject: Re: [PATCH 3/3] [AArch64] Remove tag from address for watchpoint
- Authentication-results: sourceware.org; auth=none
- References: <1509006590-9401-1-git-send-email-yao.qi@linaro.org> <1509006590-9401-4-git-send-email-yao.qi@linaro.org> <2fe62186-f1db-cf5c-f0e2-c18e35089dd9@redhat.com> <f3957df2b1c653a50390eb844437030d@polymtl.ca>
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 (齐尧)