This is an archive of the discontinued LLVM Phabricator instance.

Add support for the DWP debug info format
ClosedPublic

Authored by tberghammer on Jul 30 2017, 9:21 AM.

Details

Summary

The DWP (DWARF package) format is used to pack multiple dwo files
generated by split-dwarf into a single ELF file to make distributing
them easier. It is part of the DWARFv5 spec and can be generated by
dwp or llvm-dwp from a set of dwo files.

Caviats:

  • Only the new version of the dwp format is supported (v2 in GNU numbering schema and v5 in the DWARF spec). The old version (v1) is already deprecated but binutils 2.24 still generates that one.
  • Combining DWP files with module debugging is not yet supported.

Event Timeline

tberghammer created this revision.Jul 30 2017, 9:21 AM

Improve error handling

Note about testing: I haven't manage to come up with any good approach so far for testing because only fairly new version of dwp or llvm-dwp can generate the format I am expecting here so adding a new config for the existing test suite seems a bit infeasible and also it would increase the testing time by a non negligible time.

Hi Jason,

Can you take a look?

Thanks,
Tamas

jasonmolenda accepted this revision.Aug 24 2017, 4:06 PM

I apologize for taking so long to look at this Tamas, I was in the middle of end-of-release stuff when the patch first came in, and I lost track of it. :/ This all looks fine to me, there was one little question about a DataExtractor ctor call.

source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
69

Shouldn't this be passing in an lldb::ByteOrder enum value? Maybe I'm looking at the wrong DataExtractor ctor.

This revision is now accepted and ready to land.Aug 24 2017, 4:06 PM
tberghammer added inline comments.Aug 25 2017, 3:39 AM
source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
69

I am creating an llvm::DataExtractor (https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Support/DataExtractor.h#L51) to be able to pass it to llvm::DWARFUnitIndex what is taking it as a bool.

This revision was automatically updated to reflect the committed changes.