next_frame = get_next_frame_sentinel_okay (frame);
+ /* In some cases NEXT_FRAME may not have a valid frame-id yet. This can
+ happen if we end up trying to unwind a register as part of the frame
+ sniffer. The only time that we get here without a valid frame-id is
+ if NEXT_FRAME is an inline frame. If this is the case then we can
+ avoid getting into trouble here by skipping past the inline frames. */
+ while (get_frame_type (next_frame) == INLINE_FRAME)
+ next_frame = get_next_frame_sentinel_okay (next_frame);
+
/* We should have a valid next frame. */
gdb_assert (frame_id_p (get_frame_id (next_frame)));