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.