User`s guide
24
Chapter 4: Controlling dbx
The History Editor
The history editor, hed, lets you use your favorite editor on any or all of the
commands in the current dbx history list. When you enter thehed command,
dbx copies all or part of the history list into a temporary file that you can edit.
When you quit the editor, any commands left in this temporary file are
automatically executed by dbx.
If you have set the dbx variable $editor to the name of an editor, the hed
command invokes that editor. If you have not set the dbx variable $editor,dbx
checks whether you have set the environment variable EDITOR and, if so,
invokes that editor. If you have not set either the dbx variable or the
environment variable, dbx invokes the vi editor.
The syntax for the hed commands is:
hed Edits only the last line of the history list (the last command
executed).
hed num1 Edits line num1 in the history list.
hed num1,num2
Edits the lines in the history list from num1 through num2.
hed all Edits the entire history list.
By default, dbx doesn’t display the commands that it executes as a result of
the hed command (the dbx variable $pimode is set to 0). If $pimode is set to 1,
dbx displays the commands as it executes them. See $pimode in Appendix C,
“Predefined dbx Variables” for more information.
Creating and Removing
dbx
Aliases
You can create dbx aliases for debugger commands. Use these aliases as you
would any other dbx command. When dbx encounters an alias, it expands the
alias using the definition you provided.
dbx has a group of predefined aliases that you can modify or delete. These
aliases are listed and described in Appendix B, “Predefined Aliases.”