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


bug #41506: dbstack name field should not include filename

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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


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>
Project 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>
Project 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 ()

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

Felipe G. Nievinski <fgnievinski>


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

Attach Files:

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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project 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.6