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

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

[Octave-bug-tracker] [bug #40397] Scope is not changed with dbup / dbdow


From: Markus Appel
Subject: [Octave-bug-tracker] [bug #40397] Scope is not changed with dbup / dbdown in debug mode
Date: Mon, 28 Oct 2013 18:15:35 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

Follow-up Comment #1, bug #40397 (project octave):

Sorry, I messed up the markup for the web version, here is the example again
(why is there no preview button...):

function functionA ()
 whereami = "functionA";
 A = 66;
 functionB();
endfunction

function functionB ()
 whereami = "functionB";
 B = 99;
 error("Debug here");
endfunction

Debugging the error:

octave-gui:7> debug_on_error(true);
octave-gui:8> functionA
error: Debug here
error: called from
    functionB at line 4 column 2
    functionA at line 4 column 2
stopped in functionB
debug> whereami
whereami = functionB
debug> dbup
stopped in functionB at line 4
debug> dbup
stopped in functionA at line 4
debug> whereami
whereami = functionB
debug> whos
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  ===== 
        A             1x1                          8  double
        whereami      1x9                          9  char

Total is 10 elements using 17 bytes

debug> A
error: 'A' undefined near line 1 column 1
debug> NEW=666
NEW =  666
debug> whos
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  ===== 
        A             1x1                          8  double
        whereami      1x9                          9  char

Total is 10 elements using 17 bytes

debug> dbdown
stopped in functionB at line 4
debug> whos
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  ===== 
        B             1x1                          8  double
        NEW           1x1                          8  double
        whereami      1x9                          9  char

Total is 11 elements using 25 bytes


Additional minor problem: dbup needs two bumps to move up the stack from the
lowest level when stopped due to an error, but only one when stopped with
"keyboard". I think this has been like this for a long time, but the scope
problem is new (to me). 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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