This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Revise assertion in frame_saved_regs_register_unwind()


In the course of rewriting mips_get_saved_register(), I found that
that an assertion in blockframe.c was erroneously failing.  See
comment in patch for details.  Also, note that set_unwind_by_pc()
sets the unwinder to frame_saved_regs_register_unwind() for the
non-generic dummy frame case.

(This patch is a prerequisite for my upcoming mips_get_saved_register()
rewrite.)

Okay to commit?

	* blockframe.c (frame_saved_regs_register_unwind): Revise
	PC_IN_CALL_DUMMY_ASSERTION to only apply when generic dummy
	frames are in use.

Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.34
diff -u -p -r1.34 blockframe.c
--- blockframe.c	24 Jul 2002 14:38:55 -0000	1.34
+++ blockframe.c	8 Aug 2002 20:54:14 -0000
@@ -1410,7 +1410,11 @@ frame_saved_regs_register_unwind (struct
   /* There is always a frame at this point.  And THIS is the frame
      we're interested in.  */
   gdb_assert (frame != NULL);
-  gdb_assert (!PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
+  /* If we're using generic dummy frames, we'd better not be in a call
+     dummy.  (generic_call_dummy_register_unwind ought to have been called
+     instead.)  */
+  gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
+                && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
 
   /* Load the saved_regs register cache.  */
   if (frame->saved_regs == NULL)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]