Customizing DDD
DDD is controlled by several resources--user-defined variables that take specific values in order to control and customize DDD behavior.
Most DDD resources can be set interactively while DDD is running or when invoking DDD. See Resource Index, for the full list of DDD resources.
We first discuss how customizing works in general; then we turn to customizing parts of DDD introduced so far.
- How Customizing Works:
- Customizing Help:
- Customizing Undo:
- Customizing Windows:
- Debugger Settings:
Node:How Customizing Works, Next:Customizing Help, Up:Customizing
How Customizing DDD Works
- Resources:
- Changing Resources:
- Saving Options:
Node:Resources, Next:Changing Resources, Up:How Customizing Works
Resources
Just like any X program, DDD has a number of places to get resource values from. For DDD, the most important places to specify resources are:
The
~/.ddd/init
file (~
stands for your home directory). This file is read in by DDD upon start-up; the resources specified herein override all other sources (except for resources given implicitly by command-line options).If the environment variable
DDD_STATE
is set, its value is used instead of~/.ddd/
.The
Ddd
application-defaults file. This file is typically compiled into the DDD executable. If it exists, its resource values override the values compiled into DDD. If the versions of theDdd
application-defaults file and the DDD executable do not match, DDD may not function properly; DDD will give you a warning in this case.8- The command-line options. These options override all other resource settings.
- If the environment variable
DDD_SESSION
is set, it indicates the name of a session to start, overriding all options and resources. This is used by DDD when restarting itself.
Not every resource has a matching command-line option. Each resource (whether in ~/.ddd/init
or Ddd
) is specified using a line
Ddd* **Illegal HTML tag removed :** resource : **Illegal HTML tag removed :** value
For instance, to set the pollChildStatus
resource to off
, you would specify in ~/.ddd/init
:
Ddd*pollChildStatus: off
For more details on the syntax of resource specifications, see the section RESOURCES in the X(1) manual page.
Node:Changing Resources, Next:Saving Options, Previous:Resources, Up:How Customizing Works
Changing Resources
You can change DDD resources by three methods:
- Use DDD to change the options, notably
Edit => Preferences
. This works for the most important DDD resources. Be sure to save the options (see Saving Options) such that they apply to future DDD sessions, too. - You can also invoke DDD with an appropriate command-line option. This changes the related DDD resource for this particular DDD invocation. However, if you save the options (see Saving Options), the changed resource will also apply to future invocations.
- Finally, you can set the appropriate resource in a file named
.ddd/init
in your home directory. See Resource Index, for a list of DDD resources to be set.
Node:Saving Options, Previous:Changing Resources, Up:How Customizing Works
Saving Options
You can save the current option settings by setting Edit => Save Options
. Options are saved in a file named .ddd/init
in your home directory when DDD exits. If a session Illegal HTML tag removed : session is active, options will be saved in ~/.ddd/sessions/
Illegal HTML tag removed : session/init
instead.
The options are automatically saved when exiting DDD. You can turn off this feature by unsetting Edit => Save Options
. This is tied to the following resource:
saveOptionsOnExit(class SaveOnExit) | Resource |
---|---|
If on (default), the current option settings are automatically saved when DDD exits. |
---|
Node:Customizing Help, Next:Customizing Undo, Previous:How Customizing Works, Up:Customizing
Customizing DDD Help
DDD Help can be customized in various ways.
- Button tips: Turning off tips.
- Tip of the day: Turning off the tip of the day.
- Help Helpers: Helper programs invoked by Help.
Node:Button tips, Next:Tip of the day, Up:Customizing Help
Button Tips
Button tips are helpful for novices, but may be distracting for experienced users. You can turn off button tips via Edit => Preferences => General => Automatic display of Button Hints => as Popup Tips
.
You can also turn off the hint that is displayed in the status line. Just toggle Edit => Preferences => General => Automatic Display of Button Hints => in the Status Line
.
These are the related DDD resources (see Customizing):
buttonTips(class Tips) | Resource |
---|---|
If on (default), enable button tips. |
---|
buttonDocs(class Docs) | Resource |
---|---|
If on (default), show button hints in the status line. |
---|
Node:Tip of the day, Next:Help Helpers, Previous:Button tips, Up:Customizing Help
Tip of the day
You can turn off the tip of the day by toggling Edit => Preferences => Startup => Startup Windows => Tip of the Day
.
Here is the related DDD resource (see Customizing):
startupTips(class StartupTips) | Resource |
---|---|
If on (default), show a tip of the day upon DDD startup. |
---|
See Options, for options to set this resource upon DDD invocation.
The actual tips are controlled by these resources (see Customizing):
startupTipCount(class StartupTipCount) | Resource |
---|---|
Illegal HTML tag removed : n |
---|
Illegal HTML tag removed : n | Resource |
---|---|
Illegal HTML tag removed : n |
---|
Node:Help Helpers, Previous:Tip of the day, Up:Customizing Help
Help Helpers
DDD relies on a number of external commands, specified via Edit => Preferences => Helpers
.
To uncompress help texts, you can define a Uncompress
command:
uncompressCommand(class UncompressCommand) | Resource |
---|---|
The command to uncompress the built-in DDD manual, the DDD license, and the DDD news. Takes a compressed text from standard input and writes the uncompressed text to standard output. The default value is gzip -d -c ; typical values include zcat and gunzip -c . |
---|
To view WWW pages, you can define a Web Browser
command:
wwwCommand(class WWWCommand) | Resource |
---|---|
| To specify netscape-6.0
as browser, use the setting:
Ddd*wwwCommand: \ netscape-6.0 -remote 'openURL(@URL@)' \ || netscape-6.0 '@URL@'
| | --- |
This is the default WWW Page shown by Help =>
DDDWWW Page
:
wwwPage(class WWWPage) | Resource |
---|---|
The DDD WWW page. Value: http://www.gnu.org/software/ddd/ |
---|
Node:Customizing Undo, Next:Customizing Windows, Previous:Customizing Help, Up:Customizing
Customizing Undo
DDD Undo can be customized in various ways.
To set a maximum size for the undo buffer, set Edit => Preferences => General => Undo Buffer Size
.
This is related to the maxUndoSize
resource:
maxUndoSize(class MaxUndoSize) | Resource |
---|---|
The maximum memory usage (in bytes) of the undo buffer. Useful for limiting DDD memory usage. A negative value means to place no limit. Default is 2000000 , or 2000 kBytes. |
---|
You can also limit the number of entries in the undo buffer, regardless of size (see Customizing):
maxUndoDepth(class MaxUndoDepth) | Resource |
---|---|
The maximum number of entries in the undo buffer. This limits the number of actions that can be undone, and the number of states that can be shown in historic mode. Useful for limiting DDD memory usage. A negative value (default) means to place no limit. |
---|
To clear the undo buffer at any time, thus reducing memory usage, use Edit => Preferences => General => Clear Undo Buffer
Node:Customizing Windows, Next:Debugger Settings, Previous:Customizing Undo, Up:Customizing
Customizing the DDD Windows
You can customize the DDD Windows in various ways.
- Splash Screen: Turning off the splash screen.
- Window Layout: Re-arranging windows.
- Customizing Fonts: Using alternate fonts.
- Toggling Windows: Turning off windows.
- Text Fields: Popdown histories.
- Icons: Iconifying DDD windows.
- Adding Buttons: Create your own button set.
- More Customizations:
Node:Splash Screen, Next:Window Layout, Up:Customizing Windows
Splash Screen
You can turn off the DDD splash screen shown upon startup. Just select Edit => Preferences => Startup
DDD Splash Screen
.
The value applies only to the next DDD invocation.
This setting is related to the following resource:
splashScreen(class SplashScreen) | Resource |
---|---|
If on (default), show a DDD splash screen upon start-up. |
---|
You can also customize the appearance of the splash screen (see Customizing):
splashScreenColorKey(class ColorKey) | Resource |
---|---|
Please note: if DDD runs on a monochrome display, or if DDD was compiled without the XPM library, only the monochrome version (m ) can be shown. |
---|
Node:Window Layout, Next:Customizing Fonts, Previous:Splash Screen, Up:Customizing Windows
Window Layout
By default, DDD stacks commands, source, and data in one single top-level window. To have separate top-level windows for source, data, and debugger console, set Edit => Preferences => Startup => Window Layout => Separate Windows
.
Here are the related DDD resources:
separateDataWindow(class Separate) | Resource |
---|---|
If on , the data window and the debugger console are realized in different top-level windows. If off (default), the data window is attached to the debugger console. |
---|
separateSourceWindow(class Separate) | Resource |
---|---|
If on , the source window and the debugger console are realized in different top-level windows. If off (default), the source window is attached to the debugger console. |
---|
By default, the DDD tool bars are located on top of the window. If you prefer the tool bar being located at the bottom, as in DDD 2.x and earlier, set Edit => Preferences => Startup => Tool Bar Appearance => Bottom
.
This is related to the toolbarsAtBottom
resource:
toolbarsAtBottom(class ToolbarsAtBottom) | Resource |
---|---|
Whether source and data tool bars should be placed above source and data, respectively (off , default), or below, as in DDD 2.x (on ). |
---|
The bottom setting is only supported for separate tool bars--that is, you must either choose separate windows or configure the tool bar to have neither images nor captions (see Customizing the Tool Bar).
If you use stacked windows, you can choose whether there should be one tool bar or two tool bars. By default, DDD uses two tool bars if you use separate windows and disable captions and images, but you can also explicitly change the setting via this resource:
commonToolBar(class ToolBar) | Resource |
---|---|
Whether the tool bar buttons should be shown in one common tool bar at the top of the common DDD window (on , default), or whether they should be placed in two separate tool bars, one for data, and one for source operations, as in DDD 2.x (off ). |
---|
You can also change the location of the status line (see Customizing):
statusAtBottom(class StatusAtBottom) | Resource |
---|---|
If on (default), the status line is placed at the bottom of the DDD source window. If off , the status line is placed at the top of the DDD source window (as in DDD 1.x). |
---|
See Options, for options to set these resources upon DDD invocation.
Node:Customizing Fonts, Next:Toggling Windows, Previous:Window Layout, Up:Customizing Windows
Customizing Fonts
You can configure the basic DDD fonts at run-time. Each font is specified using two members:
The
Illegal HTML tag removed : font family
is an X font specifications, where the initial
Illegal HTML tag removed : foundry
-
specification may be omitted, as well as any specification afterIllegal HTML tag removed : family
. Thus, a pair
Illegal HTML tag removed : family
-
Illegal HTML tag removed : weight
usually suffices.
The
Illegal HTML tag removed : font size
is given as (resolution-independent) 1/10 points.
To specify fonts, select Edit => Preferences => Fonts
.
The Browse
button opens a font selection program, where you can select fonts and attributes interactively. Clicking quit
or select
in the font selector causes all non-default values to be transferred to the DDD font preferences panel.
The following fonts can be set using the preferences panel:
Default Font
- The default DDD font to use for labels, menus, and buttons. Default is
helvetica-bold
. Variable Width
- The variable width DDD font to use for help texts and messages. Default is
helvetica-medium
. Fixed Width
- The fixed width DDD font to use for source code, the debugger console, text fields, and the execution window. Default is
lucidatypewriter-medium
. Data
- The DDD font to use for data displays. Default is
lucidatypewriter-medium
.
Changes in this panel will take effect only in the next DDD session. To make it effective right now, restart DDD (using File => Restart
DDD).
After having made changes in the panel, DDD will automatically offer you to restart itself, such that you can see the changes taking effect.
The Reset
button restores the most recently saved preferences.
Here are the resources related to font specifications:
defaultFont(class Font) | Resource |
---|---|
Illegal HTML tag removed : Foundry |
---|
defaultFontSize(class FontSize) | Resource |
---|---|
The size of the default DDD font, in 1/10 points. This resource overrides any font size specification in the defaultFont resource (see above). The default value is 120 for a 12.0 point font. |
---|
variableWidthFont(class Font) | Resource |
---|---|
Illegal HTML tag removed : Foundry |
---|
variableWidthFontSize(class FontSize) | Resource |
---|---|
The size of the variable width DDD font, in 1/10 points. This resource overrides any font size specification in the variableWidthFont resource (see above). The default value is 120 for a 12.0 point font. |
---|
fixedWidthFont(class Font) | Resource |
---|---|
Illegal HTML tag removed : Foundry |
---|
fixedWidthFontSize(class FontSize) | Resource |
---|---|
The size of the fixed width DDD font, in 1/10 points. This resource overrides any font size specification in the fixedWidthFont resource (see above). The default value is 120 for a 12.0 point font. |
---|
dataFont(class Font) | Resource |
---|---|
Illegal HTML tag removed : Foundry |
---|
dataFontSize(class FontSize) | Resource |
---|---|
The size of the DDD data font, in 1/10 points. This resource overrides any font size specification in the dataFont resource (see above). The default value is 120 for a 12.0 point font. |
---|
As all font size resources have the same class (and by default the same value), you can easily change the default DDD font size to, say, 9.0 points by inserting a line
Ddd*FontSize: 90
in your ~/.ddd/init
file.
Here's how to specify the command to select fonts:
fontSelectCommand(class FontSelectCommand) | Resource |
---|---|
| A command to select from a list of fonts. The string @FONT@
is replaced by the current DDD default font; the string @TYPE@
is replaced by a symbolic name of the DDD font to edit. The program must either place the name of the selected font in the PRIMARY
selection or print the selected font on standard output. A typical value is:
Ddd*fontSelectCommand: xfontsel -print
| | --- |
See Options, for options to set these resources upon DDD invocation.
Node:Toggling Windows, Next:Text Fields, Previous:Customizing Fonts, Up:Customizing Windows
Toggling Windows
In the default stacked window setting, you can turn the individual DDD windows on and off by toggling the respective items in the View
menu (see View Menu). When using separate windows (see Window Layout), you can close the individual windows via File => Close
or by closing them via your window manager.
Whether windows are opened or closed when starting DDD is controlled by the following resources, immediately tied to the View
menu items:
openDataWindow(class Window) | Resource |
---|---|
If off (default), the data window is closed upon start-up. |
---|
openDebuggerConsole(class Window) | Resource |
---|---|
If off , the debugger console is closed upon start-up. |
---|
openSourceWindow(class Window) | Resource |
---|---|
If off , the source window is closed upon start-up. |
---|
See Options, for options to set these resources upon DDD invocation.
Node:Text Fields, Next:Icons, Previous:Toggling Windows, Up:Customizing Windows
Text Fields
The DDD text fields can be customized using the following resources:
popdownHistorySize(class HistorySize) | Resource |
---|---|
The maximum number of items to display in pop-down value histories. A value of 0 (default) means an unlimited number of values. |
---|
sortPopdownHistory(class SortPopdownHistory) | Resource |
---|---|
If on (default), items in the pop-down value histories are sorted alphabetically. If off , most recently used values will appear at the top. |
---|
Node:Icons, Next:Adding Buttons, Previous:Text Fields, Up:Customizing Windows
Icons
If you frequently switch between DDD and other multi-window applications, you may like to set Edit => Preferences => General => Iconify all windows at once
. This way, all DDD windows are iconified and deiconified as a group.
This is tied to the following resource:
groupIconify(class GroupIconify) | Resource |
---|---|
If this is on , (un)iconifying any DDD window causes all other DDD windows to (un)iconify as well. Default is off , meaning that each DDD window can be iconified on its own. |
---|
If you want to keep DDD off your desktop during a longer computation, you may like to set Edit => Preferences => General => Uniconify when ready
. This way, you can iconify DDD while it is busy on a command (e.g. running a program); DDD will automatically pop up again after becoming ready (e.g. after the debugged program has stopped at a breakpoint). See Program Stop, for a discussion.
Here is the related resource:
uniconifyWhenReady(class UniconifyWhenReady) | Resource |
---|---|
If this is on (default), the DDD windows are uniconified automatically whenever GDB becomes ready. This way, you can iconify DDD during some longer operation and have it uniconify itself as soon as the program stops. Setting this to off leaves the DDD windows iconified. |
---|
Node:Adding Buttons, Next:More Customizations, Previous:Icons, Up:Customizing Windows
Adding Buttons
You can extend DDD with new buttons. See Defining Buttons, for details.
Node:More Customizations, Previous:Adding Buttons, Up:Customizing Windows
More Customizations
You can change just about any label, color, keyboard mapping, etc. by changing resources from the Ddd
application defaults file which comes with the DDD source distribution. Here's how it works:
- Identify the appropriate resource in the
Ddd
file. - Copy the resource line to your
~/.ddd/init
file and change it at will.
See Application Defaults, for details on the application-defaults file.
Node:Debugger Settings, Previous:Customizing Windows, Up:Customizing
Debugger Settings
For most inferior debuggers, you can change their internal settings using Edit => Settings
. Using the settings editor, you can determine whether C++ names are to be demangled, how many array elements are to print, and so on.
The capabilities of the settings editor depend on the capabilities of your inferior debugger. Clicking on ?
gives an an explanation on the specific item; the GDB documentation gives more details.
Use Edit => Undo
to undo changes. Clicking on Reset
restores the most recently saved settings.
Some debugger settings are insensitive and cannot be changed, because doing so would endanger DDD operation. See the gdbInitCommands
and dbxInitCommands
resources for details.
All debugger settings (except source and object paths) are saved with DDD options.
Node:Navigating, Next:Stopping, Previous:Windows, Up:Top