Defining Buttons

To facilitate interaction, you can add own command buttons to DDD. These buttons can be added below the debugger console (Console Buttons), the source window (Source Buttons), or the data window (Data Buttons).

To define individual buttons, use the Button Editor, invoked via Commands => Edit Buttons. The button editor displays a text, where each line contains the command for exactly one button. Clicking on OK creates the appropriate buttons from the text. If the text is empty (the default), no button is created.

As a simple example, assume you want to create a print i button. Invoke Commands => Edit Buttons and enter a line saying print i in the button editor. Then click on OK. A button named Print i will now appear below the debugger console--try it! To remove the button, reopen the button editor, clear the print i line and press OK again.

If a button command contains (), the string () will automatically be replaced by the contents of the argument field. For instance, a button named return () will execute the GDB return command with the current content of the argument field as argument.

By default, DDD disables buttons whose commands are not supported by the inferior debugger. To enable such buttons, unset the Enable supported buttons only toggle in the button editor.

PICS/ddd-button-editor.jpg

DDD also allows you to specify control sequences and special labels for user-defined buttons. See Customizing Buttons, for details.

  • Customizing Buttons: Adding your own command buttons.

Node:Customizing Buttons, Up:Defining Buttons

Customizing Buttons

DDD allows defining additional command buttons; See Defining Buttons, for doing this interactively. This section describes the resources that control user-defined buttons.

consoleButtons(class Buttons) Resource

| The following characters have special meanings:

  • Commands ending with ... insert their name, followed by a space, in the debugger console.
  • Commands ending with a control character (that is, ^ followed by a letter or ?) insert the given control character.
  • The string () is replaced by the current contents of the argument field ().
  • The string specified in the labelDelimiter resource (usually //) separates the command name from the button label. If no button label is specified, the capitalized command will be used as button label.

    | | --- |

dataButtons(class Buttons) Resource
The default resource value is empty--no source buttons are created.
sourceButtons(class Buttons) Resource
The default resource value is empty--no source buttons are created.
toolButtons(class Buttons) Resource

| The default resource value is

          Ddd*toolButtons: \
          run\nbreak^C\nstep\nstepi\nnext\nnexti\n\
          until\nfinish\ncont\n\kill\n\
          up\ndown\nBack\nForward\nEdit\nMake
          

| | --- |

The following resources set up button details:

labelDelimiter(class LabelDelimiter) Resource
The string used to separate labels from commands and shortcuts. Default is //.
verifyButtons(class VerifyButtons) Resource
If on (default), verify for each button whether its command is actually supported by the inferior debugger. If the command is unknown, the button is disabled. If this resource is off, no checking is done: all commands are accepted "as is".

Node:Defining Commands, Previous:Defining Buttons, Up:Commands

results matching ""

    No results matching ""