[LLVMdev] RFC: Improving our DWARF (and ELF) emission testing capabilities
Robinson, Paul
Paul.Robinson at am.sony.com
Tue Jan 22 15:23:30 PST 2013
>>> 2. Relying of assembly directive emissions (i.e. .cfi_*), which is
>>> cumbersome and misses a lot of things like actual DWARF encoding.
>>
>> I'm not sure what you mean by "actual DWARF encoding" here.
>> (disclaimer: I've only recently started dabbling with debug info, so I
>> may be missing obvious things)
>
> I mean that it doesn't test the whole way, and there's quite a bit of
> DWARF-related functionality in MC. So when a test relies on matching
> directives in ASM output, there's quite a bit of code in MC it doesn't
> exercise.
Hmmm. "Proper" testing would exercise each component involved, as well
as possibly longer paths that maybe are not exactly the sum of the parts.
Debug info changes are quite likely to involve most or all of:
- Clang's C/C++ to IR (metadata)
- LLVM's IR to assembler source
- assembler source to object file
- LLVM's IR to object file (which partly bypasses or can be different
from the previous two paths)
Properly speaking they should each get their own tests.
Not to mention a unit-test (or debuginfo-test) to exercise the complete
Clang -> object (-> debugger) sequence.
I try to be good about this, but as a developer I find that sort of
thing tedious. Which mostly proves that I suck at QA, and have to depend
on reviewers to keep me on the straight and narrow. This works to the
extent that those reviewers are willing to be critical of my efforts,
and insist on adequate (instead of minimal) testing. But testing is
an art unto itself, and most developers aren't good at it.
--paulr
More information about the llvm-dev
mailing list