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: Value being assigned to is no longer active.


On Tue, May 03, 2005 at 09:46:40AM -0400, Decker, Paul wrote:
> 
> 
> The "set debug remote 1" and "set debug frame 1" options seem to be good
> things to know.  

Yep.  Please fix your line wrapping; I've manually unwrapped this so
that I can read it.

> { create_sentinel_frame (...) -> {level=-1,type=<unknown> type>,unwind=0x8227310,pc=<unknown>,id={!stack,!code,!special},func=<unknown>} }
> { get_prev_frame_1 (this_frame=-1) -> {level=0,type=<unknown>,unwind=<unknown>,pc=<unknown>,id=<unknown>,func=<unknown>} }
> { deprecated_update_frame_pc_hack (frame=0,pc=0xffa00006) }
> { frame_register_unwind (frame=-1,regnum=49(SP),...) -> *optimizedp=0 *lvalp=2 *addrp=0x8c *bufferp=[f80fb0ff] }
> Sending packet: $mffa00002,c#1b...Ack
> Packet received: 000000000000000000000000
> 0xffa00006 in ?? ()
> (gdb) p/x $PC
> { frame_register_unwind (frame=-1,regnum=0(PC),...) -> *optimizedp=0 *lvalp=2 *addrp=0x0 *bufferp=[0600a0ff] }
> { get_frame_id (fi=0) { frame_register_unwind (frame=-1,regnum=51(FP),...) -> *optimizedp=0 *lvalp=2 *addrp=0x94 *bufferp=[dcb1bc48] }
> { frame_func_unwind (fi=-1) -> 0x0 }
> -> {!stack,!code,!special} }
> $1 = 0xffa00006
> (gdb) set $PC=0xFFA00000
> { frame_register_unwind (frame=-1,regnum=0(PC),...) -> *optimizedp=0 *lvalp=2 *addrp=0x0 *bufferp=[0600a0ff] }
> { frame_id_p (l={!stack,!code,!special}) -> 0 }
> Value being assigned to is no longer active.

The key here is that nothing claims the code at 0xffa00006 as any kind
of frame.  That means we end up with no frames at all except for the
special sentinal frame (at -1).

One solution would be to make sure that some frame sniffer for your
target does accept this frame.  Another would be to handle this in
common code by creating a special frame sniffer, at the end of the
list, which always accepts frame ID 0.  I'm not sure how practical that
is (haven't thought about it much).

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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