Proposal (#2): qGetTLSAddr remote protocol packet
Kevin Buettner
kevinb@redhat.com
Thu Nov 18 21:45:00 GMT 2004
Below is a revised proposal for a new remote protocol packet for
fetching a thread local storage address. It is written it in a form
(sans markup) that is compatible with the rest of the remote protocol
documentation.
This proposal incorporates feedback from Andrew Cagney and Jim Blandy.
I have also attached patches to gdb and gdbserver which demonstrate an
implementation of this proposal. I'm not asking for approval on the
paches at this time. I'll repost the patches separately, and suitably
modified, to gdb-patches once we get the protocol specification nailed
down.
Further comments / suggestions?
-------------------
qGetTLSAddr:thread-id,offset,load-module-param-1,...,load-module-param-N
-- get thread local storage address
Fetch the address associated with thread local storage specified
by thread-id, offset, and load-module-param-1 thru load-module-param-N.
thread-id is the (big endian, hex encoded) thread id associated with the
thread for which to fetch the TLS address.
offset is the (big endian, hex encoded) offset associated with the
thread local variable. (This offset is obtained from the debug
information associated with the variable.)
load-module-param-1 thru load-module-param-N are (big endian, hex
encoded) data which represent an OS/ABI specific encoding of the load
module. For example, a GNU/Linux system will pass (as
load-module-param-1) the link map address of the shared object
associated with the thread local storage under consideration. Other
operating environments may require different data, so the precise
meaning of these parameters will vary.
Reply:
XX...
Hex encoded (big endian) bytes representing the address of the thread
local storage requested.
Enn (where nn are hex digits)
An error occurred.
"" (empty)
An empty reply indicates that qGetTLSAddr is not supported by the stub.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2004-11-18-gdb-qGetTLSAddr.patch
URL: <http://sourceware.org/pipermail/gdb/attachments/20041118/27b6eac7/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2004-11-18-gdbserver-qGetTLSAddr.patch
URL: <http://sourceware.org/pipermail/gdb/attachments/20041118/27b6eac7/attachment-0001.ksh>
More information about the Gdb
mailing list