GDBDebugging » History » Version 11
Denis 'GNUtoo' Carikli, 08/20/2012 02:05 PM
| 1 | 1 | Denis 'GNUtoo' Carikli | h1. GDBDebugging |
|---|---|---|---|
| 2 | 5 | Denis 'GNUtoo' Carikli | |
| 3 | 3 | Denis 'GNUtoo' Carikli | Here are some notes on debugging with gdb while rebasing replicant changes on top of the last cyanogenmod. |
| 4 | 1 | Denis 'GNUtoo' Carikli | |
| 5 | <pre> |
||
| 6 | 11 | Denis 'GNUtoo' Carikli | ctrl_interface=DIR=/data/ctrl |
| 7 | network={ |
||
| 8 | #your settings go here |
||
| 9 | } |
||
| 10 | </pre> |
||
| 11 | |||
| 12 | <pre> |
||
| 13 | 2 | Denis 'GNUtoo' Carikli | adb shell |
| 14 | 10 | Denis 'GNUtoo' Carikli | wpa_supplicant -iwlan0 -Dnl80211 -c/sdcard/wifi/wpa.conf |
| 15 | </pre> |
||
| 16 | |||
| 17 | <pre> |
||
| 18 | adb shell |
||
| 19 | dhcpcd wlan0 |
||
| 20 | </pre> |
||
| 21 | |||
| 22 | <pre> |
||
| 23 | adb shell |
||
| 24 | 2 | Denis 'GNUtoo' Carikli | while true;do gdbserver 192.168.20.132:8022 --attach $(pidof system_server);done |
| 25 | 3 | Denis 'GNUtoo' Carikli | </pre> |
| 26 | |||
| 27 | <pre> |
||
| 28 | . build/envsetup.sh |
||
| 29 | lunch cm_maguro-eng |
||
| 30 | |||
| 31 | $ arm-linux-androideabi-gdb |
||
| 32 | GNU gdb (GDB) 7.1-android-gg2 |
||
| 33 | Copyright (C) 2010 Free Software Foundation, Inc. |
||
| 34 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> |
||
| 35 | This is free software: you are free to change and redistribute it. |
||
| 36 | There is NO WARRANTY, to the extent permitted by law. Type "show copying" |
||
| 37 | and "show warranty" for details. |
||
| 38 | This GDB was configured as "--host=i686-linux-gnu --target=arm-elf-linux". |
||
| 39 | For bug reporting instructions, please see: |
||
| 40 | <http://www.gnu.org/software/gdb/bugs/>. |
||
| 41 | 1 | Denis 'GNUtoo' Carikli | (gdb) set sysroot ./out/target/product/maguro/symbols/ |
| 42 | 9 | Denis 'GNUtoo' Carikli | (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/ |
| 43 | 7 | Denis 'GNUtoo' Carikli | (gdb) file ./out/target/product/maguro/symbols/system/bin/system_server |
| 44 | 6 | Denis 'GNUtoo' Carikli | (gdb) target remote 192.168.20.132:8022 |
| 45 | 3 | Denis 'GNUtoo' Carikli | |
| 46 | 1 | Denis 'GNUtoo' Carikli | </pre> |