Hello LLVM-World, I have a question about dumping debug information. 1.) I have compiled an object file with visual studio and debug information. Then I used "llvm-readobj -codeview" and dumped the debug information into a file. This is working great 2.) I used clang-cl for the same task and finally dumped it again with "llvm-readobj". Worked great too. 3.) Then I used clang-cl to generate a .bc file - but now I'm not able to use "llvm-readobj" anymore. Is there any tool available which can dump this debug information too? Kind regards Björn Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Hiroshi Kawamura, Takashi Nagano, Takeshi Fukushima. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180117/4eb0dc00/attachment.html>
> > 3.) Then I used clang-cl to generate a .bc file - but now I'm not able to > use "llvm-readobj" anymore. Is there any tool available which can dump this > debug information too? >.bc is LLVM bitcode [1], not the usual object file. `llvm-readobj` should works only on the latter. [1] https://llvm.org/docs/BitCodeFormat.html -- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180117/899fad67/attachment.html>
Reid Kleckner via llvm-dev
2018-Jan-17 17:29 UTC
[llvm-dev] Dumping debug information from BC files
The debug information is actually still in a different format in the .bc file, it is LLVM metadata. I think the best reference for it is here: https://llvm.org/docs/SourceLevelDebugging.html#ccxx-frontend You can dump it just by disassembling the .bc file to textual IR using llvm-dis and examining the !DI* metadata nodes. You will have to run the file through llc to generate an object file to generate actual CodeView or DWARF. On Wed, Jan 17, 2018 at 5:09 AM, 陳韋任 via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 3.) Then I used clang-cl to generate a .bc file - but now I'm not able to >> use "llvm-readobj" anymore. Is there any tool available which can dump this >> debug information too? >> > > .bc is LLVM bitcode [1], not the usual object file. `llvm-readobj` should > works only on the latter. > > [1] https://llvm.org/docs/BitCodeFormat.html > > -- > Wei-Ren Chen (陳韋任) > Homepage: https://people.cs.nctu.edu.tw/~chenwj > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://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/20180117/75068be9/attachment.html>
Possibly Parallel Threads
- Dumping debug information from BC files
- Dumping debug information from BC files
- Dumping debug information from BC files
- Improve ScopedPrinter::printNumber? (was: [llvm] r313816 - [llvm-readobj] Fix 'Teach readobj to dump .res files'.)
- [llvm-readobj][RFC]Making llvm-readobj GNU command-line compatible