Mobile/Fennec/Android/GDB: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 40: | Line 40: | ||
=== Building gdbserver === | === Building gdbserver === | ||
==== Linux ==== | |||
Make sure NDK toolchain is in PATH: | Make sure NDK toolchain is in PATH: | ||
export PATH=$PATH:/PATH/TO/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin | export PATH=$PATH:/PATH/TO/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin | ||
Run configure and make for gdbserver: | |||
mkdir android-gdbserver-objdir | |||
cd android-gdbserver-objdir | |||
../android-gdb/gdb/gdbserver/configure --host=arm-linux-androideabi \ | |||
--with-sysroot=/PATH/TO/NDK/platforms/android-9/arch-arm | |||
make -j4 | |||
The gdbserver binary will be located at ''android-gdbserver-objdir/gdbserver'' | |||
==== Mac OS X ==== | |||
Make sure NDK toolchain is in PATH: | |||
export PATH=$PATH:/PATH/TO/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin | |||
Run configure and make for gdbserver: | Run configure and make for gdbserver: |
Revision as of 17:10, 3 September 2011
Building custom gdb
Building gdb
Linux
Get required packages:
sudo apt-get install bison flex libncurses5-dev texinfo python2.7-dev
Get source:
git clone git://github.com/darchons/android-gdb.git
Run configure and make:
mkdir android-gdb-objdir cd android-gdb-objdir export prefix=/nonexistent ../android-gdb/configure --target=arm-elf-linux --with-python=yes --prefix=$prefix \ --with-gdb-datadir=$prefix/utils --with-system-gdbinit=$prefix/utils/gdbinit make -j4
The gdb binary will be located at android-gdb-objdir/gdb/gdb
Mac OS X
Get required packages:
port install bison flex ncurses texinfo python27
Get source:
git clone git://github.com/darchons/android-gdb.git
Run configure and make:
mkdir android-gdb-objdir cd android-gdb-objdir export prefix=/nonexistent ../android-gdb/configure --target=arm-elf-linux --with-python=yes --prefix=$prefix \ --with-gdb-datadir=$prefix/utils --with-system-gdbinit=$prefix/utils/gdbinit make -j4
The gdb binary will be located at android-gdb-objdir/gdb/gdb
Building gdbserver
Linux
Make sure NDK toolchain is in PATH:
export PATH=$PATH:/PATH/TO/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
Run configure and make for gdbserver:
mkdir android-gdbserver-objdir cd android-gdbserver-objdir ../android-gdb/gdb/gdbserver/configure --host=arm-linux-androideabi \ --with-sysroot=/PATH/TO/NDK/platforms/android-9/arch-arm make -j4
The gdbserver binary will be located at android-gdbserver-objdir/gdbserver
Mac OS X
Make sure NDK toolchain is in PATH:
export PATH=$PATH:/PATH/TO/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
Run configure and make for gdbserver:
mkdir android-gdbserver-objdir cd android-gdbserver-objdir ../android-gdb/gdb/gdbserver/configure --host=arm-linux-androideabi \ --with-sysroot=/PATH/TO/NDK/platforms/android-9/arch-arm make -j4
The gdbserver binary will be located at android-gdbserver-objdir/gdbserver