This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Clear non-significant bits of address on memory access
On 12/08/2017 10:04 AM, Yao Qi wrote:
> --- a/gdb/aarch64-linux-tdep.c
> +++ b/gdb/aarch64-linux-tdep.c
> @@ -1217,6 +1217,8 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
> set_xml_syscall_file_name (gdbarch, "syscalls/aarch64-linux.xml");
> set_gdbarch_get_syscall_number (gdbarch, aarch64_linux_get_syscall_number);
>
> + set_gdbarch_significant_addr_bit (gdbarch, 56);
> +
I think adding the comment about "tag" here would be nice.
The top bits of an address are known as the "tag" and are
ignored by the kernel, the hardware, etc. and can be regarded
as additional data associated with the address. */
set_gdbarch_significant_addr_bit (gdbarch, 56);
BTW, since this is ignored by the hardware, should it be done
in aarch64-tdep.c instead of just for Linux?
Looks good to me otherwise.
Thanks,
Pedro Alves