octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50312] debug: combining dbstep and dblist


From: Rik
Subject: [Octave-bug-tracker] [bug #50312] debug: combining dbstep and dblist
Date: Thu, 16 Feb 2017 12:24:19 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #50312 (project octave):

                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 3 - Low                

    _______________________________________________________

Follow-up Comment #2:

Changing the priority to Low.  The debug path is only occasionally used so it
makes more sense to spend time fixing bugs on the default execution path.  And
there is an easy workaround of using just one dbnext command per line.

When it comes to debugging this, the issue is the dbnext command itself.  It
wants to stop after every single command execution.  

For example,


octave:1> dbstop test 3
ans =  3
octave:2> test
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 3
3: disp 'hello world 3';
hello world 1
hello world 2
debug> dbnext; sin (1)
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 1
1: disp 'hello world 1';
debug> dbnext
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 4
4: disp 'hello world 4';
ans =  0.84147
hello world 3


As you can see, the debugger stops in the middle of the pipeline "cmd1; cmd2".
 If I use dbnext once more in this intermediate context then it executes cmd2
(sin (1)) and then line 3 from the script.

Obviously the Octave parser is confused about what stack frame it is located
in.  If I use the command "dbnext; dbnext" you might think that from the
example above it would halt after the first "dbnext", and that typing "dbnext"
would cause it to execute the second half.  Instead, there is as an error
issued.


octave:3> test
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 3
3: disp 'hello world 3';
hello world 1
hello world 2
debug> dbnext; dbnext
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 1
1: disp 'hello world 1';
debug> dbnext
error: dbstep: can only be called in debug mode
error: called from
    test at line 1 column 9
stopped in /home/rik/wip/Projects_Mine/octave-dev/test.m at line 4
4: disp 'hello world 4';
hello world 3




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50312>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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