aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-18 15:58:50 -0600
committerTom Tromey <tom@tromey.com>2018-05-21 10:01:15 -0600
commitbc18fbb575437dd10089ef4619e46c0b9a93097d (patch)
tree5c8e5faadb12df5d81e216e08f9b0fcb91e83191 /gdb/ada-lang.h
parent790217f6736cc0f0a177a681ba1c7cc5f995cfe7 (diff)
downloadgdb-bc18fbb575437dd10089ef4619e46c0b9a93097d.zip
gdb-bc18fbb575437dd10089ef4619e46c0b9a93097d.tar.gz
gdb-bc18fbb575437dd10089ef4619e46c0b9a93097d.tar.bz2
Change ada_catchpoint::excep_string to be a std::string
This changes ada_catchpoint::excep_string to be a std::string and then fixes up all t he users. This found a memory leak in catch_ada_exception_command_split, where "cond" was copied but never freed. I changed the type of the "cond_string" argument to catch_ada_exception_command_split to follow the rule that out parameters should be pointers and not references. This patch enables the removal of some cleanups and also the function ada_get_next_arg. ChangeLog 2018-05-21 Tom Tromey <tom@tromey.com> * mi/mi-cmd-catch.c (mi_cmd_catch_assert) (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update. * ada-lang.h (create_ada_exception_catchpoint): Update. * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a std::string. (create_excep_cond_exprs, ~ada_catchpoint) (should_stop_exception, print_one_exception) (print_mention_exception, print_recreate_exception): Update. (ada_get_next_arg): Remove. (catch_ada_exception_command_split): Use std::string. Change type of "excep_string", "cond_string". (catch_ada_exception_command): Update. (create_ada_exception_catchpoint): Change type of excep_string. (ada_exception_sal): Remove excep_string parameter. (~ada_catchpoint): Remove.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 09e7b40..a4192fc 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -377,7 +377,7 @@ extern char *ada_main_name (void);
extern void create_ada_exception_catchpoint
(struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind,
- char *excep_string, const std::string &cond_string, int tempflag,
+ const std::string &excep_string, const std::string &cond_string, int tempflag,
int disabled, int from_tty);
/* Some information about a given Ada exception. */