Re: [PATCH 1/3] Clear non-significant bits of address on memory access

Ulrich Weigand
2017-12-08T15:13:33Z

Pedro Alves wrote:
> 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.

This seems to duplicate the functionality of gdbarch_addr_bits_remove
to some extent ... Could those be merged back again?

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com