This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Building gdb for Android using Android-ndk
On 01/23/2013 02:28 PM, Robert wrote:
>> You're building a gdb that runs on Android? Or you want a GDBserver
>> that runs on Android, but debug from your x86_64 Ubuntu host?
>
> I am trying to build a standalone version of gdb that runs directly on
> the device.
Ack. I don't ever recall seeing patches to port the various
subprojects in gdb (bfd, libiberty, gdb itself, etc.), except
gdbserver, which always runs on the target, to
Android/bionic though.
You're likely to hit problems that would need porting work.
It is coincidence that the error just occurs in the
> gdbserver subproject. I am not aware of the internal dependencies of gdb
> - may be one can simply disable the gdbserver subproject?
gdbserver should build for Android. So the cross scenario we know works.
>
> arm-linux-androideabi-gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I./../include
> -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic
> ./getpagesize.c -o getpagesize.o
> ./getpagesize.c:64:1: error: redefinition of 'getpagesize'
> /opt/android-standalone-toolchain/bin/../sysroot/usr/include/unistd.h:162:23:
> note: previous definition of 'getpagesize' was here
>
> I checked the log and noticed that the system checks that executed the
> first time when I execute "make" contains several lines with
> "checking for getpagesize... no".
>
> I uploaded the complete make log here: http://pastebin.com/v3etd3Sa
Right, so the build is failing while building libiberty (primarily a
host abstraction library). I'm afraid it looks like someone needs to
step up and do some porting work. Looks like you found an itch to
scratch. ;-)
--
Pedro Alves