>>>>> "Jakub" == Jakub Jelinek <ja...@redhat.com> writes:

Jakub> I admit I haven't looked at the GDB changes, but how will the debugger 
know
Jakub> if it is an emutls emulation or normal ELF TLS, if the same op is used
Jakub> in both cases?

Because gdb never implemented DW_OP_form_tls_address, that emultls case
has never worked.

My view is that, if it ought to work, then this has to be some sort of
platform-specific thing.  gdb already lets different platforms implement
TLS lookup differently; it can be done by the target or by the arch, see
target_translate_tls_address.

My suspicion is that the history here is just that
DW_OP_GNU_push_tls_address was introduced to solve this problem, then
formalized in DWARF, and then for some reason never followed up on.

Jakub> Also, as this effectively requires the latest unreleased GDB under the
Jakub> default options for something that has been working previously, I wonder
Jakub> if it e.g. for some time shouldn't be guarded with dwarf_version >= 5
Jakub> (which will require substantial changes in gdb anyway), and only be 
changed
Jakub> back to dwarf_version >= 3 in 2 years or so when newer debugger will be 
much
Jakub> more common.

I'd be amenable to that.  It did occur to me after sending that the
DWARF 5 work is going to require a new gdb anyhow.

Tom

Reply via email to