This chapter gives a complete description of all the menus Ozcar provides.
The main menu is located on the top of Ozcar's main window.
-
Pops up an info box containing author and compilation information
-
Closes the internal Ozcar object. Use this menu entry only if Ozcar hangs, as all information about currently attached threads gets lost.
-
Closes the main window, sets the mozart emulator to non debug mode, and causes the compiler to generate non debug code. Information about currently attached threads is preserved.
-
Do exactly one step (stop again at the next step point, enter procedures). Identical to pressing the
button.
-
Do one step, jump over procedures or other blocks which constitute a step point. Identical to pressing the
button.
-
Continue execution until the marked stack frame is about to be removed from the stack, or until the stack is empty if no frame is marked. Identical to pressing the
button.
-
Stop the current thread at the next step point it reaches. Identical to pressing the
button.
This menu contains some useful entries to detach one or more attached threads:
-
Detach the current thread. Identical to pressing the
button.
-
Leave the current thread alone in Ozcar's thread forest. Detach all the others, let them continue to run (if they are not dead).
-
Detach all threads, let them continue to run (if they are not dead).
-
Detach all dead threads.
This menu contains some useful entries to detach and kill one or more attached threads:
-
Detach and kill the current thread. Identical to pressing the
button.
-
Leave the current thread alone in Ozcar's thread forest. Detach and kill all the others.
-
Detach and kill all threads.
-
Select the thread which is located above the currently selected thread in the thread view. If the current thread is the first thread in the thread view, the last thread (at the bottom) is selected.
-
Select the thread which is located below the currently selected thread in the thread view. If the current thread is the last thread in the thread view, the first thread (at the top) is selected.
-
Print some useful information about the currently attached threads, for example: 2 attached threads, currently selected: 58/1 (stopped, runnable). The first part of the information is obvious. The two numbers associated with the selected thread are the thread id and the parent thread id. In parentheses, information is given if the selected thread is stopped or running, and if it is runnable, blocked or terminated.
-
Select the previous stack frame (if it exists) of the currently selected thread. Note that the stack grows to the bottom of the window, so you will reach an older frame.
-
Select the next stack frame (if it exists) of the currently selected thread; you will reach a younger frame.
-
Update the stack view. You may see special, compiler-generated stack frames then, as well as some variables (which have been bound in the meanwhile) appear with their value instead of an underscore. (There is no automatic update which forces the stack view to display a variable's value as soon as it becomes known.)
-
Immediately re-calculates and re-displays the environment of the selected stack frame.
-
Opens a dialog box where (small) statements can be executed or (small) expressions can be evaluated in the context of the currently selected stack frame. If the computation needs some more time, you see a spinner turning around until the computation ends. If it does never end (for instance because of a blocking thread), use the Reset button to cancel the operation.
In this menu you can determine how to display values in the stack and variable windows. There is a short form which only prints type information, and a long form which prints the actual value (up to a given print width/depth, which can be set in the Preferences dialog box, see below).
-
This is the default setting. You just see type information, which leads to a very compact display style.
-
You see the actual value, using the function Value.toVirtualString
. This display mode can be quite unhandy if the values to be printed are large tuples or records. So you should carefully adjust the print depth and print width to your needs.
-
If turned off there are no bars printed within Emacs, so you don't get any position information.
-
If you debug threads with huge environments, it may be a good idea to turn of the auto update of the environment (re-calculation and re-display every time you make a step) in order to save time and memory. While the variables display is not up to date, it is printed in grey. You can always request the newest environment information by pressing 'v' (see above, function 'Update Env').
-
Opens a dialog box to adjust some self explanatory options. For example you can adjust the print width/depth of values in the stack and variable windows.
This menu is located on the right side of the button bar, below the menu bar. You can select the mode how child threads of already attached threads should be treated.
-
They will not be attached at all (but can silently run of course).
-
They are attached and immediately stopped.
-
They are attached and the command 'Unleash 0' is executed. This gives you a good feeling about the dependencies between all your threads in a concurrent application. They are already dead (if they do not block somewhere), but are still printed in the thread view.
-
They are attached and the command 'Unleash 1' is executed. This makes it possible to even explore the environment of every child thread just before it terminates.
This menu is located on the right side of the button bar, right beside the SubThreads menu. You can select the mode how a thread which is born by setting up an Emacs query is treated by Ozcar.
-
It is not attached, neither are any of its subthreads (except, of course, they run into a breakpoint).
-
It is attached and immediately stopped.