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), anton at linux dot ibm dot com
- Date: Fri, 5 Apr 2019 18:39:45 +0200 (CEST)
- Subject: Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap
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