bugGNU Octave - Bugs: bug #38556, dbwhere pointer is not updated...

 
 

bug #38556: dbwhere pointer is not updated during if/elseif or switch statements

Submitter:  Rik <rik5>
Submitted:  Wed 20 Mar 2013 05:24:46 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 25 Mar 2013 11:22:10 PM UTC, comment #5: 

Okay, now things seem back to normal with debugging.  Closing this report again.

Rik <rik5>
Group administrator
Mon 25 Mar 2013 10:58:00 PM UTC, comment #4: 

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/66330c7f6990

but I screwed up the commit message.  It was supposed to be:


set breakpoint on if command list, not if command itself

* pt-bp.cc (tree_breakpoint::visit_if_command): Only process list;
don't set breakpoint on if command itself.


John W. Eaton <jwe>
Group administrator
Fri 22 Mar 2013 03:32:46 PM UTC, comment #3: 

Oops, I closed this too soon.  The dbwhere pointer is succesfully updated.  But, I now find that certain breakpoints are not hit.

One example is:


dbstop hist
ans =  75
dbstatus
breakpoint in hist at line 75.
hist (1)


The hist command runs without hitting the breakpoint that was set.

Rik <rik5>
Group administrator
Thu 21 Mar 2013 10:00:55 PM UTC, comment #2: 

Everything appears to work well now.  I'm closing this report.

Rik <rik5>
Group administrator
Thu 21 Mar 2013 08:32:45 PM UTC, comment #1: 
John W. Eaton <jwe>
Group administrator
Wed 20 Mar 2013 05:24:46 PM UTC, original submission:  

The current line being executed during debugging is available by calling dbwhere() and is also printed out at the debug prompt.  The line number is not accurate if the statement being debugged is an "if" or "switch" statement.  Instead of advancing to the next branch of an if/elseif tree the pointer remains stuck at the first line containing the "if" statement.  A similar thing happens with switch statements where the pointer remains stuck at the line containing the "switch" statement and each dbnext causes the next "case" to be evaluated.

Sample code uses the attached dbgtst.m file.

Example:


dbstop dbgtst
dbgtst (1,5,10)
dbnext
<RETURN> as many times as necessary to step through the code
         and monitor the current line being debugged.



Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27638:  dbgtst.m added by rik5 (920B - text/x-octave)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-25 rik5 Open/ClosedOpen Closed
    2013-03-22 rik5 Open/ClosedClosed Open
    2013-03-21 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2013-03-20 rik5 Attached File- Added dbgtst.m, #27638

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code