Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 1576

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>3 Ozcar's User Interface</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html#chapter.invoking">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node4.html#chapter.sample">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="chapter.gui"><H1><A name="chapter.gui">3 Ozcar's User Interface</A></H1><P> Ozcar's main window, depicted in <A href="node3.html#picture.initial">Picture&nbsp;3.1</A> as it appears when Ozcar is first invoked, displays a number of views: the Thread Forest View, the Stack View, and the Environment Views. Below these is the Status Line, and Emacs serves as the Source View. In the following, each of these elements of Ozcar's user interface will be described. </P><DIV class="picture" id="picture.initial"><HR><P><A name="picture.initial"></A></P><P></P><DIV align="center"><IMG alt="" src="ozcar-initial.gif"></DIV><P> </P><P class="caption"><STRONG>Picture&nbsp;3.1:</STRONG> The Main Window</P><HR></DIV><P> </P><H2><A name="label5">3.1 Thread Forest View</A></H2><P> The pane on the left, labeled <CODE>Thread Forest</CODE>, gives an overview of all currently attached threads. The fact that every thread has been created by some other thread (its <A name="label6"></A><EM>parent</EM>) defines a tree-shaped relation between threads. The attached threads form a number of partial subtrees of the whole thread hierarchy - this is why we refer to this view as a <A name="label7"></A><EM>thread forest</EM>. The way threads are displayed reflects this tree structure: Children are inserted below their parent and indented to the right. </P><DIV class="apropos"><P class="margin">Thread IDs</P><P> For the purpose of debugging, threads are assigned integer IDs internally. These IDs do not carry any semantic significance and are only used to allow easier recognition of individual threads by the user, as well as to construct the tree representation. Note however that thread IDs need not be unique. In the thread forest, each thread node is depicted by the textual representation of its ID. (In the case of distributed debugging, the remote site's node name and process ID are also included.) </P></DIV><DIV class="apropos"><P class="margin">Thread States</P><P> The color of each node in the thread forest reflects the corresponding thread's state, similar to what the <CODE>Thread<SPAN class="keyword">.</SPAN>state</CODE> operation returns: </P><DL><DT>green: runnable </DT><DD><P>The thread's computation can proceed. </P></DD><DT>yellow: blocked </DT><DD><P>The thread waits for a synchronization condition, i.&nbsp;e., it currently cannot proceed. </P></DD><DT>gray: terminated </DT><DD><P>The thread is dead. </P></DD><DT>red: crashed </DT><DD><P>The thread died of an exception it did not handle. </P></DD></DL><P> </P></DIV><DIV class="apropos"><P class="margin">Stopped Threads</P><P> For the purpose of debugging, thread state actually has an additional dimension, namely whether the thread has currently been stopped by the debugger or not. This is reflected by a normal font (thread is stopped) or a bold font (thread is running), respectively. </P></DIV><DIV class="apropos"><P class="margin">Selected Thread</P><P> If at least one thread is attached, then one thread will always be the <A name="label8"></A><EM>selected thread</EM>; its node is marked with an asterisk. This is the thread that thread actions operate on, and whose information is displayed in the other views. You can select a thread by clicking its node with the left mouse button, or you can navigate in the thread forest using the left and right cursor keys. </P></DIV><H2><A name="label9">3.2 Stack View</A></H2><DIV class="apropos"><P class="margin">Stack Frames</P><P> On the top right, the pane labeled <CODE>Stack</CODE> or <CODE>Stack of Thread</CODE> <I>id</I> displays the stack of the currently selected thread. The <A name="label10"></A><EM>stack</EM> is a sequence of <A name="label11"></A><EM>frames</EM>, where each frame describes a nested construct or procedure activation. The stack provides a trace of how the computation reached its current point of execution; the latter is called the <A name="label12"></A><EM>topmost</EM> frame. </P></DIV><DIV class="apropos"><P class="margin">Stack Display</P><P> The Stack View displays the stack as one line of text per frame, where the first entry corresponds to the oldest activation frame and the last entry to the most recent frame (the <EM>topmost</EM> one). Each line consists of three columns. The first column contains an arrow indicating whether control is at the entry (right arrow) or at the exit of the corresponding nested construct, the second column gives the number of the stack frame, and the third column a description. The description may contain arguments (values), printed in bold face, which can be clicked on for examination with the Inspector. </P></DIV><DIV class="apropos"><P class="margin">Selected Frame</P><P> Some debugging actions refer to specific stack frames. To this purpose, stack frames can be clicked (in a place not displaying a value) to become the <A name="label13"></A><EM>selected frame</EM>. The selected frame is indicated by a blue background. The up and down cursor keys also permit navigation through the stack. </P></DIV><DIV class="apropos"><P class="margin">Disabled Stacks</P><P> When the selected thread is running, its stack is grayed out to indicate that it is out of date, but contained values will still react to clicks. </P></DIV><H2><A name="label14">3.3 Environment Views</A></H2><P> Below the Stack View, there are two panes labeled <CODE>Local Variables</CODE> and <CODE>Global Variables</CODE>, displaying the values of local and global variables of the selected stack frame (or the topmost frame if no frame is selected). The variables of the local environment are sorted by order of introduction in the source code; the global environment is sorted alphabetically. Clicking the values causes them to be inspected. </P><H2><A name="label15">3.4 Status Line</A></H2><P> The Status Line at the bottom of the main window provides feedback about actions performed and the current state of the debugger. </P><H2><A name="label16">3.5 Source View</A></H2><P> The Source View is not located within Ozcar's main window; instead, Emacs is instructed to display the source position corresponding to any selected frame. </P><DIV class="apropos"><P class="margin">Color Coding</P><P> Emacs highlights the line of source code corresponding to the selected frame in a color reflecting the selected thread's state: When the thread is running, highlighting will be done in gray; when it is stopped, in blue; and when the thread died of an exception or stopped at a breakpoint, in red. </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html#chapter.invoking">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node4.html#chapter.sample">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~lorenz/">Benjamin&nbsp;Lorenz</A> and&nbsp;<A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A><BR><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>