When you execute the program up to the first breakpoint by issuing the command
run
a right angle bracket (>) points to the current location. So after you issue those commands, the window looks something like this:
27 | } | |
28 |
| |
29 | int main(void) | |
30 | { | |
31 | /* Try two test cases. */ | |
*>32 | print_average (my_list, first, last); | |
33 | print_average (my_list, first, last - 3); | |
34 | } | |
35 |
| |
36 |
| |
37 |
| |
38 |
| |
39 |
| |
File: average.c | Procedure: main | Line: 32 | pc: 0x3524 | |
.. |
|
|
|
|
(gdb) b main |
|
|
|
|
Breakpoint 1 | at 0x3524: file average.c, line 32. |
| ||
(gdb) run |
|
|
|
|
Starting program: /home/work/wdb/a.out
Breakpoint 1, main () at average.c:32 (gdb)
15.2 Automatically running a program at startup
WDB does not start running the target executable at startup as do `xdb' and HP DDE. This makes it easy to set break points before the target program's main function.
To make WDB automatically start running the target program add these lines to your startup file, .gdbinit:
break main run
15.3 Screen Layouts
The TUI supports four panes within the terminal window, in various combinations:
•Command
•Source
•Disassembly
•Register
244 The