[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:09:41 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 |
URL:
<http://savannah.gnu.org/bugs/?40397>
Summary: Scope is not changed with dbup / dbdown in debug
mode
Project: GNU Octave
Submitted by: mappel
Submitted on: Mon 28 Oct 2013 06:09:40 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
current tip (17780:8b353af4a1ca), built on Ubuntu 12.04.
When moving up and down the stack in debug mode, the variable scope is not
properly changed. 'whos' lists the right scope, but debug commands are always
executed at the lowest level.
Minimal example:
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/
- [Octave-bug-tracker] [bug #40397] Scope is not changed with dbup / dbdown in debug mode,
Markus Appel <=