<font size=2 face="sans-serif">Thank you for your reply.</font>
<br>
<br><font size=2 face="sans-serif">When I'm running "llvm-readobj"
on an .obj file I get a result like shown in my attachment. This is very
easy to read. I don't know if this is the codeview format. I would like
to get this kind of debug information form a .bc file too, because I JIT
them and wanted to try to build a debugger. With the file from "llvm-readobj"
I see no problem - but when using the metadata I have no clue how to find
variables on the stack - there are only this intrinsics, but I don't know
how to handle them. </font>
<br><font size=2 face="sans-serif">Maybe I asked the wrong question :/</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Reid Kleckner <rnk@google.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">陳韋任 <chenwj.cs97g@g2.nctu.edu.tw></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:      
 </font><font size=1 face="sans-serif">bjoern.gaier@horiba.com,
LLVM Developers Mailing List <llvm-dev@lists.llvm.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">17.01.2018 18:29</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: [llvm-dev]
Dumping debug information from BC files</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>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: </font><a href="https://llvm.org/docs/SourceLevelDebugging.html#ccxx-frontend"><font size=3 color=blue><u>https://llvm.org/docs/SourceLevelDebugging.html#ccxx-frontend</u></font></a>
<br>
<br><font size=3>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.</font>
<br>
<br><font size=3>On Wed, Jan 17, 2018 at 5:09 AM, 陳韋任 via llvm-dev
<</font><a href="mailto:llvm-dev@lists.llvm.org" target=_blank><font size=3 color=blue><u>llvm-dev@lists.llvm.org</u></font></a><font size=3>>
wrote:</font>
<br><font size=2 face="sans-serif">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?</font><font size=3> </font>
<br>
<br><font size=3 face="Arial">​.bc is LLVM bitcode [1], not the usual
object file. `llvm-readobj` should works only on the latter.</font>
<br>
<br><font size=3 face="Arial">​[1] </font><a href=https://llvm.org/docs/BitCodeFormat.html target=_blank><font size=3 color=blue face="Arial"><u>https://llvm.org/docs/BitCodeFormat.html</u></font></a>
<br>
<br><font size=3 color=#8f8f8f>-- </font>
<br><font size=3 color=#8f8f8f>Wei-Ren Chen (陳韋任)<br>
Homepage: </font><a href=https://people.cs.nctu.edu.tw/~chenwj target=_blank><font size=3 color=blue><u>https://people.cs.nctu.edu.tw/~chenwj</u></font></a>
<br><font size=3><br>
_______________________________________________<br>
LLVM Developers mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:llvm-dev@lists.llvm.org"><font size=3 color=blue><u>llvm-dev@lists.llvm.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target=_blank><font size=3 color=blue><u>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</u></font></a><font size=3><br>
</font>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr.
DE 114 165 789<br>
Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko
Lampert, Hiroshi Kawamura, Takashi Nagano, Takeshi Fukushima.<br>
<br>
</font>