This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building gdb for Android using Android-ndk


On 01/23/2013 09:29 AM, Robert wrote:
> I am trying to build gdb for Android using the "standalone-toolchain"
> created by the Android-NDK (make-standalone-toolchain.sh).
> 
> My configure call is as follows:
> 
> ./configure  --target=arm-linux-androideabi  --host=arm-linux-androideabi
> 
> I tried different gdb versions - unfortunately earlier or later I ran
> into an error I could not solve.

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?
If the latter, drop the --host part when building GDB, as you
want GDB that runs on x86_64.  You'll then need to build GDBserver
as a separate step, for an Android host, so you'll use the --host
setting then.  See:
http://www.sourceware.org/autobook/autobook/autobook_259.html

> 
> For example gdb 7.5 has only some minor problems where libraries like
> libsim.a, libbfd.a and other required additional processing using
> ranlib. I fixed this by manually executing ranlib on the specified
> libraries and then restarted the make process.
> 
> But in the end the build process stops with the following error:
> 
> make[5]: Leaving directory `/tmp/gdb-7.5/gdb/gdbserver'
> gcc -c -g -O2    -I. -I. -I./../common -I./../regformats

So is "gcc" itself a native compiler running on Android?  If not,
then you should be seeing arm-linux-androideabi-gcc or some such here.

> -I./../../include -I./../gnulib/import -Ibuild-gnulib-gdbserver/import
> -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
> -Wno-char-subscripts -Werror linux-arm-low.c
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]