summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-05-28 19:54:02 +0000
committerYann Ylavic <ylavic@apache.org>2020-05-28 19:54:02 +0000
commit626cafd68a81b4665b284ecda4bfc0d7c84250d2 (patch)
treee3d884caad3b53c9318860e5242ce7270b0b8636 /.gdbinit
parent512ceac9ea5db9d998404720e7f53b9d6a917899 (diff)
downloadhttpd-626cafd68a81b4665b284ecda4bfc0d7c84250d2.tar.gz
.gdbinit: dump pool (pre_)cleanups [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878247 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit21
1 files changed, 17 insertions, 4 deletions
diff --git a/.gdbinit b/.gdbinit
index e7651d1bc4..6e391c8c80 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -510,7 +510,7 @@ class DumpPoolAndChilds (gdb.Command):
return kb
- def _dump_one_pool(self, arg):
+ def _dump_one_pool(self, arg, indent):
size = 0
free = 0
nodes = 0
@@ -530,16 +530,29 @@ class DumpPoolAndChilds (gdb.Command):
tag = darg['tag'].string()
else:
tag = "No tag"
- print("Pool '%s' [%s]: %d/%d free (%d blocks) allocator: %s free blocks in allocator: %i kiB" % (tag, arg, free, size, nodes, darg['allocator'], self._allocator_free_blocks(darg['allocator'])))
+ print("%sPool '%s' [%s]: %d/%d free (%d blocks) allocator: %s free blocks in allocator: %i kiB" % (indent, tag, arg, free, size, nodes, darg['allocator'], self._allocator_free_blocks(darg['allocator'])))
self.free = self.free + free
self.size = self.size + size
self.nodes = self.nodes + nodes
+ c_num = 0
+ c = darg['pre_cleanups']
+ while c:
+ c_num = c_num + 1
+ dc = c.dereference()
+ print("%s pre_cleanup #%.2i: data = %s, plain_cleanup_fn = %s, child_cleanup_fn = %s" % (indent, c_num, dc['data'], dc['plain_cleanup_fn'].dereference(), dc['plain_cleanup_fn'].dereference()))
+ c = dc['next']
+ c = darg['cleanups']
+ while c:
+ c_num = c_num + 1
+ dc = c.dereference()
+ print("%s pst_cleanup #%.2i: data = %s, plain_cleanup_fn = %s, child_cleanup_fn = %s" % (indent, c_num, dc['data'], dc['plain_cleanup_fn'].dereference(), dc['plain_cleanup_fn'].dereference()))
+ c = dc['next']
def _dump(self, arg, depth):
pool = arg
+ indent = "%*c" % (depth * 4 + 1, " ")
while pool:
- print("%*c" % (depth * 4 + 1, " "), end="")
- self._dump_one_pool(pool)
+ self._dump_one_pool(pool, indent)
if pool['child'] != 0:
self._dump(pool['child'], depth + 1)
pool = pool['sibling']