This is the mail archive of the gdb@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: GDB support for thread-local storage


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.


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