* Defer register reading from remote target until needed?
@ 2004-06-03 13:08 Orjan Friberg
2004-06-03 18:25 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Orjan Friberg @ 2004-06-03 13:08 UTC (permalink / raw)
To: gdb-patches
When single-stepping a remote target, after the stop reply paket is
sent, GDB immediately sends a request for all registers. Is there a way
to defer sending this request until some register other than what was
sent with the stop reply packet (pc, stack and frame pointer) is
actually needed?
--
Orjan Friberg
Axis Communications
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Defer register reading from remote target until needed?
2004-06-03 13:08 Defer register reading from remote target until needed? Orjan Friberg
@ 2004-06-03 18:25 ` Michael Snyder
2004-06-04 8:52 ` Orjan Friberg
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2004-06-03 18:25 UTC (permalink / raw)
To: Orjan Friberg; +Cc: gdb-patches
Orjan Friberg wrote:
> When single-stepping a remote target, after the stop reply paket is
> sent, GDB immediately sends a request for all registers. Is there a way
> to defer sending this request until some register other than what was
> sent with the stop reply packet (pc, stack and frame pointer) is
> actually needed?
It's supposed to work that way already. Either something's broken, or
some register other than the ones you named *is* needed. The 'g' pkt
should only go out if gdb needs the value of a register that it doesn't
already have.
This can sometimes happen 'indirectly', eg. if you try to set a
register, gdb may try to read it first.
Try setting a breakpoint in remote_fetch_registers, then go up
the stack and see what register gdb is trying to read.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Defer register reading from remote target until needed?
2004-06-03 18:25 ` Michael Snyder
@ 2004-06-04 8:52 ` Orjan Friberg
0 siblings, 0 replies; 3+ messages in thread
From: Orjan Friberg @ 2004-06-04 8:52 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Michael Snyder wrote:
>
> It's supposed to work that way already. Either something's broken, or
> some register other than the ones you named *is* needed. The 'g' pkt
> should only go out if gdb needs the value of a register that it doesn't
> already have.
>
> This can sometimes happen 'indirectly', eg. if you try to set a
> register, gdb may try to read it first.
>
> Try setting a breakpoint in remote_fetch_registers, then go up
> the stack and see what register gdb is trying to read.
Ah; it's because we need the subroutine return pointer when unwinding
the pc. Thanks.
--
Orjan Friberg
Axis Communications
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-04 8:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 13:08 Defer register reading from remote target until needed? Orjan Friberg
2004-06-03 18:25 ` Michael Snyder
2004-06-04 8:52 ` Orjan Friberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox