diff libinterp/octave-value/cdef-class.h @ 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 fbb318c371db
children 396d17dcfb9f
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.h	Mon Mar 25 13:59:41 2019 -0700
+++ b/libinterp/octave-value/cdef-class.h	Tue Mar 26 02:42:38 2019 +0000
@@ -112,6 +112,8 @@
         return (type == '(' || type == '.');
       }
 
+      octave_value get_method (const std::string& name) const;
+
       octave_value construct (const octave_value_list& args);
 
       cdef_object construct_object (const octave_value_list& args);
@@ -335,6 +337,11 @@
     make_meta_class (interpreter& interp, tree_classdef *t,
                      bool is_at_folder = false);
 
+    octave_value get_method (const std::string& nm) const
+    {
+      return get_rep ()->get_method (nm);
+    }
+
     octave_function * get_method_function (const std::string& nm);
 
     octave_function * get_constructor_function (void)