[Changeset] Re: Q: Low hanging fruit?
David Bateman
adb014 at gmail.com
Tue May 13 14:23:30 CDT 2008
David Bateman wrote:
> John W. Eaton wrote:
>> Instead of adding ad-hoc parsing to the get_user_input function, I
>> think it would be better to make dbstep a normal function that
>> examines its arguments and sets some global variables that are used by
>> the get_user_input function. Is that possible?
> Maybe, I can try it that way instead..
>> It might also be
>> worth trying to use the normal parse/eval loop instead of eval_string
>> so that we can accept multiple line input in debug mode.
>>
> This would be great as one of the nice features of the matlab debugger
> is that when you go into the debug mode you can cut and paste directly
> to piece of suspect code at the debug prompt and test it, whereas with
> Octave you have to convert it to a single line before pasting it.
> However, I'm not sure I see how that should be done. Do we stay in
> get_user_input as at present and call the parser from there, or are we
> in the main parser loop with the some flag set that causes us to
> fallback into get_user_input from the MAYBE_DO_BREAKPOINT macro? I'd
> rather not implement this at this point personally.
>
> D.
>
>
Ok then what about the attached instead. It moves
* dbcont, dbnext, dbstep functions to DEFCMD's
* adds the dbquit function
* modifies the dbstep command to be compatible
* splits get_user_input into two versions, with the debug version using
the standard parser and thus allowing multi-line input and things like
"x = 1; return" in the debug mode to work.
* Makes the quit, exit commands at the debug prompt quit Octave in the
same manner as in Matlab.
* Updates the debug.txi file.
Making the debug mode accept multi-line input was much easier than I
thought it would be. I've tested this a little, but a little more
testing might be a good thing.
Cheers
David
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch8081
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080513/c2df8bdf/attachment.ksh
More information about the Octave-maintainers
mailing list