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_register_unwind(): "frame != NULL" assertion failure


#2  0x005479cc in mips_get_saved_register (raw_buffer=0x7fff6db8 "\020\002\177\177m\020\002\177\177m", 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



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