Tru64 UNIX
Ladebug Debugger Manual


Previous Contents Index

Example:


(ladebug) when at 5 {list;where} 

Use the when thread command to set tracepoints in specific threads. If you list one or more thread identifiers, the debugger sets a tracepoint only in those threads you specify. If you omit the thread identifier specification, the debugger sets a tracepoint in all the threads of the application.

wheni {command [;...]}
wheni if expression {command [;...]}
wheni at linenumber [if expression] {command [;...]}
wheni in function [if expression] {command [;...]}
wheni [thread thread_identifier_list] [at linenumber] [if expression] {command [;...]}
wheni [thread thread_identifier_list] [in function] [if expression] {command [;...]}


where [number]
where [number] thread [thread_identifier_list]
where [number] thread all
where [number] thread *


whereis expression


which expression


Restrictions

The maximum command-line length is 100,000 characters.
Alias commands cannot contain more than 56 arguments.

Related Information

ada(1)
c89(1)
cc(1)
cxx(1)
cobol(1)
f77(1)
f90(1)
printf(1)
signal(3)


Appendix A
Debugger Menus

The following sections describe the debugger pulldown and pop-up menus.

A.1 Menu on the Main Window

Figure A-1 and Table A-1 show and describe the menu on the Main Window.

Figure A-1 Menu on the Main Window


Table A-1 Menu on the Main Window
Menu Item Description
File Run New Program... Displays a dialog box that brings a program under debugger control by specifying an executable image.
  Rerun Same Program... Displays a dialog box that reruns the previous program under debugger control.
  Browse Source... Displays a dialog box that displays the source code in any module of your program. You may set breakpoints on routines.
  Display Line Numbers Displays or hides line numbers in the source display.
  Exit Debugger Ends the debugging session, terminating the debugger.
Edit Cut Cuts selected text from the window and copies it to the clipboard.
  Copy Copies selected text from the window to the clipboard without removing it from the window.
  Paste Pastes text from the clipboard to a text-entry field or region.
  Find... Searches the source file for the text in the dialog box.
Views Manage Views... Displays a dialog box which you can use to manage all the views.
  Breakpoint View Toggles the Breakpoint View.
  Instruction View Toggles the Instruction View.
  Register View Toggles the Register View.
  Monitor View Toggles the Monitor View.
  Local Variables View Toggles the Local Variables View.
Commands Print... Prints the current value of a variable or expression.
  Assign... Changes the value of a variable.
  Edit File Opens the editable source file with the current file displayed.
  Attach to Process... Displays a dialog box that replaces the currently active process with a selected process, leaving the previous process under debugger control.
  Detach from Process... Displays a dialog box that allows you to detach from a previously attached process.
Options Customize... Displays a dialog box that modifies, adds, removes, or resequences a button in the push-button pane and the associated debugger command.
  Save Options Saves the customizations that you have made for use in subsequent debugger sessions.
Help Display Quick Help Displays one line of context-sensitive help in the Quick Help Panel when you drag the pointer over a menu item or label on the menus or pop-up menus.
  On Context Provides context-sensitive help.
  On Window Provides information about the main window.
  On Help Provides information about the online help system.
  On Version Provides the current version of the debugger.
  On Commands Provides information about debugger commands.

A.2 Menu on Optional Views Window

Figure A-2 shows the menu on the Optional Views Window.

Figure A-2 Menu on Optional Views Window


Table A-2 describes the menu on the Optional Views Window.

Table A-2 Menu on Optional Views Window
Menu Item Description
File Exit Debugger Ends the debugging session, terminating the debugger.
Views Manage Views... Allows you to manage all views.
  Breakpoint View Toggles the Breakpoint View.
  Instruction View Toggles the Instruction View.
  Register View Toggles the Register View.
  Monitor View Toggles the Monitor View.
  Local Variables View Toggles the Local Variables View.
Break Activate All Activates any previously deactivated breakpoints.
  Deactivate All Deactivates any previously activated breakpoints.
  Delete All... Removes all breakpoints from the debugger's breakpoint list and from the Breakpoint View.
  Toggle Toggles a breakpoint.
  Set/Modify... Displays a dialog box that sets a new breakpoint, optionally associated with a particular condition or action, at a specified location.
  Delete Deletes an individual breakpoint.
Monitor Assign... Changes the value of a monitored element.
  Typecast Uses the submenu to typecast output for a selected variable to int, long, short, or char*.
  Change Radix Uses the submenu to change the output radix for a selected variable to hex, octal, or decimal.
  Change All Radix Uses the submenu to change the output radix for all subsequent monitored elements to hex, octal, or decimal.
  Remove Removes an element from the Monitor View.
Register Modify... Displays a dialog box that changes the value of a selected register.
  Change All Radix Uses the submenu to change current and previous output for all registers to hex, octal, or decimal.
Options Customize... Displays a dialog box that modifies, adds, removes, or resequences a button in the push-button panel and the associated debugger command.
  Save Options... Displays a dialog box that saves the current settings of all window features of the debugger that you can customize interactively, such as the configuration of the windows and views, button definitions, and so on. These settings are observed when you subsequently start up the debugger.
Help On Context Provides context-sensitive hel.
  On Window Provides information about the Optional Views Window.
  On Help Provides information about the online help system.
  On Version Provides the current version of the debugger.
  On Commands Provides information about debugger commands.

A.3 Menu on Instruction View

Figure A-3 shows the menu in the Instruction View.

Figure A-3 Menu on Instruction View


Table A-3 describes the menu on the Instruction View.

Table A-3 Menu on Instruction View
Menu Item Description
File Show Instruction Addresses Displays the address associated with each instruction listed in the Instruction View.
  Display Line Numbers Displays the line number of your source-code program associated with each instruction or set of instructions listed in the Instruction View.
Edit Copy Copies text you have selected in the window to the clipboard without removing it from the window. To paste your text from the clipboard to a text-entry field or region, choose Edit:Paste item on the main window.
Break Activate All Activates any previously set breakpoints.
  Deactivate All Deactivates any previously set breakpoints.
  Delete All... Removes all breakpoints from the debugger's breakpoint list and from the Instruction View.
  Set... Sets an individual breakpoint.
Help On Context Provides context-sensitive help.
  On Window Provides information about the Instruction View.
  On Help Provides information about the online help system.
  On Version Provides the current version of the debugger.
  On Commands Provides information about debugger commands.

A.4 Context-Sensitive Pop-Up Menus

Context-sensitive pop-up menus in debugger windows and views list common operations associated with your location: when you click MB3, the menu lists actions for the text you have selected, the source line at which you are pointing, or the window pane in which you are working.

A.4.1 Source View Pop-Up Menu

To use pop-up menus in the source view, select text or position your mouse pointer in the source display, and press MB3. A pop-up menu appears with the items in Table A-4. The debugger inserts the selected text or line number in the menu items of the pop-up menu.

Table A-4 Source View Pop-Up Menu
Menu Item Description
Print [selection] Evaluates the selected expression and prints its value in the Command Message View.
Monitor [selection] Inserts the selected expression in the monitor list of the Monitor View.
Assign [selection] Provides the Assign dialog box.
Stop in Routine [selection] Sets a breakpoint on a selected routine name.
Continue to Line... Sets a breakpoint at designated line and executes until line number is reached.
Continue to Line [line number] Sets a breakpoint and executes until [line number] is reached.
Continue Resumes execution of the program.
Skip to Line [line number] Branches to a specified line without executing source code between the line at which execution is suspended and the specified line.
Toggle Breakpoint at Line
[line number]
Activates/deactivates a breakpoint at the mouse pointer.
Temporary Breakpoint at Line [line number] Sets a temporary breakpoint at the mouse pointer.
Next Steps to the next line by stepping over routine calls.

A.4.2 Annotation Area Pop-Up Menu

The annotation area is at the left side of the source pane and contains the breakpoint toggles and current location pointer. If you press MB3 while your mouse pointer rests in the annotation area of the source pane, a pop-up menu with the items in Table A-5 appears.

Table A-5 Annotation Area Pop-Up Menu
Menu Item Description
Set/Modify Breakpoints... Displays a dialog box you can use to activate or deactivate a breakpoint and modify the breakpoint attributes (location, condition, or action).
Continue to Line [line number] Sets a temporary breakpoint and executes until [line number] is reached.
Continue Resumes execution of the program.
Skip to Line [line number] Branches to a specified line without executing source code between the line at which execution is suspended and the specified line.
Toggle Breakpoint at Line
[line number]
Activates/deactivates a breakpoint at the mouse pointer.
Temporary Breakpoint at Line [line number] Sets a temporary breakpoint at the mouse pointer.
Next Steps to the next line by stepping over routine calls.


Previous Next Contents Index