<div dir="ltr">What does GCC do?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 9, 2019 at 10:25 PM kamlesh kumar via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>