From 898db0f75d07c0c40682fce080d7f631179bd85a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 16 Feb 2023 10:46:04 -0700 Subject: Transfer ownership of exception string to ada_catchpoint This changes the ada_catchpoint to require an rvalue ref, so that ownership of the exception string can be transferred to the catchpoint object. --- gdb/mi/mi-cmd-catch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-cmd-catch.c b/gdb/mi/mi-cmd-catch.c index fdfbe2e..9669d86 100644 --- a/gdb/mi/mi-cmd-catch.c +++ b/gdb/mi/mi-cmd-catch.c @@ -153,7 +153,7 @@ mi_cmd_catch_exception (const char *cmd, const char *const *argv, int argc) scoped_restore restore_breakpoint_reporting = setup_breakpoint_reporting (); create_ada_exception_catchpoint (gdbarch, ex_kind, - exception_name, + std::move (exception_name), condition, temp, enabled, 0); } @@ -217,7 +217,7 @@ mi_cmd_catch_handlers (const char *cmd, const char *const *argv, int argc) scoped_restore restore_breakpoint_reporting = setup_breakpoint_reporting (); create_ada_exception_catchpoint (gdbarch, ada_catch_handlers, - exception_name, + std::move (exception_name), condition, temp, enabled, 0); } -- cgit v1.1