Charles.Forsyth20060303-partialeea662d19 years agoHistory
172 lines · 5.8 KB · Text
RawDownload
.TH DEB 1.SH NAMEdeb \- graphical Limbo debugger.SH SYNOPSIS.B wm/deb.RB [ -f.IR file ].RB [ -p.IR pid ].SH DESCRIPTION.B Wm/debdisplays two windows, the main debugging window anda stack window for browsing the data values of the threadcurrently being debugged..PPDebugging is performed using the facilities of the.B progdevice bound to the local.B /progdirectory (see.IR prog (3)).Debugging of code running on a remote machine can be performed bybinding the remote.B /progdirectory in place of the local one. (See.IR bind (1))..PPIn order to display source code and set breakpoints accurately, an up to datesymbol file.RB ( .sbl )must be available as well as the limbo source file.RB ( .b )..SS "Main window"The main window is comprised of a menu bar, an icon bar and three text panels.One panel, labelled.IR Threads ,lists the process IDs (PIDs) of the threads being debugged.Another panel, labelled.IR Break ,lists the set of breakpoints, each given a unique number.The third and largest panel displays the source code of the thread being debugged..PPBreakpoint positions are shown by red text in the source code display.Clicking on a breakpoint number in the.I Breakpanel results in the source code panel being scrolled or updated to showthe breakpoint.Breakpoints are toggled by clicking on the statement or sub-expression in the sourcecode window and clicking the breakpointbutton on the icon bar.A breakpoint can be hit by any of the threads being debugged -breakpoints are set on source code, not on individual threads..PPClicking on a PID in the.I Threadspanel results in the source code panel being scrolled or updated to highlightwhere in the code the thread is blocked, broken or halted on a breakpoint..PPA running thread can be halted by clicking the stop button on the icon bar.A thread will also halt when it hits a breakpoint.Once a thread is halted (not blocked or broken) its execution can be advanceda step at a time by means of thebuttons on the icon bar.The thread can be stepped one operation at a time or a statement at a time.Normally when single stepping, function calls are stepped into.Stepping commands allow for stepping over function calls, whereby the function is stillcalled but its whole execution is treated as a single step.Stepping out of a function is also provided, whereby execution continues unabateduntil returning from the function.Execution of the halted thread can be continued, running until it terminates, breaksor hits another breakpoint..PPAny of the threads being debugged can be killed or detached from the debuggerusing buttons on the icon bar.Detaching a halted thread resumes its execution..PPThe main window provides a set of menus for viewing source files, attaching toother threads, setting debugger options and searching for text in the source code window..SS "Stack Window"The stack window is used to inspect the values of local and global variables and functionarguments.Items are displayed in a hierarchical manner.Any item that contains other items, such as a variable of an ADT type, can be expandedto show the values of the sub-items.The sub-items are displayed by clicking on the expand button on the left of thecontaining item, they can be hidden by pressing the button again.The sub-item list is displayed indented from its container as a visual cue to theirassociation..PPThe stack window shows the full stack trace of the current thread.The stack trace is displayed as a list of frames, the current frame displayedat the top of the window.Each frame is given by the function name and source location of the code beingexecuted in the frame.Each frame has the following sub-items:.TP 10.B localsLocal variables declared in the function of the frame..TP.B argsThe arguments passed to the frame function..TP.B moduleThe module global variables in the implementation moduleof the frame function..PPClicking on the name of a variable or function argument highlights the declaration ofthat name in the source panel of the main debug window.Clicking on the function name of a stack frame causes the main window source panel todisplay the current statement of the frame..PPThe debugger has a stack button which simply bringsthat window to the front of the display..PPThe options menu has a layout configuration whichallows the user to have a horizontal scroll bar or to wrap longlines (the default); and an option to strip carriage return characters that precede newlines (for the benefit of those using Windows' editors).The state of the options is saved in the file.BI /usr/ username /lib/debif that file can be created. The debugger attempts to readthis file on startup to set the user's preferred options..SH OPTIONS.TP 10.BI -f " file"Specifies a source file.RB ( .b )to load.The associated executable file.RB ( .dis )is not launched until the continue.RI ( "run to breakpoint" )button is pressed.This option takes precedence over the.B -poption..TP.BI -p " pid"Attach to the already running thread given by.IR pid ..SH PLUMBING.B wm/debplumbs the address of text selected usingbutton 3 in the source display panel, as.B textof the form.IP.IB "file-name" : "line-number".SH FILES.BI /prog/ n /*.br.BI /usr/ username /lib/deb.SH SOURCE.B /appl/wm/deb.b.br.B /appl/wm/debdata.b.br.B /appl/wm/debsrc.b.SH "SEE ALSO".IR limbo (1),.IR prog (3).SH BUGSDisplaying large arrays in the Stack window can use excessive amounts ofmemory..PPWhen setting breakpoints there is no visual cue for the selected statement or operation untilthe breakpoint is actually set..PPIt is only possible to debug modules executed by the interpreter.Code that has been JITed, the compilation execution method, yieldsstack information that does not correspond to information in the symbol.RB ( .sbl )file.