Skip to content

Commit

Permalink
fix @@cl/@cl/mtd.m error when setting breakpoints in class methods in…
Browse files Browse the repository at this point in the history
… GUI

* bp-table.cc (add_breakpoint_in_file, add_breakpoints_in_file):
  prepend string @classname/ to function name only if not already
  included
  • Loading branch information
ttl-octave committed Dec 1, 2024
1 parent 7eafc8a commit 5711785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libinterp/parse-tree/bp-table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand All @@ -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 ();
Expand Down

0 comments on commit 5711785

Please sign in to comment.