OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / tools / misc / gdb-app.txt
1
2 Debugging Applications with gdb
3 -------------------------------
4
5
6 Debugging uClinux/ColdFire applications with gdb is a little tricky.
7 Here is some instructions from Mark Abbate <mabbate@videonics.com> on
8 how this can be done.
9
10
11 -----------------------------------------------------------------------------
12
13 In other words, I'm actually doing full source level symbolic debugging =
14 on the user app. It boiled down to a few things:
15
16 (1) For HMI and SDS, use -gdwarf.
17 (2) Re-link the -r elf specifiying -Ttext xxxxxx -Tdata yyyyyy -Tbss =
18 zzzzzz as reported by the binfmt_flat loader. Use this resulting elf as =
19 the source of symbols for the debugger.
20 (3) Set bit 10 of the CSR.
21 (4) If using HMI, set SR to 0x2700 after first break, and restore to 0x0 =
22 before a continue.
23 (5) Put a couple second long while loop at the top of main. When the app =
24 starts up, manually hit Stop in the debugger. Then software breakpoints =
25 can be set.
26
27 Hopefully nothing else will crawl out of the woodwork and we'll get some =
28 serious debugging completed. I'll let you know if we get the DDD/gdb bdm =
29 running.
30
31 Regards,
32 Mark Abbate
33
34
35 -----------------------------------------------------------------------------