[Top][All Lists]

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

[Octave-bug-tracker] [bug #56860] Debugger can not enter functions decla

From: Rik
Subject: [Octave-bug-tracker] [bug #56860] Debugger can not enter functions declared in scripts
Date: Thu, 5 Sep 2019 12:33:53 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #56860 (project octave):

                Category:                    None => Interpreter            
                Priority:              5 - Normal => 3 - Low                
                  Status:                    None => Confirmed              
                 Release:                   5.1.0 => dev                    
                 Summary: Debugger can not enter functions in scripts =>
Debugger can not enter functions declared in scripts


Follow-up Comment #1:

Confirmed.  I think there might be another bug report about this.

The way Octave parses scripts causes any embedded functions to be treated as
command-line functions.  This is consistent with the notion that scripts are,
in effect, a laundry list of commands that are each executed exactly as if you
had typed them in to the interpreter.

This analogy appears to break down for the case of the debugger because the
file name attribute, which should be blank for a command-line function since
there is no file, appears to be NULL.

I can actually prove this by typing in the commands directly in to the
interpreter.  See the transcript below.

octave:2> 1;
octave:3> function [sum]=add(a,b)
>   sum=a+b;
> endfunction
octave:4> c=4;
octave:5> d=5;
octave:6> result=add(c,d);
octave:7> disp(result);
octave:8> dbstop add
ans =  2
octave:9> result2 = add (c,d);
stopped in add at line 2 [] 
2:   sum=a+b;
debug> dbnext
stopped in add at line 3 [] 
3: endfunction
debug> dbcont

When I am stopped in the debugger the filename (the value between '[' and ']')
is blank, but apparently not NULL.

This issue is pretty obscure so I can't say when any fix might be developed. 
I would simply work around it for now.


Reply to this item at:


  Message sent via Savannah

reply via email to

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