From: Jim Kingdon Date: Fri, 11 Jun 1993 20:06:41 +0000 (+0000) Subject: * stack.c (print_frame_info): Use catch_errors around print_frame_args. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c94e7e757bed49388a6b0f73e49afb969e6b8979;p=binutils-gdb.git * stack.c (print_frame_info): Use catch_errors around print_frame_args. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ae31db0c392..a78970ab0bc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Fri Jun 11 10:17:41 1993 Jim Kingdon (kingdon@cygnus.com) + * stack.c (print_frame_info): Use catch_errors around print_frame_args. + * Makefile.in (install): Don't depend on gdb. * Rename remote-es1800.c to remote-es.c diff --git a/gdb/stack.c b/gdb/stack.c index 4849e5d047a..0e005862a13 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -130,6 +130,25 @@ print_stack_frame (frame, level, source) print_frame_info (fi, level, source, 1); } +struct print_args_args { + struct symbol *func; + struct frame_info *fi; +}; + +static int print_args_stub PARAMS ((char *)); + +/* Pass the args the way catch_errors wants them. */ +static int +print_args_stub (args) + char *args; +{ + int numargs; + struct print_args_args *p = (struct print_args_args *)args; + FRAME_NUM_ARGS (numargs, (p->fi)); + print_frame_args (p->func, p->fi, numargs, stdout); + return 0; +} + void print_frame_info (fi, level, source, args) struct frame_info *fi; @@ -223,8 +242,10 @@ print_frame_info (fi, level, source, args) fputs_filtered (" (", stdout); if (args) { - FRAME_NUM_ARGS (numargs, fi); - print_frame_args (func, fi, numargs, stdout); + struct print_args_args args; + args.fi = fi; + args.func = func; + catch_errors (print_args_stub, (char *)&args, ""); } printf_filtered (")"); if (sal.symtab && sal.symtab->filename) @@ -250,7 +271,8 @@ print_frame_info (fi, level, source, args) int done = 0; int mid_statement = source < 0 && fi->pc != sal.pc; if (frame_file_full_name) - done = identify_source_line (sal.symtab, sal.line, mid_statement); + done = identify_source_line (sal.symtab, sal.line, mid_statement, + fi->pc); if (!done) { if (addressprint && mid_statement)