gdb: Python unwinders, inline frames, and tail-call frames
[deliverable/binutils-gdb.git] / gdb / findvar.c
index c7cd31ce1a68066fbd891aad219a36752434f312..7e9dab567f64ea0bcf809f3f2e7efb10d8578e0e 100644 (file)
@@ -292,6 +292,14 @@ value_of_register_lazy (struct frame_info *frame, int regnum)
 
   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)));
 
This page took 0.02483 seconds and 4 git commands to generate.