From: Michael Snyder Date: Tue, 28 Jan 1997 23:55:28 +0000 (+0000) Subject: * blockframe.c: fix a null pointer ref in generic_get_saved_register X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b444216f2c5f842801fadf4515728d0327418ae3;p=binutils-gdb.git * blockframe.c: fix a null pointer ref in generic_get_saved_register --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 54209bcb460..a42970be38a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Tue Jan 28 15:54:13 1997 Michael Snyder + + * blockframe.c: fix a null pointer ref in generic_get_saved_register + Tue Jan 28 15:39:50 1997 Geoffrey Noer * mn10200-tdep.c (mn10200_frame_chain): get basic backtracing diff --git a/gdb/blockframe.c b/gdb/blockframe.c index bcc9e0ff5a6..d10bdd3055a 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -1051,7 +1051,7 @@ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) the current frame itself: otherwise, we would be getting the previous frame's registers which were saved by the current frame. */ - while ((frame = frame->next) != NULL) + while (frame && ((frame = frame->next) != NULL)) { if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) {