Mercurial > hg > octave-nkf
comparison libinterp/octave-value/ov-usr-fcn.cc @ 16596:645672f1c873
handle setting breakpoints in subfunctions in GUI editor
* symtab.h (symbol_table::subfunctions_defined_in_scope): Now public.
* debug.h, debug.cc (bp_table::do_add_breakpoint_1): New function.
(bp_table::do_add_breakpoint): Handle subfunctions.
* ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_code::subfunctions,
octave_user_function::subfunctions): New functions.
* pt-bp.h (tree_breakpoint::get_line): Return 0 if line wasn't found.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 30 Apr 2013 14:32:16 -0400 |
parents | 7ca7e7d5eb91 |
children | 2f8fb02a6c31 |
comparison
equal
deleted
inserted
replaced
16594:3ce0c312a40b | 16596:645672f1c873 |
---|---|
56 #include "ov-fcn-handle.h" | 56 #include "ov-fcn-handle.h" |
57 | 57 |
58 // Whether to optimize subsasgn method calls. | 58 // Whether to optimize subsasgn method calls. |
59 static bool Voptimize_subsasgn_calls = true; | 59 static bool Voptimize_subsasgn_calls = true; |
60 | 60 |
61 | |
62 std::map<std::string, octave_value> | |
63 octave_user_code::subfunctions (void) const | |
64 { | |
65 return std::map<std::string, octave_value> (); | |
66 } | |
67 | |
61 // User defined scripts. | 68 // User defined scripts. |
62 | 69 |
63 DEFINE_OCTAVE_ALLOCATOR (octave_user_script); | 70 DEFINE_OCTAVE_ALLOCATOR (octave_user_script); |
64 | 71 |
65 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_script, | 72 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_script, |
302 | 309 |
303 void | 310 void |
304 octave_user_function::unlock_subfunctions (void) | 311 octave_user_function::unlock_subfunctions (void) |
305 { | 312 { |
306 symbol_table::unlock_subfunctions (local_scope); | 313 symbol_table::unlock_subfunctions (local_scope); |
314 } | |
315 | |
316 std::map<std::string, octave_value> | |
317 octave_user_function::subfunctions (void) const | |
318 { | |
319 return symbol_table::subfunctions_defined_in_scope (local_scope); | |
307 } | 320 } |
308 | 321 |
309 octave_value_list | 322 octave_value_list |
310 octave_user_function::all_va_args (const octave_value_list& args) | 323 octave_user_function::all_va_args (const octave_value_list& args) |
311 { | 324 { |