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

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 9 23:24:42 PST 2019


What does GCC do?

On Mon, Dec 9, 2019 at 10:25 PM kamlesh kumar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> 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
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191209/efcf422a/attachment.html>


More information about the llvm-dev mailing list