<div dir="ltr">Hi Devs,<br><div><br></div><div>consider below testcase</div><div>$cat test.c</div><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,254)"><div>__thread <span style="color:rgb(0,0,255)">int</span> mtls=<span style="color:rgb(9,136,90)">1</span>;</div><div><span style="color:rgb(0,0,255)">void</span> foo(){</div><div>mtls++;</div><div>}</div><div><br></div></div></div><div>it emits this debug info for mtls</div><div><br>0x0000002a:   DW_TAG_variable<br>                DW_AT_name      ("mtls")<br>                DW_AT_type      (0x00000035 "int")<br>                DW_AT_external  (true)<br>                DW_AT_decl_file ("test.c")<br>                DW_AT_decl_line (1)<br><br></div><div>which does not contain DW_AT_Location.</div><div><br></div><div>Currently, aarch64 does not emit DW_AT_Location for TLS variables.</div><div><div>I could see at this line, it says some restriction in aarch64 elf abi.</div><div><a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AArch64/AArch64TargetObjectFile.cpp#L24">https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AArch64/AArch64TargetObjectFile.cpp#L24</a></div></div><div><br></div><div>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?</div><div><br></div><div><br></div><div>./Kamlesh</div><div><br></div><div><br></div><div><br></div></div>