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
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: palves at redhat dot com (Pedro Alves)
- Cc: qiyaoltc at gmail dot com (Yao Qi), gdb-patches at sourceware dot org
- Date: Fri, 8 Dec 2017 16:13:22 +0100 (CET)
- Subject: Re: [PATCH 1/3] Clear non-significant bits of address on memory access
- Authentication-results: sourceware.org; auth=none
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