aboutsummaryrefslogtreecommitdiff
path: root/gdb/core.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-09-11 01:49:50 +0000
committerJohn Gilmore <gnu@cygnus>1991-09-11 01:49:50 +0000
commitcadbb07a69baa48a153c0c4c148d24342ce4474f (patch)
tree7e2762cc1ddd1619c453c8b658dc961383b63531 /gdb/core.c
parentb1815762f9f0a4579e4da7b7b1b5427be3c35c93 (diff)
downloadgdb-cadbb07a69baa48a153c0c4c148d24342ce4474f.zip
gdb-cadbb07a69baa48a153c0c4c148d24342ce4474f.tar.gz
gdb-cadbb07a69baa48a153c0c4c148d24342ce4474f.tar.bz2
* core.c (core_file_command): Print frame at coredump with
its level number, by calling print_stack_frame. * frame.h: Add selected_frame_level, print_stack_frame. * frame.h, stack.c: Remove print_sel_frame, print_selected_frame. * convex-tdep.c, convex-xdep.c, infcmd.c, inflow.c, infrun.c: Change print_sel_frame and print_selected_frame callers to print_stack_frame. * dbxread.c (read_ofile_symtab): Avoid empty else clause. * symfile.c (free_named_symtabs): Ditto. * main.c (main): wrap_here needs an arg. * solib.c (find_solib): Avoid memory access if _DYNAMIC is zero. (solib_add): Avoid noise. (solib_create_inferior_hook): Lint. (sharedlibrary_command): Move dont_repeat to here. * utils.c (error): Call wrap_here to force buffered output. Small patches from Peter Schauer: * coffread.c (start_symtab): Free any existing line_vector before malloc-ing new one. (read_coff_symtab): Ditto for type_vector. * source.c (lines_to_list): New variable, replacing function. (all uses): Use as variable. (_initialize_source): Add 'set listsize' and 'show listsize'. * utils.c (lines_to_list): Remove function. * stack.c (print_frame_info): Use as variable. * defs.h (lines_to_list): Remove declaration.
Diffstat (limited to 'gdb/core.c')
-rw-r--r--gdb/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/core.c b/gdb/core.c
index deaae4b..b5895c5 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -170,11 +170,12 @@ core_open (filename, from_tty)
#ifdef SOLIB_ADD
(void) catch_errors (solib_add_stub, (char *)from_tty, (char *)0);
#endif
+
/* Now, set up the frame cache, and print the top of stack */
- set_current_frame ( create_new_frame (read_register (FP_REGNUM),
- read_pc ()));
+ set_current_frame (create_new_frame (read_register (FP_REGNUM),
+ read_pc ()));
select_frame (get_current_frame (), 0);
- print_sel_frame (0); /* Print the top frame and source line */
+ print_stack_frame (selected_frame, selected_frame_level, 1);
} else {
printf (
"Warning: you won't be able to access this core file until you terminate\n\