VISUAL DEBUGGING & DDD
by Andreas Zeller


Figure 1:

list = (List *) 0x804eb50
list->next = (List *) 0x804eb60
list->next->next = (List *) 0x804eb70
list->next->next->next = (List *) 0x804eb50
list->next->next->next->next = (List *) 0x804eb60
 ...

Example 1:

(a)
(gdb) break foobar.c:99
Breakpoint 1 at 0x8048a7d: file foobar.c, line 99.
(gdb) _


(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) _

Example 2:

(a)
(gdb) tbreak foobar.c:422
Breakpoint 3 at 0x80492b0: file foobar.c, line 422.
(gdb) info breakpoints
 ...
(gdb) jump foobar.c:422
Line 422 is not in `list_test(int)'. Jump anyway? (y or n)


(b)
Line 422 is not in `list_test(int)'. Jump anyway? (y or n) no
Not confirmed.
(gdb) delete 3
(gdb) info breakpoints
 ...
(gdb) _



1

