octave-maintainers
[Top][All Lists]
Advanced

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

Re: Stepping into local functions no longer works


From: Daniel J Sebald
Subject: Re: Stepping into local functions no longer works
Date: Tue, 30 Apr 2013 02:14:55 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 04/30/2013 01:55 AM, John W. Eaton wrote:
On 04/28/2013 03:32 PM, Daniel J Sebald wrote:
On 04/28/2013 01:52 PM, John W. Eaton wrote:

OTOH, there does seem to be a bug in that if I set a breakpoint in the
subfunction and then call the primary function, the debugger does not
stop in the subfunction, even on the first call. I'm not sure why that's
happening, but it seems to be independent of the global initialization.

That's been like that for a while. I noted it here (#5/#6):

https://savannah.gnu.org/patch/?8006

The breakpoint inside the local function can't be removed. But,
set/unset breakpoints elsewhere in the file, and sometimes the set/unset
of breakpoints inside local functions starts working again sort of.
Perhaps it has something to do with the difference between a function
name and a file name.

I suspect the problem is that if you are clicking in the margin of the
editor window inside a subfunction, the editor is using line number
information only to set the breakpoint, then it is looking at the
primary function and not finding the given line number since it is not
in the primary function.

Setting a breakpoint in a subfunction does work with the syntax

dbstop primary_function>sub_function

so it is possible to set a breakpoint.

I guess we need to store some additional information so we can find the
function that corresponds to a given line number in a file. Given that,
setting the breakpoint should be fairly easy.

OK, I didn't know dbstop works that way. But I see now. Visually one can tell the sub_function, but for the editor to figure that out isn't so easy. Keep in mind the editor window contents could be modified. Maybe the subfunction boundary is a case where an invisible marker could be used.

Dan


reply via email to

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