In This Book

Using a Personal Startup File to Customize the Debugger

A personal startup ￿le contains debugger commands that you want executed each time you invoke the debugger. To create a personal startup ￿le, create a ￿le called .dderc in either your current working directory or in your $HOME directory. In .dderc , place any commands that you want to execute at debugger startup.

When you invoke the debugger, it searches for .dderc in the current working directory. If the debugger does not ￿nd .dderc in your current working directory, it then searches your $HOME directory.

A personal startup ￿le typically contains commands that:

Set debugger properties (such as the maximum number of array elements that the debugger will print) to values that you use frequently (property array_dim_max )

De￿ne command aliases, which let you more easily enter commands or a sequence of commands that you use frequently (alias)

In addition, you can de￿ne a special alias, called `after_debug . This alias can contain commands that you want the debugger to execute after it invokes the target program; for example, `after_debug might set a breakpoint or invoke a command ￿le containing commands speci￿c to the target program. To use `after_debug , de￿ne it with an alias command in your personal startup ￿le. For example, the alias command

alias `after_debug breakpoint sum; go

causes the debugger to set a breakpoint at the ￿rst executable statement in the procedure sum and then to execute the go command.

6-4 Customizing the Debugger