GDB debugging

The instructions below need to be tested if they still work with a current Replicant release and these notes for Replicant 6.0 should be added, but with more details.

Here are some notes on debugging with GDB:

adb shell
gdbserver --attach $(pidof mediaserver )
adb forward tcp:8022 tcp:8022
. build/
lunch replicant_maguro-eng

$ arm-linux-androideabi-gdb
GNU gdb (GDB) 7.1-android-gg2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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 "--host=i686-linux-gnu --target=arm-elf-linux".
For bug reporting instructions, please see:
(gdb) set sysroot ./out/target/product/maguro/symbols/
(gdb) set solib-search-path ./out/target/product/maguro/symbols/system/lib/:./out/target/product/maguro/symbols/system/lib/hw/:./out/target/product/maguro/symbols/system/vendor/lib/hw/
(gdb) file ./out/target/product/maguro/symbols/system/bin/mediaserver
(gdb) target remote

Updated by Wolfgang Wiedmeyer about 7 years ago · 24 revisions

Also available in: PDF HTML TXT