Project

General

Profile

GDBDebugging » History » Version 10

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