From 37b0b0f7d2b67fedd347a4011582802303657e69 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 27 Jun 2025 08:30:02 -0700 Subject: [lldb] Add class property for the version string (#145974) Add a class property for the version string. This allows you to use access the version string through `lldb.SBDebugger.version` instead of having to call `lldb.SBDebugger.GetVersionString()`. --- lldb/test/API/python_api/debugger/TestDebuggerAPI.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lldb/test/API/python_api/debugger/TestDebuggerAPI.py') diff --git a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py index 646ccce36530..43f45f330ee2 100644 --- a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py +++ b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py @@ -286,3 +286,11 @@ class DebuggerAPITestCase(TestBase): ('remove bar ret', False), # remove_bar should fail, because it's already invoked and removed ('foo called', original_dbg_id), # foo should be called ]) + + def test_version(self): + instance_str = self.dbg.GetVersionString() + class_str = lldb.SBDebugger.GetVersionString() + property_str = lldb.SBDebugger.version + + self.assertEqual(instance_str, class_str) + self.assertEqual(class_str, property_str) -- cgit v1.2.3