Sun 17 Jan 2016 09:58:00 PM UTC, comment #5:
@Lachlan: I checked in your change here http://hg.savannah.gnu.org/hgweb/octave/rev/87b3348d8d76. In the log message, unless there is ambiguity, we don't bother to put the extended path to the file name. Thus, I shortened "libinterp/core/symtab.cc" to just "symtab.cc". I'm sorry it takes so long to get used to our coding standards, but you're doing a terrific job. I've checked in 3 patches of yours today and maybe I'll have time for another.
|
Tue 15 Dec 2015 10:33:59 AM UTC, comment #4:
Michael is right that there is a flow problem. It is caused because find_function () calls find_method () which only looks in class_methods, whereas constructors are only put in class_constructors.
The attached patch adds the constructors to class_methods, which fixes the problem. The alternative is to check both class_methods and class_constructors in either find_method or find_function.
(file #35744)
|
Mon 10 Feb 2014 04:46:49 PM UTC, comment #3:
I think there something wrong in the flow. You shouldn't go through line 1011 in symtab.cc, at that point, the class constructor has already been loaded, so you shouldn't need to reload it.
I believe symbol_table::fcn_info::fcn_info_rep::find_method should do something similar to load_class_method, that is checking whether full_name() equals dispatch_type, and if true, look into class_constructors. Or at least something along those lines.
|
Mon 10 Feb 2014 04:36:18 PM UTC, comment #2:
Ugh. I see a bit of what is happening, but no easy way to stop it. When the list of breakpoints is generated (get_breakpoint_list), Octave goes through each breakpoint found to get details such as file name. For ordinary functions this works fine. For class objects, find_method is used which seems to invoke the whole class constructor interface. Eventually the symbol table is updated in line 433 of symtab.cc with
The assignment operator '=' triggers a look at the currently stored octave_value in class_constructors[name]. There is only one reference count to this octave_value and when it is decremented it triggers the destructor for the octave_value. In this case the octave_value is holding a user function reference and part of the destructor for removing a function from Octave is to clear any breakpoints.
So, that's why breakpoints are getting cleared. It does reveal a bit more as well, this is only a problem with the constructor. Setting a breakpoint in a different function of a class works.
|
Mon 10 Feb 2014 04:46:53 AM UTC, comment #1:
Using gdb I stopped the code in the delete_breakpoint routine in pt-stmt.cc. I then executed
And sure enough, the delete_breakpoint routine is called. The backtrace is
|
Fri 10 Jan 2014 04:38:00 PM UTC, original submission:
This came up during the resolution of bug #41126 and is reported here because it is a separate bug.
Breakpoints set in @class files appear to be cleared when dbstatus is used. This has been confirmed on 3.6.4, 3.8.0, and dev branches so it is not new.
A sample session showing the behavior is
|