* info on "value being assigned to is no longer active" error
@ 2008-01-19 4:12 Siva Velusamy
2008-01-19 4:21 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Siva Velusamy @ 2008-01-19 4:12 UTC (permalink / raw)
To: gdb
When writing to a register (msr) when the stack pointer or PC is
corrupt, gdb throws out the following error:
----
(gdb) p/x $rmsr
{ frame_register_unwind (frame=-1,regnum=33(rmsr),...) ->
*optimizedp=0 *lvalp=2 *addrp=0x84 *bufferp=[000000a0] }
{ get_frame_id (fi=0) { frame_func_unwind (fi=-1) -> 0x0 }
-> {!stack,!code,!special} }
$1 = 0xa0
(gdb) set $rmsr=0x0
{ frame_register_unwind (frame=-1,regnum=33(rmsr),...) ->
*optimizedp=0 *lvalp=2 *addrp=0x84 *bufferp=[000000a0] }
{ frame_id_p (l={!stack,!code,!special}) -> 0 }
Value being assigned to is no longer active.
-----
This sounds pretty similar to the issue reported here:
http://sourceware.org/ml/gdb/2005-05/msg00029.html
What I do not understand is why gdb is looking for a proper frame
before updating the register.
If my (admittedly cursory) examination of the code in valops.c is
correct, it appears as if gdb is looking for the frame to make sure
that it updates the value of the register if it has been stored in the
stack. Is that correct?
Thanks,
Siva
--
In the end, everything is a gag.
Charlie Chaplin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: info on "value being assigned to is no longer active" error
2008-01-19 4:12 info on "value being assigned to is no longer active" error Siva Velusamy
@ 2008-01-19 4:21 ` Daniel Jacobowitz
2008-01-19 4:26 ` Siva Velusamy
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-01-19 4:21 UTC (permalink / raw)
To: Siva Velusamy; +Cc: gdb
On Fri, Jan 18, 2008 at 08:11:34PM -0800, Siva Velusamy wrote:
> If my (admittedly cursory) examination of the code in valops.c is
> correct, it appears as if gdb is looking for the frame to make sure
> that it updates the value of the register if it has been stored in the
> stack. Is that correct?
Roughly. All registers in GDB belong to a frame. Either the current
frame or a saved stack frame. GDB has found the current frame, but
confuses its ID with an invalid frame marker.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: info on "value being assigned to is no longer active" error
2008-01-19 4:21 ` Daniel Jacobowitz
@ 2008-01-19 4:26 ` Siva Velusamy
2008-01-19 4:43 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Siva Velusamy @ 2008-01-19 4:26 UTC (permalink / raw)
To: gdb
On Jan 18, 2008 8:21 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Jan 18, 2008 at 08:11:34PM -0800, Siva Velusamy wrote:
> > If my (admittedly cursory) examination of the code in valops.c is
> > correct, it appears as if gdb is looking for the frame to make sure
> > that it updates the value of the register if it has been stored in the
> > stack. Is that correct?
>
> Roughly. All registers in GDB belong to a frame. Either the current
> frame or a saved stack frame. GDB has found the current frame, but
> confuses its ID with an invalid frame marker.
>
Thanks. Should gdb be able to handle this correctly, or is this a
situation where it is tough to define the correct course of action?
If gdb should handle this, what sort of change would be appropriate in
the target specific code?
Siva
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: info on "value being assigned to is no longer active" error
2008-01-19 4:26 ` Siva Velusamy
@ 2008-01-19 4:43 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-01-19 4:43 UTC (permalink / raw)
To: Siva Velusamy; +Cc: gdb
On Fri, Jan 18, 2008 at 08:26:17PM -0800, Siva Velusamy wrote:
> Thanks. Should gdb be able to handle this correctly, or is this a
> situation where it is tough to define the correct course of action?
>
> If gdb should handle this, what sort of change would be appropriate in
> the target specific code?
The problem is not a target-specific one. I know I've discussed the
appropriate fix on the list at some point in the past two years; the
problem arises because we use null_frame_id as the ID of the outermost
real frame and to mark invalid frames.
The simplest fix might be to introduce another invalid frame ID and
use that for outermost frames. A better fix would be to always use
valid frame IDs, and mark non-unwindable frames some other way.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-19 4:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-19 4:12 info on "value being assigned to is no longer active" error Siva Velusamy
2008-01-19 4:21 ` Daniel Jacobowitz
2008-01-19 4:26 ` Siva Velusamy
2008-01-19 4:43 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox