From 5711785d6b981a2fb7a4aad7df1a87cd3adc76d2 Mon Sep 17 00:00:00 2001 From: Torsten Lilge Date: Sun, 1 Dec 2024 16:26:40 +0100 Subject: [PATCH] fix @@cl/@cl/mtd.m error when setting breakpoints in class methods in GUI * bp-table.cc (add_breakpoint_in_file, add_breakpoints_in_file): prepend string @classname/ to function name only if not already included --- libinterp/parse-tree/bp-table.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libinterp/parse-tree/bp-table.cc b/libinterp/parse-tree/bp-table.cc index 4032c65f4f..57431d3b47 100644 --- a/libinterp/parse-tree/bp-table.cc +++ b/libinterp/parse-tree/bp-table.cc @@ -951,7 +951,7 @@ bp_table::add_breakpoint_in_file (const std::string& file, return 0; std::string fcn_ident; - if (info.class_name ().empty ()) + if (info.class_name ().empty () || info.fcn ()[0] == '@') fcn_ident = info.fcn (); else fcn_ident = "@" + info.class_name () + "/" + info.fcn (); @@ -973,7 +973,7 @@ bp_table::add_breakpoints_in_file (const std::string& file, return bp_lines (); std::string fcn_ident; - if (info.class_name ().empty ()) + if (info.class_name ().empty () || info.fcn ()[0] == '@') fcn_ident = info.fcn (); else fcn_ident = "@" + info.class_name () + "/" + info.fcn ();