Re: [Objectscript-users] command line debugger
Brought to you by:
rob_d_clark
From: Lysander D. <sa...@sb...> - 2005-12-06 18:08:34
|
Thanks for checking in dbg.os. 'import "reflection.os";' is not necessary. It refers to the reflection.os file from the user guide so that I could use the 'listobj' function to list the methods and attributes of objects. The patch extends the Breakpoint interface to allow breakpoints to provide the current stack frame( getCurrentStackFrame ), the parent stack frame ( getParentStackFrame ) and whether or not it is a next breakpoint ( isNextBreakpoint ). Then handle is modified to call isNextBreakpoint. If isNextBreakpoint returns false, then the step breakpoint is handled as normal. If isNextBreakpoint is true, and the current stack frame or parent stack frame matches the current stack frame, the breakpoint is handled. Otherwise the stepBp is left unchanged to be added back to the breakpont stack. Additionally _inNextBreakpointStackFrame can be removed since it isn't used ( I thought determining if it is in the next stack frame would be a little more involved ) --- Rob Clark <ro...@ti...> wrote: > I've checked in dbg.os, and added a "-b <file> > <line>" command-line > option to set a breakpoint from the command-line... > see revision 1881 > > btw, in dbg.os, what is the 'import > "reflection.os";'.... I've had a > brief look thru dbg.os, and it didn't look like it > was using any > functions not defined in the same file, but thought > I should double > check to make sure that nothing is missing. > > I still need to look at the patch file to understand > the changes... > hopefully I'll get some time to have a closer look > tomorrow. > > > On Nov 26, 2005, at 10:54 PM, Lysander David wrote: > > > Hi Rob, > > > > I have made some modifications to the previous > dbg.os > > you previously posted. Here is the help > > for it: > > > > objectsript command line debugger help > > > > continue - continue execution ( synonym "c" ) > > step - single step ( synonym "s" ) > > next - Next, steps over subs ( synonym "n" ) > > where - stack trace ( synonym "T" ) > > up - change context to higher stack frame ( > synonym > > "u" ) > > down - change context to lower stack frame ( > synonym > > "d" ) > > list [file][:[line][:length]] - list the [file] at > > [line] with [length] number of lines > > b [[file][:line]] - set a breakpoint. If [file] is > not > > specified, a breakpoint is set at the curent debug > > stack frame > > b list - list breakpoints > > d index - delete breakpoint at specified > breakpoint > > index > > help - this message ( synonym "h" ) > > exit - exit debugging session ( synonym "x", > "quit", > > "q") > > > > > > Aside from the os file, some changes in > > Debugger.java were necessary in order to get > > the "next" command to work ( see included patch > > "debugger.pat" ). > > > > I realize that a lot of it is kind of hacky but > > hopfully you can indicate what changes should be > > made so that it can eventually be included as a > part > > of > > the objectscritpt distribution. > > > > ( Two things I can think of offhand are > > 1. add a command line flag to add a step > > breakpoint so that it will not > > be necessary to modify os code to get the > > first breakpoint > > 2. add a return command to continue until > > the current function returns. > > ) > > > > By the way, is an emacs mode for javascript > available > > ? > > > > Thanks, > > Lysander > > <dbg.os> > > <debugger.pat> > > > ____________________ > CONTACT INFORMATION: > email: ro...@ti... > IM: rob@sandjabber > desk: 1 858 552 2946 > cell: 1 619 300 9661 > > > > |