This is the mail archive of the gdb-patches@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: Defer register reading from remote target until needed?


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.



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