* stack.c (print_frame_info): Use catch_errors around print_frame_args.

This commit is contained in:
Jim Kingdon 1993-06-11 20:06:41 +00:00
parent 702c0ff7fb
commit c94e7e757b
2 changed files with 27 additions and 3 deletions

View File

@ -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

View File

@ -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)