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

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

[Octave-bug-tracker] [bug #47917] dbstop skips nested functions


From: Rik
Subject: [Octave-bug-tracker] [bug #47917] dbstop skips nested functions
Date: Fri, 20 May 2016 18:11:30 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #7, bug #47917 (project octave):

@Lachlan: I applied both of your patches.  On the second patch, I changed
"FIXME --" to "FIXME:" since that is what we use.  I also changed the comments
which referred to the old variable line so that they refer to the new variable
lineno.

This may be reaching, but is there a way to set a debug point within a nested
function of a subfunction using a string syntax?

For ordinary subfunctions, you can use the expression


dbstop in main_fcn>subfunction


to have the interpreter stop at the first line of the subfunction.  Consider
the m-file a.m which is attached.


function a

  function b
    x = 1;
  end
  y = 1;

end

function c
  z = 1;

  function d
    w = 2;
  end

end


Within Octave the following all work:


dbstop in a        % main function
dbstop in a>b      % nested function within main function
dbstop in a>c      % subfunction of main function


However, I can't set a breakpoint on function d, a nested function of a
subfunction.


octave:4> dbstop in a>d
error: add_breakpoint: unable to find function 'a>d'
octave:4> dbstop in a>c>d
error: add_breakpoint: unable to find function 'a>c>d'


The first thing to test is whether Matlab allows this.  If it doesn't then at
least we are compatible and can set the breakpoint using a line number.


(file #37214)
    _______________________________________________________

Additional Item Attachment:

File name: a.m                            Size:0 KB


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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