[PATCH 2/2] gdbserver: Add linux_get_hwcap

Pedro Franco de Carvalho pedromfc@linux.ibm.com
Wed Apr 3 19:13:00 GMT 2019


Hi,

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.

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.

Thanks!

--
Pedro Franco de Carvalho

Ulrich Weigand <uweigand@de.ibm.com> writes:

> Alan Hayward wrote:
>
>> I’ll send out a new OBV patch with the AT_HWCAP2 added in the same way.
>
> Thanks for fixing this issue.  Now the build gets one file further and
> then fails again :-)
>
> gdb/gdbserver/linux-ppc-low.c: In function 'int is_elfv2_inferior()':
> gdb/gdbserver/linux-ppc-low.c:1113:8: error: 'ppc_get_auxv' was not declared in this scope
>    if (!ppc_get_auxv (AT_PHDR, &phdr))
>
> This is because of:
>
>             * linux-ppc-low.c (ppc_get_auxv): Remove function.
>
> You removed two callers of this function, but one more remains ...
>
> Bye,
> Ulrich
>
> -- 
>   Dr. Ulrich Weigand
>   GNU/Linux compilers and toolchain
>   Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list