[llvm-dev] [JIT] Evaluating Debug-Metadata in bitcode

via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 19 06:17:43 PST 2018


Hello LLVM-People,

I'm still a beginner with the LLVM, but I really like the concept and the 
possibilities with the JIT.

Currently I compile simple functions with clang-cl into bitcode files. 
After this I use another program to JIT this bitcode files and execute 
functions of it - like lli.
Thanks to a lot of mails and so on, I understood that a bitcode file is in 
fact still IR-Code, but with another representation - so when I JIT this 
file with my application, I'm acting like a compiler (like llc).

But what does happen to the debug information? When I generate the files 
in human readable code I can easily discover the metadata and understand 
them. So I want to extend my application, that it can debug the code, 
which was jitted. This seems difficult. When I get the address of a debug 
break, I can only identify the function where the exception occurred. I 
don't see a way to connect the metadata to the offset I could calculate 
from the exception and the function. Also I don't know how to progress the 
metadata when it's in its bitcode form. So - how can I start with this 
task?

Kind regards
Björn Gaier


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/20180119/0a8e51bf/attachment.html>


More information about the llvm-dev mailing list