[LLVMdev] question on generating dwarf metadata
Bagel
bagel99 at gmail.com
Fri Dec 3 14:39:42 PST 2010
I am writing a front end for a new language and am having trouble generating
the DWARF debugging information. I'm outputting llvm assembly source so I'm
trying to generate the "!metadata" stuff.
I have found the document <http://llvm.org/docs/SourceLevelDebugging.html> a
helpful start, as far as it goes. However, it doesn't quite match what I see
clang produce when I use the flags "clang -g -S -emit-llvm ..." in all cases.
And it is incomplete, for example, how does one deal with a function that
returns multiple values?
I seem to get different results when I feed the .ll file to llc than when I
feed it the clang, clang gives error messages when it doesn't like the metadata
structure, llc appears not to do so.
Is there another document I should look at?
Should I be looking at source code? Where are the structures that start with
DW_TAG's parsed?
In general, what's resources does a front end implementer have in order to
understand how to generate the DWARF stuff via llvm assembly source?
thanks, bagel
More information about the llvm-dev
mailing list