This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedromfc at linux dot ibm dot com (Pedro Franco de Carvalho)
- Cc: Alan dot Hayward at arm dot com (Alan Hayward), simark at simark dot ca (Simon Marchi), gdb-patches at sourceware dot org (gdb-patches\@sourceware.org), nd at arm dot com (nd)
- Date: Thu, 4 Apr 2019 15:49:15 +0200 (CEST)
- Subject: Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap
Pedro Franco de Carvalho wrote:
> I noticed that is_elfv2_inferior previously relied on ppc_get_auxv
> returning whether or not the AT_PHDR key is found, besides the vector
> value. The actual value was returned in the pointer argument. The new
> linux_get_auxv returns 0 for the value if the key isn't found. I don't
> know if the value for AT_PHDR can be an actual 0.
Seems unlikely, but I guess theoretically possible on some platforms.
But in general, there is a difference between an AT_ aux vector entry
not present, or present with value zero, so the interface should be
able to represent that.
> Should linux_get_auxv be changed to return this and also take a
> CORE_ADDR pointer? It should also be made visible in the header.
Sounds reasonable to me.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com