This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix gdbserver build failure on arm-android.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 15 May 2015 11:56:59 +0100
- Subject: Re: [RFA] Fix gdbserver build failure on arm-android.
- Authentication-results: sourceware.org; auth=none
- References: <1431100919-8245-1-git-send-email-brobecker at adacore dot com> <555479CC dot 9030808 at redhat dot com> <20150514141734 dot GJ4767 at adacore dot com>
On 05/14/2015 03:17 PM, Joel Brobecker wrote:
>> BTW, do you also trip on this one? :
>>
>> https://sourceware.org/ml/gdb/2015-04/msg00025.html
>
> We don't, at the moment. But we're planning on upgrading to a newer
> version in the next few weeks, so we might eventually hit that issue
> too. We don't know yet which version we'll target, so I can't say
> much more at the moment.
OK. Seems the clash is with the group_from_gid / user_from_uid
BSD functions that do a similar thing from what our
versions do. E.g.,:
http://nixdoc.net/man-pages/openbsd/man3/group_from_gid.3.html
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/group_from_gid.3.html
"functions first appeared in 4.4BSD".
Though BSD's return a pointer to a statically allocated
buffer, while gdb's take a buffer pointer as argument.
As glibc doesn't support those BSD functions, we don't trip
on that on GNU/Linux.
I think we should just rename our symbols. E.g.,
group_from_gid -> gdb_group_from_gid
user_from_uid -> gdb_user_from_uid
Thanks,
Pedro Alves