Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
programs which communicate with GDB using it as a
back end. For example, '--interpreter=mi' causes
GDB to use the gdbmi interface (see “The GDB/MI
Interface” (page 306)).
-write Open the executable and core files for both reading and
writing. This is equivalent to the 'set write on'
command inside GDB (see “Patching programs
(page 116)).
-statistics This option causes GDB to print statistics about time and
memory usage after it completes each command and
returns to the prompt.
-version This option causes GDB to print its version number and
no-warranty blurb, and exit.
-pid This option causes GDB to attach to a running process.
-inline This option causes the debugger to start with the inline
debugging on.
-src_no_g This option is used to set the limited source level
debugging without compiling.
2.1.3 Redirecting HP WDB input and output to a file
To redirect HP WDB input and output to a file, use either of these commands to start the
debugger:
$ script log1
$ gdb
or
$ gdb | tee log1
2.2 Quitting GDB
quit [expression],
q
To exit GDB, use the quit command (abbreviated q), or
type an end-of-file character (usually C-d). If you do not
supply expression, GDB will terminate normally; otherwise
it will terminate using the result of expression as the error
code.
An interrupt (often C-c) does not exit from GDB, but rather terminates the action of any
GDB command that is in progress and returns to GDB command level. It is safe to type
the interrupt character at any time because GDB does not allow it to take effect until a
time when it is safe.
You can use the detach command to release an attached process or device.
28 Getting In and Out of GDB