diff options
author | Doug MacEachern <dougm@apache.org> | 2001-01-02 06:02:33 +0100 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2001-01-02 06:02:33 +0100 |
commit | 5d4e51091ea8d7e382b6a94252911a0bb52bf551 (patch) | |
tree | d3c452e08d7626a969dfd2eaff12e36fc534a6a4 /.gdbinit | |
parent | Modify a couple of calls to ap_log_error with a NULL server to use (diff) | |
download | apache2-5d4e51091ea8d7e382b6a94252911a0bb52bf551.tar.xz apache2-5d4e51091ea8d7e382b6a94252911a0bb52bf551.zip |
add dump_{bucket,brigade} macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -31,3 +31,39 @@ end document dump_string_array Print all of the elements in an array of strings. end + +define dump_bucket + set $bucket = $arg0 + printf "bucket=%s(0x%lx), length=%ld, data=0x%lx\n", \ + $bucket->type->name, \ + (unsigned long)$bucket, (long)$bucket->length, \ + (unsigned long)$bucket->data +end +document dump_bucket + Print bucket info +end + +define dump_brigade + set $bb = $arg0 + set $bucket = ((&((ap_bucket_brigade *)$bb)->list))->next + set $sentinel = ((char *)((&(((ap_bucket_brigade *)$bb)->list)) \ + - ((size_t) &((struct ap_bucket *)0)->link))) + set $i = 0 + + printf "dump of brigade 0x%lx\n", (unsigned long)$bb + if $bucket == $sentinel + printf "brigade is empty\n" + end + + while $bucket != $sentinel + printf " %d: bucket=%s(0x%lx), length=%ld, data=0x%lx\n", \ + $i, $bucket->type->name, \ + (unsigned long)$bucket, (long)$bucket->length, \ + (unsigned long)$bucket->data + set $i = $i + 1 + set $bucket = $bucket->link.next + end +end +document dump_brigade + Print bucket brigade info +end
\ No newline at end of file |