Project

General

Profile

GDBDebugging » History » Version 8

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