Breakpoint 2 at 0x40007d0:2: file scope.c, line 23 from sc1. (gdb) b 30
Breakpoint 3 at 0x40007e0:0: file scope.c, line 30 from sc1. (gdb) r
Starting program: sc1
Breakpoint 1, main () at scope.c:13 13 {
(gdb) print USED1 100
(gdb) print USED1+10 110
(gdb) info macro USED1 Defined at scope.c:4 #define USED1 100 (gdb) info macro USED2
The macro `USED2' has no definition in the current scope. (gdb) c
Continuing.
Breakpoint 2, main () at scope.c:23 23 val = USED1 + USED2;
(gdb) info macro USED1 Defined at scope.c:20 #define USED1 101 (gdb) info macro USED2 Defined at scope.c:21 #define USED2 201 (gdb) c Continuing.
Breakpoint 3, main () at scope.c:30 30 val = USED1;
(gdb) info macro USED1 Defined at scope.c:28 #define USED1 102 (gdb) info macro USED2
The macro `USED2' has no definition in the current scope. (gdb) q
The program is running. Exit anyway? (y or n) y.
14.10 Debugging Memory Problems
You can use WDB to nd leaks, profile heap usage and detect other
On
14.10 Debugging Memory Problems 157