]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1874723 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Fri, 3 Apr 2020 19:43:19 +0000 (19:43 +0000)
committerRuediger Pluem <rpluem@apache.org>
Fri, 3 Apr 2020 19:43:19 +0000 (19:43 +0000)
* Use a loop instead of recursion to iterate over pool siblings

Submitted by: rpluem
Reviewed by: rpluem (Backports of .gdbinit changes are CTR)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1876102 13f79535-47bb-0310-9956-ffa450edef68

.gdbinit

index 336ea2ba3fc5f793e06bae68de14690866a674b3..0a3d88326a3ef71deb3786b43ee0d1978fa9602b 100644 (file)
--- a/.gdbinit
+++ b/.gdbinit
@@ -523,13 +523,12 @@ class DumpPoolAndChilds (gdb.Command):
 
   def _dump(self, arg, depth):
     pool = arg
-    print("%*c" % (depth * 4 + 1, " "), end="")
-    self._dump_one_pool(pool)
-    if pool['child'] != 0:
-      self._dump(pool['child'], depth + 1)
-    s = pool['sibling']
-    if s != 0:
-      self._dump(s, depth)
+    while pool:
+        print("%*c" % (depth * 4 + 1, " "), end="")
+        self._dump_one_pool(pool)
+        if pool['child'] != 0:
+            self._dump(pool['child'], depth + 1)
+        pool = pool['sibling']
 
   def invoke (self, arg, from_tty):
     pool = gdb.parse_and_eval(arg)