This section describes configuration options not accessible from the Config menu.
NOTE: These configuration options are only available from the Debugger Command Pane using the Debugger command configure or from a Config file.
Removes all the buttons so they can be created from scratch with debugbutton.
Format: debugbutton [num] [name] [[c=]command] [[i=]iconname] [[h=]helpstring] [[t=]tooltip]
This command adds a new icon button to the debugger toolbar.
command, iconname, helpstring, and tooltip are all either single words, or quoted strings. Quoted string are of the form:
"This is a quoted string." |
There are several forms of the command:
command is the command executed when the button is pressed. You may use semicolons in the command to execute multiple commands. For example: debugbutton printxy c="print x;print y".
iconname is the name of the icon associated with the button. If not specified, then the first letter of the command name will be used as the icon for the button.
iconname may either be the name of one of MULTI's built-in icons (see below for how to obtain a list of these names), or it may be the filename of a bitmap you have created yourself. If the filename is not an absolute filename, it is assumed to be relative to the directory where MULTI is installed.
If you create your own bitmap file, it must end in a .bmp extension and must be in the uncompressed 16-color Windows Bitmap format. Other color depths are not supported, and compressed bitmaps are not supported. An easy way to create such bitmaps is to use the Paint accessory under Microsoft Windows, and make sure you choose "16 Color Bitmap" in the "Save as type" drop-down list box of the "Save As" dialog.
The built-in icons in MULTI are 20 pixels wide by 20 pixels tall, so your buttons will look best if you also use this size for your custom bitmaps.
By default, the color light gray in your custom icons will become transparent. You can specify additional color translations for your custom icon by appending a string of the form "oldcolor1=newcolor1&oldcolor2=newcolor2" with a question mark to the end of your bitmap filename. For example:
debugbutton Hello c="echo hello" i="/home/user/hello.bmp?black=fg&dkgray=shadow&white=highlight" h="Say hello" |
You can use the following values for oldcolor and newcolor:
helpstring is the help text that appears at the bottom of the window when the mouse moves over the button.
tooltip is the tooltip text that appears when you move your mouse over the button and wait. If you do not specify a tooltip, the name of the button will be used.
This command is deprecated. Use debugbutton. See debugbutton. 1.8.9 MULTI users upgrading to MULTI 2000 should note that the syntax for the debugbutton command is different than it was for the button command.
Removes all the editor buttons so they can be created from scratch with editbutton.
Format: editbutton ButtonName c="commands" [i=iconname] [h="Status bar string[@@tooltip string]" ]
Creates a new editor button. For additional information about creating new buttons, see debugbutton.
ButtonName - Name of the button. If iconifiedbuttons is off, this is the name that goes on the button. If no tooltip string is provided, this becomes the tooltip.
c - Commands the button executes when pressed.
i - Name of icon to use on the button if iconifiedbuttons is on. (see Config > Options... > Editor > Configure Editor Buttons... for a list of icons with pictures). Alternatively, you can specify your own 16-color bitmap (*.bmp) as the icon. If no icon is specified, the help icon (question mark) is used instead.
h - Status bar string which shows up as soon as the mouse is over the button, and tooltip string which shows up after the mouse hovers over the button for a short time. The status bar string and tooltip string are separated by "@@".
Removes all keybindings so they can be created from scratch with keybind.
Format: keybind key[|modifiers][@location][=command]
Assigns an action to a key pressed while holding down modifiers while the cursor is in a specified area of a window. In other words, if the mouse is in the specified location (area of a window) and the specified modifiers (such as shift) are held down, and the specified key is pressed, then the specified command will execute. The syntax for this command is essentially the same as the mouse command, except keybind does not use a click count.
To print the current key press setting for a location, type keybind followed by the location (see below for valid locations). If no location is specified, then all settings for the source pane are displayed.
key is a single ASCII (or ISO8859) character or a quoted string containing the name of one of the keys on the keyboard, such as "BACKSPACE" or "F3". A list of the acceptable key names are obtainable by typing:
keybind "????"
Characters needing more than one key press (besides the Shift, Control, and Meta keys) to generate cannot be used. To specify a double quote, put it inside double quotes: """ (that is three double quotes in a row).
modifier is any combination of Shift, Meta, and Control. If a modifier is specified, then the command is only invoked if that modifier is depressed at the time the key is pressed. If more than one modifier is specified, they should be separated from each other and from key by vertical bars `|'. The BACKSPACE key is different from h|Control even though their ASCII representations are the same.
A location may be one of the following:
If location is omitted, the default is Command.
These locations are arranged hierarchically with:
command is any MULTI command. The text it specifies may include any of the following special sequences. These sequences are not valid for key binding in the Editor:
If the key[|modifier]@location of a keybind input matches one previously defined, then the new definition replaces the old. If no command is specified in the new definition, then the new definition deletes the old.
When a key is depressed in a window, MULTI searches for keybind actions that match. There may be more than one, in which case MULTI chooses the one whose location is most specific. If there are still several, then MULTI chooses one arbitrarily.
With this command, MULTI evaluates and prints the selection when the first function key is pressed in the source window.
keybind "F1"=print %s
With this command, MULTI brings up a data explorer which displays the current selection when the first function key is pressed anywhere while the CTRL key is depressed.
keybind "F1"|Control@All= view %s
With these commands, MULTI scrolls the window when the up or down arrow is depressed.
keybind "Up"@All= (%w) scrollcommand 1l
keybind "Down"@All= (%w) scrollcommand -1l
With this command, MULTI single steps the program when Ctrl+s is pressed in the source window.
keybind s|Control=S
The following is a special case: Any key bound to the command HELP at location All invokes context sensitive help.
keybind ?|Control@All=HELP
Removes all menus so they can be created from scratch using menu.
Format: menu name {{label cmd}}
menu name
menu
Defines a menu to attach to a menu bar, MULTI button, mouse button, or key from the keyboard. All menus have a name, by which they are invoked, and a body which lists labels and associated commands. When a menu is invoked, the menu name at the top of the menu is shown with all the labels beneath. Selecting a label causes the associated command to execute. Menu items are selected by the mouse, or with the arrow keys and the return key. If one of the characters in a menu label is preceded with a "&", it will be underlined, and if the user types that character while the menu is up, the command associated with that label will be executed just as if the user had clicked on the label.
MULTI comes with a set of predefined menus for the main MULTI window, as well as for the Editor. (See "Debugger menus" and "Editor menus")
If menu is typed by itself, a list of all defined menu names is printed. Typing menu followed by a menu name displays the body of that menu. (This is case sensitive.)
To create a menu, type menu followed by the name you give it, followed by the set of labels and commands. The entire body of the menu must be enclosed in curly braces {}, as well as curly braces for each line. The first entry of each line is the label that appears in the menu left justified. The second entry is the command corresponding to the label. (Each of these lines must be contained in its own set of curly braces.) The command portion can contain its own subset of curly braces, such as using the if...else command, as long as they are paired correctly. If the command is a single command (not a list of commands), and that command has a key binding associated with it, then that key binding will be displayed (right justified) next to the label.
The following example creates a menu named RunCmds:
menu RunCmds {
{Step s}
{Next S}
{Run r}
{Go c}
{Return cU}
}
Menus can contain other menus, for example:
menu Main {
{RunCmds -> RunCmds}
{Up {E 1}}
{Down {E -1}}
{ToPC E}
Invoking this menu and moving the cursor to the right edge of the RunCmds entry calls up the submenu RunCmds.
The following example allows you to customize your own menu and bind it to a mouse click . Typing the following in the Debugger command pane allows you to use your customized menu in the Debugger with a click.
menu MyMenu {
{Go C}
{Step s}
{Next S}
}
mouse mouse*Press1@All=->MyMenu
To replace a menu definition, type a new menu command with the same name.
To edit existing menus, choose Config > Options... > General tab > Menus.... You can also use this dialog box to add or delete menus. See also "Menus...".
You can invoke a menu by typing -> directly before their name in the Debugger command pane. For example, to invoke the menu Main from the command window, type:
->Main
To bind a menu to a MULTI button, type:
debugbutton RunCmds ->RunCmds
To bind a menu to a mouse button, type:
mouse mouse3*Press1@All=->RunCmds
(where mouse3 is the rightmost mouse button)
Removes all mouse button bindings so they can be created from scratch with mouse.
Format: mouse mouse button_num[AtOnce][*click click_num] [|modifiers] [@location] [=command]
Defines the function of the mouse buttons. The first form of the command prints the current mouse commands in the given location (see the list below for valid locations), and the second form of the command changes the way the mouse buttons work.
To execute the desired command, you must indicate a combination of modifiers, button number, number of clicks, and a location for the command to occur, as explained below.
mouse button_num may either be the keyword Any, meaning any mouse button, or the word mouse followed by some of the digits between 1 and 5, meaning those mouse buttons whose numbers are listed. Not all mice have five buttons, so any commands assigned to non-existent buttons are not invoked. For example, to set a command for buttons 1 or 3, use mouse13.
The click count option, *click click_num, may be omitted, in which case it defaults to one click. However if present, it specifies the number of times the mouse button must be depressed before the command is executed. click_num may be a number between 1 and 5. The keyword click may be replaced by press in which case the command executes on the button press, rather than on the release. Or it may be either, in which case the command executes on both the press and release.
The keyword click is also followed by the text (AtOnce). This means the command bound to it executes immediately rather than pausing briefly to see if this is part of a click sequence. It has the unfortunate side effect that this command is always done immediately, even if followed by the second click of a double click. This is acceptable for many options such as the standard selection clicks: one click sets the insertion point, two clicks select the current word, three the line, and so forth. The downside to not using AtOnce is that there is a delay when invoking single-click commands (while it's waiting to see if there will be the second click of a double click, etc.).
modifiers may be one of the keywords Shift, Meta, or Control. All modifiers are preceded by a vertical bar "|". This separates them from each other and from mousebutton_num. If a modifier is specified, then the command is only invoked if that modifier is depressed. If more than one modifier is specified, then all modifiers listed must be depressed simultaneously.
A location is one of the following:
If location is omitted, then Source is the default.
These locations are arranged hierarchically with:
command is any MULTI command. The text specified may include any of the following special sequences. These sequences are not valid when binding commands in the Editor:
If the mousebutton_num[|modifiers>][@location] of a mouse input matches one previously defined, then the new definition replaces the old one. If no command is specified, then the new definition deletes the old.
When the mouse is clicked in a window, MULTI searches its list of mouse actions to match. If there is more than one, the following procedure determines which one to choose: First, the one whose location is the most specific. If there are still several, then the one which accepts the fewest number of buttons is chosen. If there are still several, then MULTI chooses one arbitrarily.
mouse mouse1=print %s
MULTI evaluates and prints the selection when clicking the left mouse button once in the source window.
mouse mouse1*Click2@All=view %s
MULTI brings up a data explorer displaying the current selection when the left mouse button is double clicked anywhere.
Formats: configurefile filename
configure filename
Used in a config file (.cfg file), these both read filename in as a .cfg file. Then processing of the original .cfg file continues as normal. configure used in this capacity is deprecated. Use configurefile instead.
If time is less than zero, then MULTI does not check to see if there are any outstanding grabs on the X server each time it stops. Otherwise it checks, and if both the keyboard and the mouse are grabbed, waits time is seconds before aborting the grab and debugging. This is useful for debugging X-windows programs that are broken and keep grabbing the keyboard and mouse, making it impossible to issue commands to the debugger.
Specifies the length of time, in tenths of a second, that MULTI waits between button presses to get a double or triple click. For example, if time is four, and two clicks come within four tenths of a second of one another, and they are on the same button in the same place, then they are treated as a single double-click. On the other hand, if they come with more than four tenths of a second between them, then they are treated as two single-clicks. If MULTI determines there is no possible double click command, then it does not wait.
Default setting: ShowName, ExpandValue, ReEvalContext, ShowChanges
This resource sets which items in the format menu of the data explorer windows are set by default. formats is a list containing the following keywords:
Default data explorer window formats | |
ShowAddress |
ShowAllFields |
ShowName |
ShowBases |
Alternate |
ReEvaluate |
OnlyAlternate |
ReEvalInGlobal |
Hex |
ReEvalInContext |
Oct |
UseAddress |
ExpandValue |
ShowChanges |
For more information on the format menu, see "Data explorer format menu".
Default: widthxheight+x_offset+y_offset
Default setting: Depends on screen size and varies from system to system. The width is approximately wide enough to display 80 characters on a line.
Sets the size and position of the Debugger window. The offset values are optional. The italicized fields are specified in pixels. The "+" field may also be "-" to specify relative to lower and right edges. For example:
geometry 500x700+0+0
Format: usewmpositioning [on | off]
Allows the window manager to decide where all windows should go. When off, MULTI tries to be a bit smarter about where windows should go.
Specifies whether the next MULTI window will come up iconified. state may be on (iconify) or off (do not iconify). This option is reset to off when the icon for the iconified window appears.
Specifies the number of pixels of movement in the mouse that MULTI ignores during the time of pressing and releasing a mouse button. If the mouse is moved by more than the value of pixels between press and release, then the mouse click is no longer treated as a single click.
By default, when MULTI creates a new view (data explorer) or monitor window using its own positioning algorithm, it attempts to pack on top of previous windows. To save screen space, it overlaps the new data explorer or monitor window on top of the old one. This obscures the bottom of the previous window. Set linesnonoverlapped to be the number of lines of the old window that should still be visible after the new window is placed on top of it.
Every time you type a right parenthesis, right square bracket, or right curly brace, the Editor briefly selects the matching one. This controls how long it pauses on the selection. time is given in tenths of a second.
Determines whether dblink is invoked to process debug information from shared libraries. This is also controlled with the -noshared Green Hills compiler option.
On - Even if the context pointer is in an inner block, and that inner block defines a variable which has the same name as a variable in the outer block, a reference to that name in that procedure will reference the outer variable of that name.
Off - If the context pointer is in the inner block and the variable name is referenced, the inner variable will be used.
To get a warning from the debugger before replacing a breakpoint that was already there, turn this option on. This is useful to avoid losing a long breakpoint command by accidentally replacing that breakpoint with a new breakpoint (which has no command).
To get a warning when setting a breakpoint on a line with no corresponding assembly (no breakdot), turn this option on.
To have the debugger attempt to show the versions of source files that were used to build the executable being debugged (via version control), turn this option on.
To allow stepping, nexting, and execution of command line procedure calls from within a breakpoint command, turn this option on. This is somewhat risky, in that if the execution from within the breakpoint command causes another breakpoint to be hit (or the same one), infinite breakpoint command recursion can occur. Continue ("c") is always allowed in a breakpoint command.
To have the debugger keep certain item chooser windows (such as file choosers) open after they've been used to load one file, turn this option on. With this option off, such windows disappear after being used once.
icongeometry widthxheight+x_offset+y_offset
Specifies the geometry of the iconified form of the debugger. Some window managers ignore this setting.
Controls the case sensitivity of expression evaluation.
Language_Default - Recommended. Follows the case sensitivity rule for the language of the program being debugged.
On - Expression evaluation is case sensitive.
Off - Expression evaluation is not case sensitive.
When using the debugger command g, if this option is on, any breakpoint at the destination will be hit as soon as execution begins at the new location. If the option is off, the breakpoint will not be hit.
Controls the style of Motorola 68000 series assembly code.
remote - XORmacs style if and only if the code is destined for execution on an embedded processor (not going to be executing on the same processor as MULTI).
XORmacs - Always XORmacs style (MOVE.L (12,A6),D0).
unix - Always unix/sun style (movl a6@(12),d0).
To enable synchronous X-windows mode, turn this option on. Synchronous mode insures that X-windows calls within MULTI complete before they return. This can be useful when running MULTI on faulty X-servers.
Initial position of the builder window from the upper left of the screen in characters and lines. To specify in pixels, append the letter `p'. This option is only useful if the rememberwindowpositions option is off. See also "Save window positions and sizes".
Minimum initial size of a non-view window, such as an IO, Target, or Monitor window. If left unspecified, the Debugger will auto-size them appropriately. This option is only useful if the rememberwindowpositions option is off. See also "Save window positions and sizes".
Maximum initial size of a non-view window. This option is only useful if the rememberwindowpositions option is off. See also "Save window positions and sizes".
If this is on and the window manager supports it, then all windows appear without title bars.
Causes the tog command to not echo the status of the breakpoint(s) it toggles.
D; // delete all breakpoints
b; // set a breakpoint
tog off; // disable the current breakpoint
B; // list all breakpoints
configure QuietTogCmd on
tog on; // enable the current breakpoint
B; // list all breakpoints