[PATCH 2/2] gdbserver: Add linux_get_hwcap
Ulrich Weigand
uweigand@de.ibm.com
Fri Apr 5 16:39:00 GMT 2019
Pedro Franco de Carvalho wrote:
> Note that there is a difference in the interface between linux_get_auxv
> and linux_get_hwcap(2), the latter still return both the status and the
> entry value, but I didn't want to change all their users.
Actually, I think this is fine -- for hwcap, 0 is a natural default
value to use if the entry is not present.
> Also, contrary to the gdb client version (target_auxv_search
> gdb/auxv.c), this one doesn't differentiate between an error and the
> entry not being found.
That also seems reasonable. If anybody requires more specific error
handling, that can always be added later.
> gdb/gdbserver/ChangeLog:
> 2019-04-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
> value in argument pointer, return 1 if the entry is found and 0
> otherwise. Move comment.
> (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
> * linux-low.h (linux_get_auxv): Declare.
> * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
This is OK.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list