summaryrefslogtreecommitdiffstats
path: root/.gdbinit
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2020-03-03 15:12:39 +0100
committerRuediger Pluem <rpluem@apache.org>2020-03-03 15:12:39 +0100
commit7a3404c67139493762c11398ad84cdcf8c2c7c79 (patch)
tree729039a6d6a7fb8e1438586b2ff2880cdf74e3b2 /.gdbinit
parentFix travis config validation warnings. (diff)
downloadapache2-7a3404c67139493762c11398ad84cdcf8c2c7c79.tar.xz
apache2-7a3404c67139493762c11398ad84cdcf8c2c7c79.zip
* Use a loop instead of recursion to iterate over pool siblings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit13
1 files changed, 6 insertions, 7 deletions
diff --git a/.gdbinit b/.gdbinit
index 336ea2ba3f..0a3d88326a 100644
--- 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)