kamlesh kumar via llvm-dev
2019-Dec-10 06:24 UTC
[llvm-dev] aarch64 do not generate debug info for tls var
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>
David Blaikie via llvm-dev
2019-Dec-10 07:24 UTC
[llvm-dev] aarch64 do not generate debug info for tls var
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>
kamlesh kumar via llvm-dev
2019-Dec-10 11:29 UTC
[llvm-dev] aarch64 do not generate debug info for tls var
GCC's behavior matches LLVM. so should we leave it? On Tue, Dec 10, 2019 at 12:54 PM David Blaikie <dblaikie at gmail.com> wrote:> 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/20191210/08ba7177/attachment.html>
Seemingly Similar Threads
- aarch64 do not generate debug info for tls var
- aarch64 does not emit DW_AT_Location
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?
- [LLVMdev] How is variable info retrieved in debugging for executables generated by llvm backend?