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



(unless you're trying to get code to use the new unwinder that is, or its some sort of inner most frame edge case?).

Nope, the backtrace tells all ...


#0 internal_error (file=0x82acccd "../../src/gdb/frame.c", line=2083, string=0x82accb2 "%s%sAssertion `%s' failed.") at ../../src/gdb/utils.c:800
#1 0x08141d9f in get_frame_type (frame=0x87af19c) at ../../src/gdb/frame.c:2083
#2 0x080f39d6 in mips_init_extra_frame_info (fromleaf=0, fci=0x87af19c)
at ../../src/gdb/mips-tdep.c:2504

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)

-- Tweaking the assignment to also check !legacy_frame_p().


      /* FIXME: cagney/2003-04-02: Rather than storing the frame's
         type in the frame, the unwinder's type should be returned
         directly.  Unfortunatly, legacy code, called by
         legacy_get_prev_frame, explicitly set the frames type using
         the method deprecated_set_frame_type().  */
      gdb_assert (frame->unwind->type != UNKNOWN_FRAME);

-- explicitly setting ->unwind to legacy_... in legacy_get_prev_frame.


I think the first is best:

- the second causes a get_frame_pc() call when, quite possibly, the legacy code isn't ready for this (see comments in legacy_get_prev_frame).

- the third leaves things open to gdb unintentionally calling a legacy unwind method.

Andrew



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