Mercurial > octave
diff libinterp/parse-tree/pt-stmt.h @ 29457:313b8b897733
revamp handling of breakpoint line positions
Use set<int> instead of map<int,int> since we don't assign number IDs
to breakpoints, we just use line numbers. Allow breakpoint functions
to accept individual line number arguments. Simplify iteration over
sets of breakpoint lines.
* debug.cc (bp_lines_to_ov): Rename from intmap_to_ov.
* bp-table.h, bp-table.cc (bp_table::bp_lines): New typedef to replace
bp_table::intmap. Change all uses.
(bp_table::add_breakpoint, bp_table::remove_breakpoint): New overloads
that accept single lines as integers instead of requiring a set of lines.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 03 Mar 2021 23:57:31 -0500 |
parents | 0a5b15007766 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-stmt.h Sun Mar 21 10:53:11 2021 +0100 +++ b/libinterp/parse-tree/pt-stmt.h Wed Mar 03 23:57:31 2021 -0500 @@ -188,13 +188,13 @@ std::list<bp_type> breakpoints_and_conds (void); - bp_table::intmap add_breakpoint (event_manager& evmgr, - const std::string& file, - const bp_table::intmap& line, - const std::string& condition); + bp_table::bp_lines add_breakpoint (event_manager& evmgr, + const std::string& file, + const bp_table::bp_lines& lines, + const std::string& condition); - bp_table::intmap remove_all_breakpoints (event_manager& evmgr, - const std::string& file); + bp_table::bp_lines remove_all_breakpoints (event_manager& evmgr, + const std::string& file); void accept (tree_walker& tw) {