This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB support for thread-local storage
- From: Jim Blandy <jimb at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gdb at sources dot redhat dot com
- Date: 19 Jun 2002 14:20:43 -0500
- Subject: Re: GDB support for thread-local storage
- References: <Pine.LNX.4.44.0206191303390.21577-100000@dberlin.org>
Daniel Berlin <dberlin@dberlin.org> writes:
> > Unfortunately, Dwarf 2 location expressions cannot perform function
> > calls in the inferior.
>
> Errr, buzz.
>
> See DW_OP_call_* in dwarf3
(As I wrote that sentence, I was wondering whether I should clarify
this point.)
The function one may need to invoke to find thread-local storage,
__tls_get_addr, is an actual native code function, in the dynamic
linker. The DW_OP_call_* operations allow a Dwarf expression to call
another Dwarf expression like a function. But you can't use the
DW_OP_call_* operations to invoke machine-language functions in the
inferior.
> It's not just turing complete anymore, one could probably write useful
> application extensions in dwarf3.
> Scary.
I thought so too, but then I noticed that there are no memory store
operations. You can do stuff on the stack, but you can't modify
memory, or do any I/O. Grave omissions, which should be rectified
immediately.