Debugging with GDB (February 2008)

Table Of Contents
226 Debugging with GDB
To display the current history status, use show history.
For an equivalent of the XDB record-all facility, pipe the output of the gdb command to
the tee(1) command. For example:
gdb a.out | tee mylogfile
This solution works with the default line-mode user interface, not with the terminal user
interface.
16.2.8 Macro facility commands
Use the show user or help user-defined command to obtain a list of all user-defined
commands.
The following table lists the XDB and the equivalent WDB commands for handling
macros:
XDB Command WDB Equivalent Meaning
def name
replacement-text
def name [GDB prompts for
commands]
Define a user-defined command
tm No equivalent Toggle the macro substitution
mechanism
undef name def name [follow with empty
command list]
Remove the macro definition for
name
undef * No equivalent Remove all macro definitions
16.2.9 Signal control commands
The following table lists the XDB and equivalent WDB commands for signal control:
XDB Command WDB Equivalent Meaning
lz lz (with -xdb), info signals List signal handling
z number s z number s (with -xdb), handle
numberstop, handle number
nostop
Toggle stop flag for signal number
z number i z number i (with -xdb), handle
numbernopass, handle number
pass
Toggle ignore flag for signal num-
ber