[llvm-dev] Dumping debug information from BC files

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 17 09:29:37 PST 2018


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>


More information about the llvm-dev mailing list