This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Defer register reading from remote target until needed?
- From: Michael Snyder <msnyder at redhat dot com>
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 03 Jun 2004 18:25:13 +0000
- Subject: Re: Defer register reading from remote target until needed?
- Organization: Red Hat, Inc.
- References: <40BF22E2.7030700@axis.com>
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.