'xdb_trans.html', which is usually installed in the

 

directory /opt/langtools/wdb/doc on HP-UX

 

systems.

-interpreter interp

Use the interpreter interp for interface with the

 

controlling program or device. This option is meant to

 

be set by 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 307)).

-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 122)).

-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 WDB input and output to a file

To redirect 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

30 Getting In and Out of GDB

Page 30
Image 30
HP gnu source-level debugger 5992-4701 manual Quitting GDB, Redirecting WDB input and output to a file, Interface