frame_register_unwind(): "frame != NULL" assertion failure

Andrew Cagney ac131313@redhat.com
Tue Feb 18 22:51:00 GMT 2003


> #2  0x005479cc in mips_get_saved_register (raw_buffer=0x7fff6db8 "\020\002\177°\177ÿmÈ\020\002\177°\177ÿmÐ", optimizedp=0x7fff6dc8, addrp=0x7fff6dd0, frame=0x100573c8, regnum=31, lvalp=0x7fff6ddc) at /home/devel/kevinb/sourceware-mips64/src.baseline/gdb/mips-tdep.c:5509

[...]

 > If I were to follow your above suggestion, I would also have to add some
 > explicit regcache fetching code to mips_get_saved_register() too, but I
 > really can't believe that this is the best approach.

Each case should be examined individually.  Change this call:

   frame_register_unwind (get_next_frame (frame), regnum, optimizedp, lvalp,
                          addrp, &realnum, raw_buffer);

to instead call:

static void
generic_unwind_get_saved_register (char *raw_buffer,
                                    int *optimizedp,
                                    CORE_ADDR *addrp,
                                    struct frame_info *frame,
                                    int regnum,
                                    enum lval_type *lvalp)

(note that the get_next_frame(frame) call isn't needed - that function 
does not have a well chosen name).  The function frame_register() would 
be better but because that knows about old style get_saved_register code 
it would result in infinite recursion :-(

Andrew




More information about the Gdb mailing list