[Lldb-commits] [lldb] 8b62114 - [lldb] Delete unused lldbutil.print_registers (NFC)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Sat Jan 25 09:40:51 PST 2025


Author: Dave Lee
Date: 2025-01-25T09:39:10-08:00
New Revision: 8b6211472793680994f7bc15abb5910d0a916cc5

URL: https://github.com/llvm/llvm-project/commit/8b6211472793680994f7bc15abb5910d0a916cc5
DIFF: https://github.com/llvm/llvm-project/commit/8b6211472793680994f7bc15abb5910d0a916cc5.diff

LOG: [lldb] Delete unused lldbutil.print_registers (NFC)

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbutil.py
    lldb/test/API/macosx/universal/TestUniversal.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 07b5f8cc7d900b..ef068cf7f9ed10 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -1353,33 +1353,6 @@ def get_args_as_string(frame, showFuncName=True):
         return "(%s)" % (", ".join(args))
 
 
-def print_registers(frame, string_buffer=False):
-    """Prints all the register sets of the frame."""
-
-    output = io.StringIO() if string_buffer else sys.stdout
-
-    print("Register sets for " + str(frame), file=output)
-
-    registerSet = frame.GetRegisters()  # Return type of SBValueList.
-    print(
-        "Frame registers (size of register set = %d):" % registerSet.GetSize(),
-        file=output,
-    )
-    for value in registerSet:
-        # print(value, file=output)
-        print(
-            "%s (number of children = %d):" % (value.GetName(), value.GetNumChildren()),
-            file=output,
-        )
-        for child in value:
-            print(
-                "Name: %s, Value: %s" % (child.GetName(), child.GetValue()), file=output
-            )
-
-    if string_buffer:
-        return output.getvalue()
-
-
 def get_registers(frame, kind):
     """Returns the registers given the frame and the kind of registers desired.
 

diff  --git a/lldb/test/API/macosx/universal/TestUniversal.py b/lldb/test/API/macosx/universal/TestUniversal.py
index aecc8814b377eb..3c043df641978c 100644
--- a/lldb/test/API/macosx/universal/TestUniversal.py
+++ b/lldb/test/API/macosx/universal/TestUniversal.py
@@ -57,8 +57,6 @@ def test_sbdebugger_create_target_with_file_and_target_triple(self):
     @skipIf(compiler="clang", compiler_version=["<", "7.0"])
     def test_process_launch_for_universal(self):
         """Test process launch of a universal binary."""
-        from lldbsuite.test.lldbutil import print_registers
-
         if not haswellOrLater():
             return
 


        


More information about the lldb-commits mailing list