[LLVMdev] DWARF validation?

Talin viridia at gmail.com
Thu Mar 12 13:06:51 PDT 2015


When developing an LLVM-based frontend, is there a way to automatically
verify that the DWARF metadata being emitted is correct? Specifically, I'd
like to be able to write some sort of unit test that will fail if the DWARF
is invalid. I don't just want to test whether the LLVM metadata statements
are well-formed - if I make a change that will cause lldb or gdb to barf, I
would like to have at least a 50% chance to catch this beforehand. I can't
really run the debugger in a unit test, and even if I could the resulting
error message is likely to be poor. This means that the validator would
have to incorporate knowledge of the DWARF standard. Is there such a thing?

Trying to ensure that DWARF is correct is one of the reasons why I
abandoned my earlier LLVM project a few years ago, it was simply too hard
then. I'm just wondering if the situation has improved in the last several
years.

-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150312/135a0749/attachment.html>


More information about the llvm-dev mailing list