X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Ffindvar.c;h=7e9dab567f64ea0bcf809f3f2e7efb10d8578e0e;hb=9fc501fdfe5dc82b5e5388cde4ac2ab70ed69d75;hp=c7cd31ce1a68066fbd891aad219a36752434f312;hpb=64cb3757a9df273b990adf4f28333324edc3cae8;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/findvar.c b/gdb/findvar.c index c7cd31ce1a..7e9dab567f 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -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)));