Stony Brook Modula-2 archive
Menus
File Menu View Menu Search Menu Run Menu Debug Menu
Popup context menus
Source Window context menu Data Window context menu Watch window context menu Call trace window context menu
File Menu
Open program Open a program for debugging. You can only debug one program at a time thereforethis menu item will be disabled when you are currently debugging a program.
Attach to program Attach the debugger to a currently running program for debugging said program. Youcan only debug one program at a time therefore this menu item will be disabled whenyou are currently debugging a program.
Exit and edit Exit and terminate the debugger and send a message to the environment to open thesource file the debugger is currently displaying at the line the caret is currentlypositioned at. If you are currently debugging a program that program will be terminatedbefore the debugger will attempt to terminate. If the debugger was not executed bythe environment this option behaves exactly like the exit menu selection.
Exit Exit and terminate the debugger. If you are currently debugging a program that programwill be terminated before the debugger will attempt to terminate itself.
View Menu
Source The debugger will display source code if source debug information is available forthe program location that is to be displayed. If no source is available the debuggerwill display assembly. When source again becomes available the debugger will displaysource.
Assembly The debugger will display assembly code for the program location that is to be displayed.
Both The debugger will display mixed source and assembly code if source debug informationis available for the program location that is to be displayed. If no source is availablethe debugger will display assembly only. When source again becomes available thedebugger will display mixed source and assembly. The assembly code for a given sourceline is displayed in between each source line.
Location Display the location given by the entered expression in the source window, in thecurrent view mode.
Module Display the source for the selected module in the source window. The display modewill be switched to source mode.
Current Display the current program execution point in the source window in the current mode.This is useful if you view different program locations and want to get back to thecurrent spot before proceeding.
Thread Window List all threads currently active in the program. You can then select which threadwill be displayed in the source window.
Note: Switching to threads other than the one the debuggeris currently stopped on can be in locations where no source information is available.For example they could be in the middle of an operating system API call. You canuse the call trace to help the first procedure in the call chain that has debug information.
TN = The thread number the debugger assigns to a thread.
TID = The operating system thread identifier number.
Call Trace List the currently active procedure calls of the thread currently being viewed. Thelist is from the currently executing procedure to the oldest called procedure fromtop to bottom. You can use the call trace to view the procedure source and variables,if available, of all active procedures in the procedure call chain. Select the procedurein the chain and then use the context menu to access these options. The call tracewindow can remain open while debugging and will be updated as you trace your program.
Post mortem call trace List the procedure calls of the thread that caused an unhandled exception. This listis read from a call trace dump file saved at the time of the crash. For this listto be valid the program being debugged must not have any changes from the one thatcrashed. This includes compiler options that can affect code generation.
Registers Display the current and previous register values for the processor registers. Thisis displayed in a window that remains open while debugging and is updated as youtrace your program.
Local Variables Display the local variables, if available, of the currently executing procedure.The currently executing procedure is the procedure where the current program executionfor the selected thread is located. Viewing a different program location is not changingthe current program execution location.
Search Menu
Find Search the module source code currently being displayed for the text entered. Optionsfor whole or partial word matches and case sensitivity are available.
Find procedure Search the module source code currently being displayed for the procedure matchingthe name entered. The search will perform partial name matches so you need not typein the full name. The search is always started from the top of the source file andnot the current caret location.
Find again Repeat the last Find operation. Find or Find program. If the previous operation wasa find procedure operation the procedure search will be from the current locationand not the top of the file so you can cycle through multiple procedures that maymatch your search string.
Find line number Position the module source code currently being displayed at the entered line number.
Run Menu
Step Single step the thread being displayed source window. This step will step over anyprocedure calls and not step into a procedure call.
For source display mode a single line of source code is stepped.For all other display modes a single assembly instruction is stepped.
Note that in a program with multiple threads your program executionmay return in a different thread than the one you gave the step command in. Thisjust means that a debug event occurred in that thread before the current thread finishedits step operation.
Trace Single step the thread being displayed source window. This step will step into anyprocedure calls.
For source display mode a single line of source code is stepped.For all other display modes a single assembly instruction is stepped.
Note that in a program with multiple threads your program executionmay return in a different thread than the one you gave the trace command in. Thisjust means that a debug event occurred in that thread before the current thread finishedits trace operation.
Step out Execute the current procedure until that procedure terminates and then stop threadexecution. This operation may not function properly unless full debug informationfor the current procedure is available. Therefore this function may not be reliablein assembly language debugging.
Note that in a program with multiple threads your program executionmay return in a different thread than the one you gave the step command in. Thisjust means that a debug event occurred in that thread before the current thread finishedits step operation.
Run Let the current program run. The program will run and not return to the debuggeruntil the program generates a debug event or until it terminates. Generally you willhave breakpoints set that will cause the program to stop at some location.
Run and Sample Let the current program run and sample the program execution while running. The programwill run and not return to the debugger until the program generates a debug eventor until it terminates. Generally you will have breakpoints set that will cause theprogram to stop at some location.
The samples will be saved when the program terminates.
Stop running If the debugged program is currently running and you want to forcibly stop executionof the program you can use this command. Note that the program may stop in a locationwhere debug information is not present. You can use the call trace to find your codein the procedure call chain. If your program is currently waiting on a multi taskingevent this command may not have the desired effect. It can be difficult at timesto get to your code in this situation.
Released trapped exception If the debugger stopped because it trapped an exception that occurred in your programyour must use this option to let the thread where the exception occurred to propagate.You may want to propagate an exception if an exception of a given type is considerednormal and is handled in the source code, otherwise you generally want the exceptiontrapped at or near the source of the exception to diagnose the problem.
To location The debugger will set a temporary breakpoint at the location specified by the expressionand the debugger then runs the program. The debugger may not stop at that locationif some other debug event, such as a another breakpoint, occurs before the temporarybreakpoint is reached. If this is the case the is still set and you can still executeto the breakpoint by executing the Run command. Once the breakpoint is reached itis automatically removed.
Code Expressions
To cursor The debugger will set a temporary breakpoint at the location of the caret in thesource window and the debugger then runs the program. The debugger may not stop atthat location if some other debug event occurs, such as another breakpoint, beforethe temporary breakpoint is reached. If this is the case the is still set and youcan still execute to the breakpoint by executing the Run command. Once the breakpointis reached it is automatically removed.
Restart Restart the current or last program debugged again at the beginning. If the programis still active it will be forcibly terminated before it is restarted.
Terminate Terminate the program currently being debugged.
Simulate HALT This item will simulate a call to the HALT procedure in the language runtime library.Other forms of terminating a program within the debugger will not likely performthe actions that the HALT procedure performs.
Thread state Display in a dialog all threads currently active in the program, and whether thethread is in a frozen or thawed state. A thread is frozen if the debugger disallowsthe thread from ever running until the thread is thawed. The debugger performs thisaction independent of any code the program has to control a thread. The Thread statedialog provides you mechanisms to freeze and thaw threads.
Debug Menu
Toggle breakpoint Set or remove the breakpoint at the current caret location in the source window.If the breakpoint is set it will be removed. If no breakpoint exists at the locationone will be added.
Breakpoints Open the breakpoints dialog. This dialog lists all breakpoints set in the currentprogram. You can add, modify, enable, disable and remove breakpoints as well as applyspecial conditions to a breakpoint.
Inspect data Open a prompt dialog to enter an expression to view your program data. If the currentcaret location in the source window is at a valid data expression this expressionwill be predefined in the prompt. You may overwrite this default if it is not desired.From this prompt you may display the data expression in a data window or the watchwindow.
Data Expressions
Add to watch window This command is active when a data window is displayed. It takes the selected itemin the data window and places it into the watch window. If the watch window is notcurrently open it will be created.
This is useful if you want to watch a field of a record or anarray element, after viewing the entire data entity.
Watch expressions Open the watch expression dialog. In this dialog you can enter as many data expressionsas you like. These are displayed in the watch window. The watch expressions are alwaysreevaluated every time the debugger is reentered after executing program code.
Memory window The memory window displays memory in a raw hex dump form. You are prompted for anexpression that is used for the address of the memory to display. The memory dumpis displayed in a window which can remain open while tracing your program. The memoryaddress displayed does not change regardless of the original expression entered,but the memory data is updated on each reentry to the debugger from program execution.
Data Expressions
Program parameters You can set the command line parameters the debugged program is given when it isdebugged. These parameters will be used the next time a program is debugged. Anycurrently debugged program will not get these values even if you have never steppedthe program after starting a debug session.
Options Open the debugger options dialog. In this dialog you can specify a search path thatcan be used to find source files. You can set the tab width for displaying sourcefiles, and the case sensitivity of symbol name comparisons.
Display settings Open the display setting dialog. In this dialog you can set the options for the fontsused to display the source and data in the debugger, as well color information fordisplay.
Large Dialogs This menu item when checked will cause a larger font to be used in dialog boxes.This will make the dialogs larger on screen and possibly easier to read. Beware thatthis option could make a dialog too large to fit on your screen resolution.
Show toolbar You can choose to have the debugger display a toolbar with buttons to quickly accessvarious functions. However you may want to debugger to use a bit less screen space,or you only use keyboard command, and you do not want the toolbar. If this menu itemis checked the toolbar will be displayed.
Source window context menu
- Toggle breakpoint
- Set break and edit - Set a breakpoint at the caret location and open the breakpoints dialog with that breakpoint selected. If a breakpoint already exists at the location a new breakpoint is not set but the current breakpoint is used. This menu item make it convenient when you want to set a breakpoint and apply one or more breakpoint conditions to the breakpoint.
- Breakpoint enabled - If a breakpoint exists at the caret location the menu item is checked signifying that the breakpoint is enabled. If a breakpoint exists but is disabled then the menu item is not checked. If no breakpoint exists at the location then the menu item is disabled. By selecting this menu item you toggle the enabled state of the breakpoint in question.
- Inspect data
- Execute to location
- Move execution point to location - This is a very advanced option and most likely should never be used even by advanced users. The current execution location is moved to the caret location. Program code is not executed and therefore the program may not execute properly.
Data window context menu
- Expand contract - Selecting this menu item will expand or contract the structured data item currently selected in the data window. If the selection item is not a structure this item is disabled.
- Alter data - This opens a prompt for you to enter an expression which will be assigned to the selected data item. The debugger performs no type checking and just copies the appropriate number of bytes of actual data to the selected data item.
- Add to watch window - This will add the selected data item to the watch window.
- Set breakpoint on data - This will set a memory breakpoint on the selected data item. Memory breakpoints are triggered when a part of the memory location is written to.
Watch window context menu
- Expand contract - Selecting this menu item will expand or contract the structured data item currently selected in the data window. If the selection item is not a structure this item is disabled.
- Alter data - This opens a prompt for you to enter an expression which will be assigned to the selected data item. The debugger performs no type checking and just copies the appropriate number of bytes of actual data to the selected data item.
- Delete - This will delete the selected data item from the watch window. If you are deleting the last data item in the watch window the watch window will be closed.
- Set breakpoint on data - This will set a memory breakpoint on the selected data item. Memory breakpoints are triggered when a part of the memory location is written to.
Call trace context menu
- Display this location - This will display the selected location in the source window in the current display mode.
- Show local variables - This will display the local variables of the procedure containing the selected location in a window. This window is different than the local variables window which displays the local variables of the current procedure which will likely be the first location listed in the call trace.
© Norman Black, Stony Brook Software. Reproduced with permission.
|