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