aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-script.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-script.c')
-rw-r--r--gdb/cli/cli-script.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 5903015..2d1afe5 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1589,19 +1589,6 @@ source_cleanup_lines (void *args)
source_file_name = p->old_file;
}
-struct wrapped_read_command_file_args
-{
- FILE *stream;
-};
-
-static void
-wrapped_read_command_file (struct ui_out *uiout, void *data)
-{
- struct wrapped_read_command_file_args *args = data;
-
- read_command_file (args->stream);
-}
-
/* Used to implement source_command. */
void
@@ -1625,12 +1612,12 @@ script_from_file (FILE *stream, const char *file)
error_pre_print = "";
{
- struct gdb_exception e;
- struct wrapped_read_command_file_args args;
+ volatile struct gdb_exception e;
- args.stream = stream;
- e = catch_exception (uiout, wrapped_read_command_file, &args,
- RETURN_MASK_ERROR);
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ read_command_file (stream);
+ }
switch (e.reason)
{
case 0: