X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Finline-frame.c;h=a9006a6c8a3fa4a0096660b6f73ba2c84567b328;hb=13835d88dc51497b9bd68dc1f394ca0de099a380;hp=439f3633fd6cc869d07a908dc863fcbe799f4c5f;hpb=b6433ede0708af00be520abdf9209cd776aab2e2;p=binutils-gdb.git diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c index 439f3633fd6..a9006a6c8a3 100644 --- a/gdb/inline-frame.c +++ b/gdb/inline-frame.c @@ -1,6 +1,6 @@ /* Inline frame unwinder for GDB. - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is part of GDB. @@ -163,7 +163,10 @@ inline_frame_this_id (struct frame_info *this_frame, function, there must be previous frames, so this is safe - as long as we're careful not to create any cycles. See related comments in get_prev_frame_always_1. */ - *this_id = get_frame_id (get_prev_frame_always (this_frame)); + frame_info *prev_frame = get_prev_frame_always (this_frame); + if (prev_frame == nullptr) + error (_("failed to find previous frame when computing inline frame id")); + *this_id = get_frame_id (prev_frame); /* We need a valid frame ID, so we need to be based on a valid frame. FSF submission NOTE: this would be a good assertion to @@ -263,6 +266,7 @@ inline_frame_sniffer (const struct frame_unwind *self, } const struct frame_unwind inline_frame_unwind = { + "inline", INLINE_FRAME, default_frame_unwind_stop_reason, inline_frame_this_id, @@ -304,9 +308,9 @@ block_starting_point_at (CORE_ADDR pc, const struct block *block) set at FRAME_BLOCK. */ static bool -stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain) +stopped_by_user_bp_inline_frame (const block *frame_block, bpstat *stop_chain) { - for (bpstat s = stop_chain; s != NULL; s = s->next) + for (bpstat *s = stop_chain; s != nullptr; s = s->next) { struct breakpoint *bpt = s->breakpoint_at; @@ -337,7 +341,7 @@ stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain) /* See inline-frame.h. */ void -skip_inline_frames (thread_info *thread, bpstat stop_chain) +skip_inline_frames (thread_info *thread, bpstat *stop_chain) { const struct block *frame_block, *cur_block; std::vector skipped_syms;