Mercurial > octave
changeset 32473:7bd4d95bcb7a
Silence remove_all_breakpoints during out_of_date_check (bug #64849).
* libinterp/parse-tree/bp-table.cc (user_code_provider::user_code_provider):
Add option to silence error.
(bp_table::remove_all_breakpoints_from_function): Do not ignore silent flag.
The function is called by out_of_date_check when a function is shadowed.
Removing breakpoints would fail, e.g., if the shadowing function is compiled.
No error should be emitted in that case.
author | Peter Konowski <konowskipeter@gmail.com> |
---|---|
date | Sun, 12 Nov 2023 06:20:10 +0100 |
parents | b5e433b52bc3 |
children | dbd61008ed75 |
files | libinterp/parse-tree/bp-table.cc |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.cc Mon Nov 13 16:58:52 2023 +0100 +++ b/libinterp/parse-tree/bp-table.cc Sun Nov 12 06:20:10 2023 +0100 @@ -691,7 +691,8 @@ class user_code_provider { public: - user_code_provider (const std::string& fcn_ident, octave_user_code* pfcn) + user_code_provider (const std::string& fcn_ident, octave_user_code* pfcn, + bool silent = false) : m_fcn (nullptr), m_is_valid (false) { m_fcn = pfcn; @@ -716,7 +717,7 @@ m_is_valid = m_cls.ok () && (m_cls.get_name () == class_name); if (m_is_valid) populate_function_cache (); - else + else if (! silent) error ("add_breakpoints_in_function: unable to find function '%s'\n", fcn_ident.c_str ()); @@ -1024,7 +1025,7 @@ bp_lines retval; octave_user_code *fcn = m_evaluator.get_user_code (fcn_ident); - user_code_provider user_code (fcn_ident, fcn); + user_code_provider user_code (fcn_ident, fcn, silent); if (user_code.is_valid ()) {