octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54231] GUI attempts to open file for function


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #54231] GUI attempts to open file for function declared at top-level
Date: Mon, 9 Jul 2018 18:50:35 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #18, bug #54231 (project octave):

@Rik: Ah, the myfunc() example is a case where there is no file, so the line
number is a reference to the offset into the function definition itself.  In
the ggg() example, I'm remembering that the line number was 4 which is the
number of the file line.  The number of the ggg() start offset would be 2.  So
ggg() only has "scope" during the execution stage, for otherwise when not in
scope it could be ggg() originating from any number of script files.  

If not in debug mode, placing a breakpoint in the middle of ggg() in
yourtest.m results in


>> dbstatus
breakpoint in yourtest at line 4


So that ggg() function is not resolved until the execution stage.  But when it
is resolved in this case, the information we are told is somewhat incorrect. 
Either it should be saying


debug> dbwhere
stopped in yourtest at line 4 [/home/sebald/matlab/bug/54231/yourtest.m]


or


debug> dbwhere
stopped in ggg at line 2


Ideally for this case, it would seem that


debug> dbwhere
stopped in ggg [/home/sebald/matlab/bug/54231/yourtest.m] at line 4


where the line 4 is referenced to the yourtest.m file is the most useful. 
That way the editor can figure out where to put the yellow arrow easily.  If
the routine were to report "ggg at line 2", the editor would have to go
through the code and figure out at which line ggg starts.  Or perhaps both
pieces of information should be displayed, e.g.,


debug> dbwhere
stopped in ggg at line 2 [/home/sebald/matlab/bug/54231/yourtest.m at line 4]



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54231>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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