From 56ecd069f031d6bcdaa46664c68a16cb27b379c3 Mon Sep 17 00:00:00 2001 From: Xavier Roirand Date: Thu, 25 Jan 2018 11:09:23 +0100 Subject: (Ada) C++fy conditional string when catching exception. This commit C++fy the conditional string used when catching Ada exception. gdb/ChangeLog: * ada-lang.c (catch_ada_exception_command_split) (create_ada_exception_catchpoint) : Change parameter type. Update code accordingly. (catch_ada_exception_command, catch_ada_handlers_command): Use C++ string instead of char* for conditional var. (catch_ada_assert_command_split) : Change parameter type. Update code accordingly. (catch_assert_command): Use C++ string instead of char* for conditional var. * ada-lang.h (create_ada_exception_catchpoint) : Update declaration. * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception): Use std::string instead of char* for condition string. Tested on x86_64-linux. --- gdb/ada-lang.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/ada-lang.h') diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index bac6c06..1f6ea77 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -379,8 +379,8 @@ extern std::string ada_name_for_lookup (const char *name); extern void create_ada_exception_catchpoint (struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind, - char *excep_string, char *cond_string, int tempflag, int disabled, - int from_tty); + char *excep_string, const std::string &cond_string, int tempflag, + int disabled, int from_tty); /* Some information about a given Ada exception. */ -- cgit v1.1