octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting Octave to the GUI


From: John W. Eaton
Subject: Re: Connecting Octave to the GUI
Date: Thu, 04 Apr 2013 00:16:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 04/03/2013 11:35 PM, Daniel J Sebald wrote:

I've compiled and I'm coming up to speed on this. I can crash by setting
a breakpoint in a file in the current directory. When the debugger stops
at that point, I then do a "cd ../<someotherdirectory>" then try to
continue. That file has gone out of scope of course.

Let me see if I can reproduce this without the GUI running...

octave:1> cd ../debug
octave:2> dbstop("testfun",3)
ans = 3
octave:3> testfun (4)
stopped in /home/sebald/octave/debug/testfun.m at line 3
3: y = sqrt(x);
debug> cd ../src
debug> dbcont
ans = 2
octave:4>

Nope. Things still seem to run fine via CLI. I'll keep looking at it.

When stepping or continuing, we have to run some code in the Octave
thread, then switch back to the GUI to update the yellow arrow pointer
to the new position in the editor window.

What currently happens is if you type dbstep in the command window is
that the dbstep command is executed in the get_debug_input function,
then get_debug_input returns.  At that point, the
octave_link::exit_debugger_event function is called and a request is
made to remove the yellow pointer from the editor window.  Then
execution of the function that is being debugged continues until the
next breakpoint or, for dbstep, the next statement.  At that point,
control goes back to get_debug_input, and the
octave_link::enter_debugger_event function is called and a request is
made to add the yello pointer in the editor window.

Things a slightly more complicated if the GUI buttons are used because
in order to continue execution of the function that is being debugged,
we have to signal readline to return so that the get_debug_input
function will return and execution of the function that is being
debugged can continue.

In any case, I think I figured out how to use a signal to set the
breakpoint marker.  The attached patch appears to work for me.  Is
this the kind of thing you had in mind?

jwe

Attachment: dbstop-with-signal.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]