This Magisk module contains gdb 17.1 and the GNU BinUtils 2.45.50 for arm64 CPUs

ASUS_I006D:/ $ gdb -q --version
GNU gdb (GDB) 17.1.90.20260320-git
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/ $ 


ASUS_I006D:/ $  echo "show configuration"  | gdb
warning: Found custom handler for signal 4 (Illegal instruction) preinstalled.
warning: Found custom handler for signal 5 (Trap) preinstalled.
warning: Found custom handler for signal 6 (Aborted) preinstalled.
warning: Found custom handler for signal 7 (Bus error) preinstalled.
warning: Found custom handler for signal 8 (Floating point exception) preinstalled.
warning: Found custom handler for signal 11 (Segmentation fault) preinstalled.
warning: Found custom handler for signal 16 (Stack fault) preinstalled.
warning: Found custom handler for signal 31 (Unknown signal 31) preinstalled.
warning: Found custom handler for signal 35 (Unknown signal 35) preinstalled.
warning: Found custom handler for signal 36 (Unknown signal 36) preinstalled.
warning: Found custom handler for signal 39 (Unknown signal 39) preinstalled.
Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)
won't be propagated to spawned programs.
GNU gdb (GDB) 17.1.90.20260320-git
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-android".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) This GDB was configured as follows:
   configure --host=aarch64-linux-android --target=aarch64-linux-android
	     --with-auto-load-dir=$debugdir:$datadir/auto-load
	     --with-auto-load-safe-path=$debugdir:$datadir/auto-load
	     --with-expat
	     --with-gdb-datadir=/system/usr/share/gdb (relocatable)
	     --with-jit-reader-dir=/system/usr/lib/gdb (relocatable)
	     --without-libunwind-ia64
	     --with-lzma
	     --without-babeltrace
	     --without-intel-pt
	     --with-xxhash
	     --without-python
	     --without-python-libdir
	     --without-debuginfod
	     --with-curses
	     --without-guile
	     --without-amd-dbgapi
	     --disable-source-highlight
	     --enable-threading
	     --enable-tui
	     --without-system-readline
	     --with-separate-debug-dir=/system/usr/lib/debug (relocatable)

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

GNU Readline library version: 8.2	(internal)
(gdb) ASUS_I006D:/ $ 



The binaries from the GNU BinUtils in this Magisk Module are:

addr2line  ar  as  c++filt  elfedit  gcore  gprof  gstack  ld  ld.bfd  nm  objcopy  objdump  ranlib  readelf  run  size  strings  strip




Details
-------

All binaries are dynamically linked for the Android standard libraries only; examples:

ASUS_I006D:/ $ ldd /system/usr/bin/gdb
	linux-vdso.so.1 => [vdso] (0x7329c68000)
	libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7326cc3000)
	libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7326e28000)
	libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7326d00000)
ASUS_I006D:/ $ 


ASUS_I006D:/ $ ldd /system/bin/as
	linux-vdso.so.1 => [vdso] (0x763a2c4000)
	libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7639083000)
	libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7636100000)
ASUS_I006D:/ $ 


The executables are installed in /system/usr/bin. There is a symbolic link in /system/bin for each binary.


The Module also contains statically linked binaries for gdb, gdbserver and run:

ASUS_I006D:/ $ file /system/usr/bin/gdb_static
/system/usr/bin/gdb_static: ELF executable, 64-bit LSB arm64, static, for Android 28, built by NDK r27c (12479018), stripped
ASUS_I006D:/ $ 

ASUS_I006D:/ $ file /system/usr/bin/gdbserver_static
/system/usr/bin/gdbserver_static: ELF executable, 64-bit LSB arm64, static, for Android 28, built by NDK r27c (12479018), stripped
ASUS_I006D:/ $ 

ASUS_I006D:/ $ file /system/usr/bin/run_static                                                                                                                   
/system/usr/bin/run_static: ELF executable, 64-bit LSB arm64, static, for Android 28, built by NDK r27c (12479018), stripped
ASUS_I006D:/ $ 


The statically linked binaries can be used if the phone is booted into a recovery.


The source code for the files in this Magisk Module is available in this GitHub repository:

https://sourceware.org/git/binutils-gdb.git


All patches from Termux that are applicable are applied. An additional patch for the file gdbsupport/eintr.h is necessary to cross-compile the gdb for Android using the Android NDK.

The patch is in the directory ./source in this Magisk Module:

gdbsupport_eintr.patch 

The configure command used to prepare the source is also in the directory ./source in this Magisk Module:

myconfigure_system


History

20.03.2026 17.1-v1.0.0 /bs
  initial release


