diff libinterp/parse-tree/bp-table.cc @ 26975:de826e69a5ea

make breakpoints in classdef methods work (bug #45404, bug #46451) * bp-table.h, bp-table.cc (bp_table::add_breakpoint): New argument, CLASS_NAME. Change all uses. Pass class name on to tree_evaluator::get_user_code. * cdef-class.h, cdef-class.cc (cdef_class::get_method, cdef_class::cdef_class_rep::get_method): New functions. * cdef-manager.h, cdef-manager.cc (cdef_manager::find_method): New function. * pt-eval.h, pt-eval.cc (tree_evaluator::get_user_code): New argument, CLASS_NAME. If given class name, look for classdef methods.
author John W. Eaton <jwe@octave.org>
date Tue, 26 Mar 2019 02:42:38 +0000
parents 6e50f1fedeb5
children 711f23332204
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.cc	Mon Mar 25 13:59:41 2019 -0700
+++ b/libinterp/parse-tree/bp-table.cc	Tue Mar 26 02:42:38 2019 +0000
@@ -581,10 +581,11 @@
   // Given file name fname, find the subfunction at line and create
   // a breakpoint there.  Put the system into debug_mode.
   bp_table::intmap bp_table::add_breakpoint (const std::string& fname,
+                                             const std::string& class_name,
                                              const bp_table::intmap& line,
                                              const std::string& condition)
   {
-    octave_user_code *main_fcn = m_evaluator.get_user_code (fname);
+    octave_user_code *main_fcn = m_evaluator.get_user_code (fname, class_name);
 
     if (! main_fcn)
       error ("add_breakpoint: unable to find function '%s'\n", fname.c_str ());