diff options
Diffstat (limited to 'gdb/mi/mi-cmd-catch.c')
-rw-r--r-- | gdb/mi/mi-cmd-catch.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/mi/mi-cmd-catch.c b/gdb/mi/mi-cmd-catch.c index a767ee7..0e1fb7e 100644 --- a/gdb/mi/mi-cmd-catch.c +++ b/gdb/mi/mi-cmd-catch.c @@ -79,7 +79,7 @@ mi_cmd_catch_assert (const char *cmd, char *argv[], int argc) if (oind != argc) error (_("Invalid argument: %s"), argv[oind]); - setup_breakpoint_reporting (); + scoped_restore restore_breakpoint_reporting = setup_breakpoint_reporting (); /* create_ada_exception_catchpoint needs CONDITION to be xstrdup'ed, and will assume control of its lifetime. */ if (condition != NULL) @@ -156,7 +156,7 @@ mi_cmd_catch_exception (const char *cmd, char *argv[], int argc) if (ex_kind == ada_catch_exception_unhandled && exception_name != NULL) error (_("\"-e\" and \"-u\" are mutually exclusive")); - setup_breakpoint_reporting (); + scoped_restore restore_breakpoint_reporting = setup_breakpoint_reporting (); /* create_ada_exception_catchpoint needs EXCEPTION_NAME and CONDITION to be xstrdup'ed, and will assume control of their lifetime. */ if (exception_name != NULL) @@ -173,7 +173,6 @@ mi_cmd_catch_exception (const char *cmd, char *argv[], int argc) static void mi_catch_load_unload (int load, char *argv[], int argc) { - struct cleanup *back_to; const char *actual_cmd = load ? "-catch-load" : "-catch-unload"; int temp = 0; int enabled = 1; @@ -215,11 +214,8 @@ mi_catch_load_unload (int load, char *argv[], int argc) if (oind < argc -1) error (_("-catch-load/unload: Garbage following the <library name>")); - back_to = setup_breakpoint_reporting (); - + scoped_restore restore_breakpoint_reporting = setup_breakpoint_reporting (); add_solib_catchpoint (argv[oind], load, temp, enabled); - - do_cleanups (back_to); } /* Handler for the -catch-load. */ |