[RFC] Generic support for qGetTLSAddr packet

Andrew Cagney cagney@gnu.org
Sun Dec 12 18:17:00 GMT 2004

Kevin Buettner wrote:
> The patch below implements support for the qGetTLSAddr packet.  See:
>     http://sources.redhat.com/ml/gdb/2004-11/msg00189.html
> This patch also adds a new gdbarch method for fetching the OS / ABI
> specific load module parameters.
> Still to come are three patches.  They do the following:
>     - Add documentation of remote_qGetTLSAddr_load_module_params to
>       gdbint.texinfo.
>     - Instantiate remote_qGetTLSAddr_load_module_params for GNU/Linux
>       running on an i386.
>     - Provide an implementation of the qGetTLSAddr packet for
>       gdbserver.

Kevin, check my original comments about the protocol.  I identified what 
you've hit here - having to add extra architecture methods.

inferior.get_thread_local_address should take the raw address (to match 
the packet) and not the objfile parameter.  The thread code can then 
extract the necessary address and call the target vector with it.  Of 
course the linux nat code would also need to be adjusted.

Consider the get_thread_local_address interface change pre-approved.


PS: I'd stick with the qGetTLSAddr function name, it's consistent with 
the rest of remote.c where the corresponding packet name has been used, 
and makes tracking down the function much simpler.

More information about the Gdb-patches mailing list