diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0840a51a17..0674836fb2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2016-03-09 Andreas Arnez + + * s390-linux-tdep.c (s390_prologue_frame_unwind_cache): Store + frame func's PC in info->func before any other failure can occur. + (s390_frame_this_id): Use frame_id_build_unavailable_stack if + info->func has been filled out. + 2016-03-09 Pedro Alves * osabi.c (gdb_osabi_names): Avoid spaces in osabi names. diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 7f860b60d6..155bc66bd7 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -2011,9 +2011,12 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame, bother searching for it -- with modern compilers this would be mostly pointless anyway. Trust that we'll either have valid DWARF-2 CFI data or else a valid backchain ... */ - func = get_frame_func (this_frame); - if (!func) - return 0; + if (!get_frame_func_if_available (this_frame, &info->func)) + { + info->func = -1; + return 0; + } + func = info->func; /* Try to analyze the prologue. */ result = s390_analyze_prologue (gdbarch, func, @@ -2167,7 +2170,6 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame, info->local_base = prev_sp - size; } - info->func = func; return 1; } @@ -2267,7 +2269,11 @@ s390_frame_this_id (struct frame_info *this_frame, = s390_frame_unwind_cache (this_frame, this_prologue_cache); if (info->frame_base == -1) - return; + { + if (info->func != -1) + *this_id = frame_id_build_unavailable_stack (info->func); + return; + } *this_id = frame_id_build (info->frame_base, info->func); }