- Make llvm-symbolizer properly symbolize
files with split debug info (by using stanalone .dwo files).
- Make DWARFCompileUnit parse and store corresponding .dwo file,
if necessary.
- Make bits of DWARF parsing more CompileUnit-oriented.
Paths
| Differential D1164
Add support for DebugFission to DWARF parser ClosedPublic Authored by samsonov on Jul 17 2013, 5:14 AM.
Details
Summary
files with split debug info (by using stanalone .dwo files).
if necessary.
Diff Detail Event TimelineComment Actions Oh, and I would appreciate advice on writing tests for split-dwarf. Looks like debug info in the binaries built with -gsplit-dwarf always contains absolute paths to .dwo files, so checking in pre-built binaries is problematic... Generating .dwo files requires a fresh enough objcopy. Also, building binaries from source (or bytecode) in test cases would make it hard to predict the resulting object file layout and build (input, expected output) pairs for llvm-symbolizer... Comment Actions Few questions inline, otherwise looks pretty good.
Comment Actions I've commited minor parts of this patch as r187790, r187792, and mailed http://llvm-reviews.chandlerc.com/D1298 separately.
Comment Actions This is fine. I'm not really happy with the IsDWOIndex and might want to just put the form type in, but I'm not wedded to either idea. Thanks. Comment Actions
Rafael recently (temporarily) broke some of this code while doing some unique_ptr refactoring and we were both a bit surprised by the lack of test coverage. You make a good point though, that this isn't easy to test, but let's see if there's some way: What would happen if we build a dwo file somewhat manually - generating the assembly from Clang/LLVM, then hand-hacking the dwo file path (or just using clang -cc1 and specifying the dwo file name manually) as a relative path, rather than an absolute one. Would that produce a reusable test case we could commit to the lit suite? Otherwise, at least, it'd be useful to have some manual test steps written down somewhere (maybe in the test/ directory, just in the form of a text file with a FIXME and manual steps). Comment Actions Right, I was able to forge the test case by hacking -fdebug-compilation-dir in clang-cc1 invocation. The fix by Rafael was incorrect, and I had to debug nasty memory corruption (ASan FTW). Which is one more proof of "never-compromise-the-testing" rule. Sigh.
Revision Contents
Diff 2864 include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/DWARFFormValue.h
lib/DebugInfo/DWARFCompileUnit.h
lib/DebugInfo/DWARFCompileUnit.cpp
lib/DebugInfo/DWARFContext.h
lib/DebugInfo/DWARFContext.cpp
lib/DebugInfo/DWARFDebugAranges.cpp
lib/DebugInfo/DWARFDebugInfoEntry.h
lib/DebugInfo/DWARFDebugInfoEntry.cpp
lib/DebugInfo/DWARFFormValue.cpp
|
Unfortunate naming in english. How about CK_DWARF?