* blockframe.c: fix a null pointer ref in generic_get_saved_register
authorMichael Snyder <msnyder@vmware.com>
Tue, 28 Jan 1997 23:55:28 +0000 (23:55 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 28 Jan 1997 23:55:28 +0000 (23:55 +0000)
gdb/ChangeLog
gdb/blockframe.c

index 54209bcb460c0e240b9870f4cac2a68f0ddfcb7f..a42970be38a23bb40f82829b808e5a4d5f88ede0 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jan 28 15:54:13 1997  Michael Snyder  <msnyder@cleaver.cygnus.com>
+
+       * blockframe.c: fix a null pointer ref in generic_get_saved_register
+
 Tue Jan 28 15:39:50 1997  Geoffrey Noer  <noer@cygnus.com>
 
        * mn10200-tdep.c (mn10200_frame_chain): get basic backtracing
index bcc9e0ff5a6764e869de6d54e7e6de21c0563597..d10bdd3055aa9a144d3b6b08f05acf0323879207 100644 (file)
@@ -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))
        {