summaryrefslogtreecommitdiff
authorsandman <sandman>2002-11-17 22:32:35 (UTC)
committer sandman <sandman>2002-11-17 22:32:35 (UTC)
commitee9696cbb7a39e0f13739ae86cd925b0f675a43c (patch) (unidiff)
treed7ce00eb2be8632c73abc4e1a83aa51823b059a0
parent2f87d2f9155285d853b66bb08e43b275f6284226 (diff)
downloadopie-ee9696cbb7a39e0f13739ae86cd925b0f675a43c.zip
opie-ee9696cbb7a39e0f13739ae86cd925b0f675a43c.tar.gz
opie-ee9696cbb7a39e0f13739ae86cd925b0f675a43c.tar.bz2
ARM Cross-Debgging tools and a short HOWTO
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--development/cross-debug/README.cross-debug82
-rwxr-xr-xdevelopment/cross-debug/arm-linux-gdbbin0 -> 1676116 bytes
-rw-r--r--development/cross-debug/gdbserver_0.0-20020729_arm.ipkbin0 -> 17876 bytes
-rw-r--r--development/cross-debug/sample.arm-gdbinit19
4 files changed, 101 insertions, 0 deletions
diff --git a/development/cross-debug/README.cross-debug b/development/cross-debug/README.cross-debug
new file mode 100644
index 0000000..c44b298
--- a/dev/null
+++ b/development/cross-debug/README.cross-debug
@@ -0,0 +1,82 @@
1
2This is a quick'n'dirty HowTo for cross-debugging on your iPAQ/Zaurus:
3
4Requirements:
5-------------
6
71) You need the same binary of the program being debugged on the handheld
8 and on the desktop machine.
9
102) The binary for the handheld can be stripped (!!)
11
123) The binary for the desktop must have been compiled with -g
13
143) The same applies to shared libraries (but this is only needed if you want
15 to step into libraries or if you want the backtrace to show the right
16 function names for libraries)
17
18
19Setup:
20------
21
221) install the gdbserver.ipk on the handheld.
23
242) put the arm-linux-gdb binary somewhere in your $PATH (I would suggest
25 /opt/Embedix/tools/arm-linux/bin)
26
273) copy the sample.arm-gdbinit to your $HOME directory and rename it to
28 .arm-gdbinit
29
304) edit ~/.arm-gdbinit:
31 "solib-search-path" is the path, where gdb searches for shared libraries
32 "rtX" are some aliases to speed up debugging -- you can rename them, or
33 remove them (see below for the "target ... " syntax)
34
35
36Sample session: debugging the launcher
37--------------------------------------
38
391) Login on the handheld, kill Opie and execute:
40
41 # gdbserver foo:2345 /opt/QtPalmtop/bin/qpe
42
43 This starts the program qpe in debug mode, and the gdbserver stub now
44 listens on port 2345 for an incoming connection from the real gdb.
45 (foo should be name of the desktop machine, but it is ignored)
46
472) On the desktop, change to the $OPIEDIR containing the arm binaries
48
49 # cd $OPIEDIR
50 # cd core/launcher
51
52 # arm-linux-gdb ../../bin/qpe
53 or
54 # ddd --debugger arm-linux-gdb ../../bin/qpe
55
563) You should get an "(arm-gdb)" prompt. Now do
57
58 (arm-gdb) target remote zaurus:2345
59
60 You have to change zaurus to the hostname or ip-address of your handheld.
61 This should produce:
62
63 Remote debugging using zaurus:2345
64 0x40002a80 in ?? ()
65
66 (arm-gdb) break main
67 (arm-gdb) cont
68
69 And gdb should stop in 'main'. If gdb complains about unknown symbol
70 'main', you forgot to compile the application in debug mode.
71
72 This is where the rtFOO macros come in handy: just type rtX and you are
73 connected to machine BAR.
74
754) You can debug/step your application, as you would with a native gdb from
76 here on.
77
78 Please note that single stepping in a cross-debugger can be VERY SLOW
79 sometimes !!
80
81
82Robert 'sandman' Griebl, 17.11.2002
diff --git a/development/cross-debug/arm-linux-gdb b/development/cross-debug/arm-linux-gdb
new file mode 100755
index 0000000..17ff0e1
--- a/dev/null
+++ b/development/cross-debug/arm-linux-gdb
Binary files differ
diff --git a/development/cross-debug/gdbserver_0.0-20020729_arm.ipk b/development/cross-debug/gdbserver_0.0-20020729_arm.ipk
new file mode 100644
index 0000000..60c5e43
--- a/dev/null
+++ b/development/cross-debug/gdbserver_0.0-20020729_arm.ipk
Binary files differ
diff --git a/development/cross-debug/sample.arm-gdbinit b/development/cross-debug/sample.arm-gdbinit
new file mode 100644
index 0000000..9d09ace
--- a/dev/null
+++ b/development/cross-debug/sample.arm-gdbinit
@@ -0,0 +1,19 @@
1set solib-absolute-prefix /dev/null
2set solib-search-path /home/sandman/work/opie/lib:/opt/Embedix/tools/arm-linux/lib
3
4define rtz
5target remote zaurus:2345
6break main
7end
8
9define rt36
10target remote ipaq2:2345
11break main
12end
13
14
15define rt38
16target remote ipaq:2345
17break main
18end
19