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: new gdb remote packet type


Andrew Cagney wrote:

you'd prefer that I use the q-packet mechanism?



Yes, the qPart packet was designed for exactly the situtation you encountered. It can specify a length/offset and return a short transfer.


Andrew


Hi:

Does this represent what you are expecting of the qPart packet?  I saw no reason to export the type because this
packet is only useful in remote.c

While not immediatly, it is going to eventually be exposed out side of remote.c, so we need to get what goes across the wire right up front. To that end:


- use register sets

Unlike the G-packet, where the byte layout is determined by GDB internal data structure, the byte layout needs to be specified by the inferior's regsets. That in turn means specifying separate packets for fetching all or part of each of "gregs", "fpregs", and "xpregs"(?).

- specify offset/length

I think your code is specifying a register number, it should view the region as a sequence of bytes and fetch using offset/length. This information can be obtained using "regset.h" (although that interface might need some massaging).

- fetch lazy

Just request the region for the requested register. It's then up to the remote end to determine that more/less of the region can be supplied.

Eventually this will also be added to the target vector, however, for the moment something more local is definitly fine.

Andrew



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