This is the mail archive of the gdb@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]

Re: frame.c assertion failure


On May 7,  8:22pm, Andrew Cagney wrote:

> The legacy mips target is calling get_frame_type() on a frame that 
> hasn't yet had it's type initialized.  I can think of:
> 
> -- Tweaking the below if to also test !legacy_frame_p().
> 
> > enum frame_type
> > get_frame_type (struct frame_info *frame)
> ...
> >   if (frame->unwind == NULL)

This works.  Here's the patch:

	* frame.c (get_frame_type): Don't attempt to lazily initialize
	frame's unwinder for legacy frames.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.111
diff -u -p -r1.111 frame.c
--- frame.c	5 May 2003 18:33:10 -0000	1.111
+++ frame.c	8 May 2003 05:45:52 -0000
@@ -2069,7 +2069,7 @@ get_frame_type (struct frame_info *frame
   if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES
       && deprecated_frame_in_dummy (frame))
     return DUMMY_FRAME;
-  if (frame->unwind == NULL)
+  if (frame->unwind == NULL && !legacy_frame_p (current_gdbarch))
     {
       /* Initialize the frame's unwinder because it is that which
          provides the frame's type.  */

Okay?


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