[llvm-dev] aarch64 do not generate debug info for tls var

kamlesh kumar via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 9 22:24:46 PST 2019


Hi Devs,

consider below testcase
$cat test.c
__thread int mtls=1;
void foo(){
mtls++;
}

it emits this debug info for mtls

0x0000002a:   DW_TAG_variable
                DW_AT_name      ("mtls")
                DW_AT_type      (0x00000035 "int")
                DW_AT_external  (true)
                DW_AT_decl_file ("test.c")
                DW_AT_decl_line (1)

which does not contain DW_AT_Location.

Currently, aarch64 does not emit DW_AT_Location for TLS variables.
I could see at this line, it says some restriction in aarch64 elf abi.
https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AArch64/AArch64TargetObjectFile.cpp#L24

I would like to know community thoughts on this and is there any other way
to tackle this, or we simply can not debug TLS variables for this
architecture?


./Kamlesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191210/fc1e9464/attachment.html>


More information about the llvm-dev mailing list