[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker
From: |
John Swensen |
Subject: |
[Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker |
Date: |
Mon, 19 Jul 2010 18:28:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6 |
URL:
<http://savannah.gnu.org/bugs/?30490>
Summary: Error in breakpoint tree walker
Project: GNU Octave
Submitted by: jpswensen
Submitted on: Mon 19 Jul 2010 06:28:13 PM GMT
Category: Libraries
Severity: 3 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: jpswensen
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
I don't understand how the tree walkers work and how the parsed m files are
stored internally in Octave, so maybe this is expected behavior. I have
attached two sample scripts. One contains a simple assignment and the other
contains assignments within an if..else..end statement. I have placed the
results of setting breakpoints with dbstop() and querying for breakpoints with
dbstatus(). Unfortunately, in the example with the if..else..end statements
the breakpoints are set, but are not reported through dbstatus(). To try and
chase down the problem, there are a lot of my own debug statements I inserted
into debug.cc.
### Example with a test with if statements
octave:1> zz = dbstop('testwithifs',0)
zz = 3
octave:2> dbstatus('testwithifs')
Match: testwithifs
SList (0): testwithifs
****Comparisons - (==):1 (.strcmp): 1
Processing function: testwithifs
Num breakpoints: 0
Number of breakpoints: 0
octave:3> testwithifs(100,10)
stopped in /home/jpswensen/src/octave/src/testwithifs.m at line 3
3: if a == 100.0
debug> dbcont
ans = 100
octave:4>
### Example with no if statements
octave:1> zz = dbstop('testnoifs',0)
zz = 3
octave:2> dbstatus('testnoifs')
Match: testnoifs
SList (0): testnoifs
****Comparisons - (==):1 (.strcmp): 1
Processing function: testnoifs
Num breakpoints: 1
Processing breakpoints: testnoifs
****Processing breakpoint: 3
Number of breakpoints: 1
Breakpoint in testnoifs at line(s) 3.
octave:3> testnoifs(100,10)
stopped in /home/jpswensen/src/octave/src/testnoifs.m at line 3
3: a = b*100;
debug> dbcont
ans = 10000
octave:4>
The problem appears to be in do_get_breakpoint_list() in the following two
lines:
octave_value_list bkpts = cmds->list_breakpoints ();
octave_idx_type len = bkpts.length ();
When breakpoints are placed on a line containing an if/else statement, it
doesn't appear in this list of breakpoints even though (as can be seen from
the output above) it is clearly being stored as a breakpoint and hit when the
line is reached.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 19 Jul 2010 06:28:13 PM GMT Name: testnoifs.m Size: 38B By:
jpswensen
<http://savannah.gnu.org/bugs/download.php?file_id=21012>
-------------------------------------------------------
Date: Mon 19 Jul 2010 06:28:13 PM GMT Name: testwithifs.m Size: 75B By:
jpswensen
<http://savannah.gnu.org/bugs/download.php?file_id=21013>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30490>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker,
John Swensen <=
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John Swensen, 2010/07/23
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John W. Eaton, 2010/07/29
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, anonymous, 2010/07/29
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John W. Eaton, 2010/07/30
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, anonymous, 2010/07/30
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John W. Eaton, 2010/07/30
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John W. Eaton, 2010/07/30
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John Swensen, 2010/07/30
- [Octave-bug-tracker] [bug #30490] Error in breakpoint tree walker, John W. Eaton, 2010/07/30