![]() |
he purpose of a debugger such as GDB is to allow you to see
what is going on ``inside'' another program while it
executes-or what another program was doing at the moment it
crashed.
GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:
You can run gdb with no arguments or options; but the most usual way to start GDB is with one argument or two, specify- ing an executable program as the argument:
gdb program
You can also start with both an executable program and a
core file specified:
gdb program core
You can, instead, specify a process ID as a second argument,
if you want to debug a running process:
gdb program 1234
would attach GDB to process 1234 (unless you also have a
file named `1234'; GDB does check for a core file first).
| | ||
| HelpNet was created by the 1995 incoming graduate class. It is only occasionally updated. | Department of Computer Science School of Engineering, University of Virginia 151 Engineer's Way, P.O. Box 400740 Charlottesville, Virginia 22904-4740 (434) 982-2200 Fax: (434) 982-2214 | Web Comments: webteam@cs.virginia.edu Admissions Inquiries: inquiry@cs.virginia.edu Site directory, Other addresses Server statistics © Created by the CS Web Team |