# Extract the zip
# You may need to install additional packages in order to build GDB. For example,<pre>sudo apt-get build-dep gdb</pre>
# Run configure inside the source directory<pre># ARM: ./configure --target=arm-elflinux-android --with-python=yes --prefix=/nonexistent \ --with-gdb-datadir=/nonexistent/utils --with-system-gdbinit=/nonexistent/utils/gdbinit # x86: ./configure --target=i686-pc-linux-android --with-python=yes --prefix=/nonexistent \ --with-gdb-datadir=/nonexistent/utils --with-system-gdbinit=/nonexistent/utils/gdbinit</pre>
# Run make <pre>make -j8</pre>
# The compiled binary will be at gdb/gdb
# Use the source directory from above
# Make sure you have a copy of the Android NDK
# Run configure inside the ''gdb/gdbserver directory'' (following is for NDK r8d)<pre>export NDK=/PATH/TO/NDK # ARM: export PATH=$PATH:$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin ./configure --host=arm-linux-androideabi --with-sysroot=$NDK/platforms/android-9/arch-arm # x86: export PATH=$PATH:$NDK/toolchains/x86-4.6/prebuilt/linux-x86/bin ./configure --host=i686-linux-android --with-sysroot=$NDK/platforms/android-9/arch-x86</pre>
# Run make <pre>make -j8</pre>
# The compiled binary will be at gdbserver
# Extract the zip
# You may need to install additional packages in order to build GDB. For example,<pre>port install bison flex ncurses texinfo python27</pre>
# Run configure inside the source directory<pre># ARM: ./configure --target=arm-elflinux-android --with-python=yes --prefix=/nonexistent \ --with-gdb-datadir=/nonexistent/utils --with-system-gdbinit=/nonexistent/utils/gdbinit # x86: ./configure --target=i686-pc-linux-android --with-python=yes --prefix=/nonexistent \ --with-gdb-datadir=/nonexistent/utils --with-system-gdbinit=/nonexistent/utils/gdbinit</pre>
# Run make <pre>make -j8</pre>
# The compiled binary will be at gdb/gdb
# Use the source directory from above
# Make sure you have a copy of the Android NDK
# Run configure inside the ''gdb/gdbserver directory'' (following is for NDK r8d)<pre>export NDK=/PATH/TO/NDK # ARM: export PATH=$PATH:$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin ./configure --host=arm-linux-androideabi --with-sysroot=$NDK/platforms/android-9/arch-arm # x86: export PATH=$PATH:$NDK/toolchains/x86-4.6/prebuilt/darwin-x86/bin ./configure --host=i686-linux-android --with-sysroot=$NDK/platforms/android-9/arch-x86</pre>
# Run make <pre>make -j8</pre>
# The compiled binary will be at gdb/gdbserver/gdbserver