[all-commits] [llvm/llvm-project] 854a9b: [Support][lldb] Port xz (lzma) decompression from ...
Janet Yang via All-commits
all-commits at lists.llvm.org
Mon Sep 21 10:10:12 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 854a9b8d7036ef52490edfb644f30ba043a0f238
https://github.com/llvm/llvm-project/commit/854a9b8d7036ef52490edfb644f30ba043a0f238
Author: Janet Yang <qxy11 at meta.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M .ci/green-dragon/lldb-ubuntu.groovy
M lldb/cmake/modules/LLDBConfig.cmake
M lldb/docs/resources/build.md
M lldb/include/lldb/Host/Config.h.cmake
R lldb/include/lldb/Host/LZMA.h
M lldb/source/Core/Debugger.cpp
M lldb/source/Host/CMakeLists.txt
R lldb/source/Host/common/LZMA.cpp
M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
M lldb/test/CMakeLists.txt
M lldb/test/Shell/lit.cfg.py
M lldb/test/Shell/lit.site.cfg.py.in
M llvm/CMakeLists.txt
M llvm/cmake/config-ix.cmake
M llvm/cmake/modules/LLVMConfig.cmake.in
M llvm/docs/CMake.md
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/Config/llvm-config.h.cmake
M llvm/include/llvm/Support/Compression.h
M llvm/lib/Support/CMakeLists.txt
M llvm/lib/Support/Compression.cpp
M llvm/test/CMakeLists.txt
M llvm/test/lit.site.cfg.py.in
M llvm/unittests/Support/CompressionTest.cpp
M llvm/utils/gn/secondary/lldb/include/lldb/Host/BUILD.gn
M llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
M llvm/utils/gn/secondary/lldb/test/BUILD.gn
M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
M llvm/utils/lit/lit/llvm/config.py
M utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
M utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
M utils/bazel/llvm-project-overlay/third-party/BUILD.bazel
M utils/bazel/llvm_configs/llvm-config.h.cmake
Log Message:
-----------
[Support][lldb] Port xz (lzma) decompression from LLDB into LLVM (#220092)
### Summary
LLDB's `lldb_private::lzma` is currently the only xz decompressor in the
tree. It reads the ELF `.gnu_debugdata` (MiniDebugInfo) section, whose
embedded symbol table can sometimes be the only source of function names
in a stripped binary. Move it to `'llvm::compression::xz` so that other
tools like llvm-gsymutil can use it.
- Only decompression is implemented and it's kept out of
`compression::Format` since it's not written by LLVM and is produced by
an extra packaging step. It also doesn't model the schemes usable for
SHF_COMPRESSED sections, which are self-describing via some type of
`ELFCOMPRESS_*` constant, which doesn't exist for XZ.
- Reformats the ported code to LLVM standards, but avoids other
functional changes unless a comment was specifically made on the PR to
address it. There is a latent bug in the ported code where
`lzma_index_buffer_decode()` was passed a pointer to the stream index
but the size of the whole stream, which could've caused it to
technically read past the end of the buffer. Valid streams aren't
currently affected since the index is self-delimiting and CRC-checked,
so this will just be addressed in a following PR.
- `LLDB_ENABLE_LZMA` is replaced by `LLVM_ENABLE_LZMA`, and is default
to ON globally. Cases where LLDB_ENABLE_LZMA and LLVM_ENABLE_LZMA are in
disagreement will fail, and otherwise, uses of LLDB_ENABLE_LZMA will
result in deprecation warnings.
- In the Bazel overlay, @llvm-project//lldb:lzma=system flag can no
longer work for the same reason, so it is replaced by
-- at llvm-project//third-party:llvm_enable_lzma=true via a new
//third-party:lzma target alongside the existing zlib and zstd wrappers.
### Testing
Added a unit test testing the decompression
Existing LLDB unit tests of minidebuginfo still passing
Tested with `LLVM_ENABLE_LZMA` both on and off, check-llvm, and
check-lldb-shell are clean.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list