[Lldb-commits] [lldb] 38657c0 - [lldb] Add zlib to version -v output (#174753)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 7 07:26:59 PST 2026
Author: David Spickett
Date: 2026-01-07T15:26:55Z
New Revision: 38657c0ded4800a407f574233892c50b731f2a8d
URL: https://github.com/llvm/llvm-project/commit/38657c0ded4800a407f574233892c50b731f2a8d
DIFF: https://github.com/llvm/llvm-project/commit/38657c0ded4800a407f574233892c50b731f2a8d.diff
LOG: [lldb] Add zlib to version -v output (#174753)
I know this is required for at least one feature, because
TestSectionAPI.py has failures if zlib isn't enabled. So I think it's
useful for users to be able to check.
Now that it's in the config, I have also used it to make a test
annotation so we don't get the failure in TestSectionAPI.py when zlib is
disabled.
Which for future reference was:
Traceback (most recent call last):
File
"/home/davspi01/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py",
line 452, in wrapper
return func(self, *args, **kwargs)
File
"/home/davspi01/llvm-project/lldb/test/API/python_api/section/TestSectionAPI.py",
line 67, in test_compressed_section_data
self.assertEqual(section_data, [0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
0x80, 0x90])
AssertionError: Lists differ: [] != [32, 48, 64, 80, 96, 112, 128, 144]
As it failed to decode the compressed section.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/decorators.py
lldb/source/Core/Debugger.cpp
lldb/test/API/python_api/section/TestSectionAPI.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index e65f58d9cf435..a7df9fe63badc 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -1200,6 +1200,10 @@ def skipIfFBSDVMCoreSupportMissing(func):
return _get_bool_config_skip_if_decorator("fbsdvmcore")(func)
+def skipIfZLIBSupportMissing(func):
+ return _get_bool_config_skip_if_decorator("zlib")(func)
+
+
def skipIfLLVMTargetMissing(target):
config = lldb.SBDebugger.GetBuildConfiguration()
targets = config.GetValueForKey("targets").GetValueForKey("value")
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 99f4a728e3f17..c90de35cf447c 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -2482,6 +2482,9 @@ StructuredData::DictionarySP Debugger::GetBuildConfiguration() {
AddBoolConfigEntry(*config_up, "editline_wchar", LLDB_EDITLINE_USE_WCHAR,
"A boolean value that indicates if editline wide "
"characters support is enabled in LLDB");
+ AddBoolConfigEntry(
+ *config_up, "zlib", LLVM_ENABLE_ZLIB,
+ "A boolean value that indicates if zlib support is enabled in LLDB");
AddBoolConfigEntry(
*config_up, "lzma", LLDB_ENABLE_LZMA,
"A boolean value that indicates if lzma support is enabled in LLDB");
diff --git a/lldb/test/API/python_api/section/TestSectionAPI.py b/lldb/test/API/python_api/section/TestSectionAPI.py
index b874a78baff83..faad1ba70d39c 100644
--- a/lldb/test/API/python_api/section/TestSectionAPI.py
+++ b/lldb/test/API/python_api/section/TestSectionAPI.py
@@ -53,6 +53,7 @@ def test_get_alignment(self):
@no_debug_info_test
@skipIfXmlSupportMissing
+ @skipIfZLIBSupportMissing
def test_compressed_section_data(self):
exe = self.getBuildArtifact("compressed-sections.out")
self.yaml2obj("compressed-sections.yaml", exe)
More information about the lldb-commits
mailing list