diff options
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 10a32dc..a524678 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -269,12 +269,10 @@ frame_addr_hash_eq (const void *a, const void *b) static void frame_info_del (frame_info *frame) { - if (frame->prologue_cache != nullptr - && frame->unwind->dealloc_cache != nullptr) + if (frame->prologue_cache != nullptr) frame->unwind->dealloc_cache (frame, frame->prologue_cache); - if (frame->base_cache != nullptr - && frame->base->unwind->dealloc_cache != nullptr) + if (frame->base_cache != nullptr) frame->base->unwind->dealloc_cache (frame, frame->base_cache); } @@ -487,12 +485,12 @@ frame_info::to_string () const res += string_printf ("{level=%d,", fi->level); if (fi->unwind != NULL) - res += string_printf ("type=%s,", frame_type_str (fi->unwind->type)); + res += string_printf ("type=%s,", frame_type_str (fi->unwind->type ())); else res += "type=<unknown>,"; if (fi->unwind != NULL) - res += string_printf ("unwinder=\"%s\",", fi->unwind->name); + res += string_printf ("unwinder=\"%s\",", fi->unwind->name ()); else res += "unwinder=<unknown>,"; @@ -2366,7 +2364,7 @@ get_prev_frame_always_1 (const frame_info_ptr &this_frame) This check is valid only if this frame and the next frame are NORMAL. See the comment at frame_id_inner for details. */ if (get_frame_type (this_frame) == NORMAL_FRAME - && this_frame->next->unwind->type == NORMAL_FRAME + && this_frame->next->unwind->type () == NORMAL_FRAME && frame_id_inner (get_frame_arch (frame_info_ptr (this_frame->next)), get_frame_id (this_frame), get_frame_id (frame_info_ptr (this_frame->next)))) @@ -2994,7 +2992,7 @@ get_frame_type (const frame_info_ptr &frame) /* Initialize the frame's unwinder because that's what provides the frame's type. */ frame_unwind_find_by_frame (frame, &frame->prologue_cache); - return frame->unwind->type; + return frame->unwind->type (); } struct program_space * @@ -3075,11 +3073,8 @@ frame_unwind_arch (const frame_info_ptr &next_frame) if (next_frame->unwind == NULL) frame_unwind_find_by_frame (next_frame, &next_frame->prologue_cache); - if (next_frame->unwind->prev_arch != NULL) - arch = next_frame->unwind->prev_arch (next_frame, - &next_frame->prologue_cache); - else - arch = get_frame_arch (next_frame); + arch = next_frame->unwind->prev_arch (next_frame, + &next_frame->prologue_cache); next_frame->prev_arch.arch = arch; next_frame->prev_arch.p = true; |