This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add zstd support
Needs ReviewPublic

Authored by ckissane on Sep 8 2022, 2:35 PM.

Details

Summary

adds zstd support to Decompressor so lldb can work with zstd

Diff Detail

Event Timeline

ckissane created this revision.Sep 8 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 2:35 PM
ckissane requested review of this revision.Sep 8 2022, 2:35 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 8 2022, 2:35 PM
MaskRay retitled this revision from add zstd support for lldb to [lldb] Add zstd support.Sep 8 2022, 8:38 PM
MaskRay added a reviewer: labath.
MaskRay added inline comments.
lldb/test/Shell/ObjectFile/ELF/compressed-sections-zstd.yaml
19

Delete .zdebug. It is unrelated to zstd

26

Align

llvm/lib/Object/Decompressor.cpp
48

Use a switch so that in the case of new compression format, the code get notified due to -Wswitch

52

Just use the return type of getReasonIfUnsupported as the error message

74
labath added a comment.Sep 9 2022, 2:42 AM

Seems fine to me, though you may want to have a llvm test for the new functionality, given that the patch is exclusively changing llvm code.

psykose added a subscriber: psykose.Sep 9 2022, 7:17 PM

Ping for unresolved issues.

It seems like the new code doesn't check zstd version, thus breaking the build if you have something below 1.4.0.