bugGNU Octave - Bugs: bug #41506, dbstack name field should not...

 
 

bug #41506: dbstack name field should not include filename

Submitter:  Felipe G. Nievinski <fgnievinski>
Submitted:  Fri 07 Feb 2014 10:00:13 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
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
   

Sun 09 Feb 2014 02:55:50 AM UTC, comment #4: 

Thanks!

Felipe G. Nievinski <fgnievinski>
Sat 08 Feb 2014 10:45:50 PM UTC, comment #3: 

I fixed this on the development branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/96a495813047).

Rik <rik5>
Group administrator
Sat 08 Feb 2014 08:37:11 PM UTC, comment #2: 

the filename is blah.m.

the subfunction can be readily found as per dbstack "file" field followed by the "name" field.  currently they values are set as file:"blah", name:"blah>blah2".  I'm proposing to remove the redundancy and have just file:"blah", name:"blah2".

I run into this Matlab incompatibility trying to obtain the caller function's name.

Felipe G. Nievinski <fgnievinski>
Sat 08 Feb 2014 04:30:02 AM UTC, comment #1: 

What is the name of the actual file in which the code resides?  The '>' is the subfunction indicator which means that 'blah>blah2' just indicates that it is the subfunction blah2 located in the file blah.m (See help for "filemarker")

This can be important because subfunctions don't have the same name as the file in which they are located and would be nearly impossible to find without the extra information.

Rik <rik5>
Group administrator
Fri 07 Feb 2014 10:00:13 PM UTC, original submission:  

calling function blah below should yield just "blah2"; it's yielding "blah>blah2" instead.


function blah ()
  blah2 ()
end

function blah2 ()
  getfield(dbstack(), 'name')
end


Felipe G. Nievinski <fgnievinski>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by fgnievinski (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-08 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code