https://github.com/LauraElanorJones created 
https://github.com/llvm/llvm-project/pull/154040

[lldb] NFC Rename RecursiveDecentFormatter to RecursiveDescentFormatter

>From 7d235fe77df46cfe2525cbed2a9944a6f208a613 Mon Sep 17 00:00:00 2001
From: LauraElanorJones <164247463+lauraelanorjo...@users.noreply.github.com>
Date: Fri, 16 May 2025 18:49:02 -0700
Subject: [PATCH 1/2] Update python.rst

Fix code block formatting in section "The Decision Point Breakpoint Commands"
---
 lldb/docs/use/python.rst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lldb/docs/use/python.rst b/lldb/docs/use/python.rst
index d9c29d95708c1..3a919f2a8cdb1 100644
--- a/lldb/docs/use/python.rst
+++ b/lldb/docs/use/python.rst
@@ -330,9 +330,12 @@ decision to go right:
       process.Continue()
    else:
       print "Here is the problem; going right, should go left!"
-   Just as a reminder, LLDB is going to take this script and wrap it up in a 
function, like this:
 
 
+Just as a reminder, LLDB is going to take this script and wrap it up in a 
function, like this:
+
+::
+
    def some_unique_and_obscure_function_name (frame, bp_loc):
       global path
       if path[0] == 'R':

>From 76bf24e54f780da502e26705d1408821b03e7dbc Mon Sep 17 00:00:00 2001
From: LauraElanorJones <laura.elanor.jo...@gmail.com>
Date: Sun, 17 Aug 2025 14:09:23 -0700
Subject: [PATCH 2/2] [lldb] NFC Rename RecursiveDecentFormatter to
 RecursiveDescentFormatter

---
 lldb/packages/Python/lldbsuite/test/lldbutil.py | 7 +++----
 lldb/test/API/python_api/value/TestValueAPI.py  | 2 +-
 lldb/utils/lui/lldbutil.py                      | 7 +++----
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py 
b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 8112705438c1f..b8a78b71f5ec1 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -1464,8 +1464,8 @@ def format(self, value, buffer=None):
         return output.getvalue()
 
 
-class RecursiveDecentFormatter(BasicFormatter):
-    """The recursive decent formatter prints the value and the decendents.
+class RecursiveDescentFormatter(BasicFormatter):
+    """The recursive descent formatter prints the value and the descendents.
 
     The constructor takes two keyword args: indent_level, which defaults to 0,
     and indent_child, which defaults to 2.  The current indentation level is
@@ -1482,7 +1482,6 @@ def format(self, value, buffer=None):
             output = io.StringIO()
         else:
             output = buffer
-
         BasicFormatter.format(self, value, buffer=output, indent=self.lindent)
         new_indent = self.lindent + self.cindent
         for child in value:
@@ -1490,7 +1489,7 @@ def format(self, value, buffer=None):
                 BasicFormatter.format(self, child, buffer=output, 
indent=new_indent)
             else:
                 if child.GetNumChildren() > 0:
-                    rdf = RecursiveDecentFormatter(indent_level=new_indent)
+                    rdf = RecursiveDescentFormatter(indent_level=new_indent)
                     rdf.format(child, buffer=output)
                 else:
                     BasicFormatter.format(self, child, buffer=output, 
indent=new_indent)
diff --git a/lldb/test/API/python_api/value/TestValueAPI.py 
b/lldb/test/API/python_api/value/TestValueAPI.py
index 0da57346212d0..907992bf05c04 100644
--- a/lldb/test/API/python_api/value/TestValueAPI.py
+++ b/lldb/test/API/python_api/value/TestValueAPI.py
@@ -83,7 +83,7 @@ def test(self):
 
         fmt = lldbutil.BasicFormatter()
         cvf = lldbutil.ChildVisitingFormatter(indent_child=2)
-        rdf = lldbutil.RecursiveDecentFormatter(indent_child=2)
+        rdf = lldbutil.RecursiveDescentFormatter(indent_child=2)
         if self.TraceOn():
             print(fmt.format(days_of_week))
             print(cvf.format(days_of_week))
diff --git a/lldb/utils/lui/lldbutil.py b/lldb/utils/lui/lldbutil.py
index 6cbf4a302f65f..140317af3670b 100644
--- a/lldb/utils/lui/lldbutil.py
+++ b/lldb/utils/lui/lldbutil.py
@@ -1040,8 +1040,8 @@ def format(self, value, buffer=None):
         return output.getvalue()
 
 
-class RecursiveDecentFormatter(BasicFormatter):
-    """The recursive decent formatter prints the value and the decendents.
+class RecursiveDescentFormatter(BasicFormatter):
+    """The recursive descent formatter prints the value and the descendents.
 
     The constructor takes two keyword args: indent_level, which defaults to 0,
     and indent_child, which defaults to 2.  The current indentation level is
@@ -1058,7 +1058,6 @@ def format(self, value, buffer=None):
             output = io.StringIO()
         else:
             output = buffer
-
         BasicFormatter.format(self, value, buffer=output, indent=self.lindent)
         new_indent = self.lindent + self.cindent
         for child in value:
@@ -1066,7 +1065,7 @@ def format(self, value, buffer=None):
                 BasicFormatter.format(self, child, buffer=output, 
indent=new_indent)
             else:
                 if child.GetNumChildren() > 0:
-                    rdf = RecursiveDecentFormatter(indent_level=new_indent)
+                    rdf = RecursiveDescentFormatter(indent_level=new_indent)
                     rdf.format(child, buffer=output)
                 else:
                     BasicFormatter.format(self, child, buffer=output, 
indent=new_indent)

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to