Visual Debugging with DDD
By Andreas Zeller, March 01, 2001
Source Code Accompanies This Article. Download It Now.
If a debugger is a tool that lets you "see" what's going on in a program, then DDD is the tool that lets you see the most.
Mar01:
<b>(a)</b>
(gdb) break foobar.c:99
Breakpoint 1 at 0x8048a7d: file foobar.c, line 99.
(gdb) _
<b>(b) </b>
(gdb) frame
#0 list_test (start=46) at foobar.c:399
\032\032foobar.c:99:8266:beg:0x8049143
(gdb) display *list
2: *list = {
value = 85,
self = 0x804eb50,
next = 0x804eb60
}
(gdb) output &(*list)
(List *) 0x804eb50
(gdb) _
(gdb) delete 3
(gdb) info breakpoints
...
(gdb) _
Example 1: (a) Interaction at the debugger console; (b) interaction behind the scenes.