diff options
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index e05fe53..7941a67 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -287,6 +287,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, if (*SYMBOL_LINKAGE_NAME (sym)) { struct symbol *nsym; + nsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym), b, VAR_DOMAIN, NULL); gdb_assert (nsym != NULL); @@ -624,6 +625,7 @@ print_frame_info (struct frame_info *frame, int print_level, else { struct value_print_options opts; + get_user_print_options (&opts); /* We used to do this earlier, but that is clearly wrong. This function is used by many different @@ -721,6 +723,7 @@ find_frame_funname (struct frame_info *frame, char **funname, with DMGL_PARAMS turned on, and here we don't want to display parameters. So remove the parameters. */ char *func_only = cp_remove_params (*funname); + if (func_only) { *funname = func_only; @@ -792,6 +795,7 @@ print_frame (struct frame_info *frame, int print_level, { struct print_args_args args; struct cleanup *args_list_chain; + args.frame = frame; args.func = find_pc_function (get_frame_address_in_block (frame)); args.stream = gdb_stdout; @@ -814,6 +818,7 @@ print_frame (struct frame_info *frame, int print_level, if (ui_out_is_mi_like_p (uiout)) { const char *fullname = symtab_to_fullname (sal.symtab); + if (fullname != NULL) ui_out_field_string (uiout, "fullname", fullname); } @@ -919,6 +924,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, { struct frame_info *fid; int level = value_as_long (args[0]); + fid = find_relative_frame (get_current_frame (), &level); if (level == 0) /* find_relative_frame was successful */ @@ -928,6 +934,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, /* Convert each value into a corresponding address. */ { int i; + for (i = 0; i < numargs; i++) addrs[i] = value_as_address (args[i]); } @@ -1034,6 +1041,7 @@ frame_info (char *addr_exp, int from_tty) with DMGL_PARAMS turned on, and here we don't want to display parameters. So remove the parameters. */ char *func_only = cp_remove_params (funname); + if (func_only) { funname = func_only; @@ -1195,6 +1203,7 @@ frame_info (char *addr_exp, int from_tty) int sp_size = register_size (gdbarch, gdbarch_sp_regnum (gdbarch)); gdb_byte value[MAX_REGISTER_SIZE]; CORE_ADDR sp; + frame_register_unwind (fi, gdbarch_sp_regnum (gdbarch), &optimized, &lval, &addr, &realnum, value); @@ -1321,6 +1330,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty) for (fi = trailing; fi != NULL && i--; fi = get_prev_frame (fi)) { CORE_ADDR pc; + QUIT; pc = get_frame_address_in_block (fi); find_pc_sect_symtab_via_partial (pc, find_pc_mapped_section (pc)); @@ -1514,6 +1524,7 @@ print_block_frame_labels (struct gdbarch *gdbarch, struct block *b, { struct symtab_and_line sal; struct value_print_options opts; + sal = find_pc_line (SYMBOL_VALUE_ADDRESS (sym), 0); values_printed = 1; fputs_filtered (SYMBOL_PRINT_NAME (sym), stream); @@ -1815,6 +1826,7 @@ find_relative_frame (struct frame_info *frame, int *level_offset_ptr) while (*level_offset_ptr > 0) { struct frame_info *prev = get_prev_frame (frame); + if (!prev) break; (*level_offset_ptr)--; @@ -1825,6 +1837,7 @@ find_relative_frame (struct frame_info *frame, int *level_offset_ptr) while (*level_offset_ptr < 0) { struct frame_info *next = get_next_frame (frame); + if (!next) break; (*level_offset_ptr)++; @@ -2012,6 +2025,7 @@ If you continue, the return value that you specified will be ignored.\n"; if (from_tty) { int confirmed; + if (thisfun == NULL) confirmed = query (_("%sMake selected stack frame return now? "), query_prefix); |