summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2007-06-20 15:30:39 +0000
committerJoe Orton <jorton@apache.org>2007-06-20 15:30:39 +0000
commitaabb0ffb8409047f4bafb9e38edbe01c5cbf92eb (patch)
treea0dfa8891ff2a9f5d92d6bdc93bc3522ddb28196 /.gdbinit
parent1637a52129f0723e34e934f17f80035bdddd0c8e (diff)
downloadhttpd-aabb0ffb8409047f4bafb9e38edbe01c5cbf92eb.tar.gz
* .gdbinit: Add a few useful macros, and set defaults
for signal handling appropriate for httpd debugging. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@549136 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit60
1 files changed, 58 insertions, 2 deletions
diff --git a/.gdbinit b/.gdbinit
index 672b392c86..6194156dd2 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -18,9 +18,38 @@ document dump_table
Print the key/value pairs in a table.
end
+define dump_string_hash
+ set $h = $arg0->array
+ set $n = $arg0->max
+ set $i = 0
+ while $i < $n
+ set $ent = $h[$i]
+ while $ent != (void *)0L
+ printf "'%s' => '%p'\n", $ent->key, $ent->val
+ set $ent = $ent->next
+ end
+ set $i = $i + 1
+ end
+end
+document dump_string_hash
+ Print the entries in a hash table indexed by strings
+end
-define rh
- run -f /home/dgaudet/ap2/conf/mpm.conf
+define dump_string_shash
+ set $h = $arg0->array
+ set $n = $arg0->max
+ set $i = 0
+ while $i < $n
+ set $ent = $h[$i]
+ while $ent != (void *)0L
+ printf "'%s' => '%s'\n", $ent->key, $ent->val
+ set $ent = $ent->next
+ end
+ set $i = $i + 1
+ end
+end
+document dump_string_shash
+ Print the entries in a hash table indexed by strings with string values
end
define ro
@@ -275,3 +304,30 @@ end
document dump_servers
Print server_rec list info
end
+
+define dump_allocator
+ printf "Allocator current_free_index = %d, max_free_index = %d\n", \
+ ($arg0)->current_free_index, ($arg0)->max_free_index
+ printf "Allocator free list:\n"
+ set $i = 0
+ set $max =(sizeof $arg0->free)/(sizeof $arg0->free[0])
+ while $i < $max
+ set $node = $arg0->free[$i]
+ if $node != 0
+ printf " #%2d: ", $i
+ while $node != 0
+ printf "%d, ", $node->endp - $node->first_avail
+ set $node = $node->next
+ end
+ printf "ends.\n"
+ end
+ set $i = $i + 1
+ end
+end
+document dump_allocator
+ Print status of an allocator and its freelists.
+end
+
+# Set sane defaults for common signals:
+handle SIGPIPE noprint pass nostop
+handle SIGUSR1 print pass nostop