summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorRoy T. Fielding <fielding@apache.org>1999-08-24 05:34:15 +0000
committerRoy T. Fielding <fielding@apache.org>1999-08-24 05:34:15 +0000
commit77c277683225999b00853b02ebde3bc9cf7f7f6f (patch)
tree8563b1cf7b31b256a6a71e7ab18ee121c640e784 /.gdbinit
parent77acd90f253994077b80cec604c2400ba757a9c8 (diff)
downloadhttpd-77c277683225999b00853b02ebde3bc9cf7f7f6f.tar.gz
Apache 1.3.9 baseline for the Apache 2.0 repository.
Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9 Submitted by: Apache Group git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit28
1 files changed, 28 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
new file mode 100644
index 0000000000..564d9c3a25
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,28 @@
+# gdb macros which may be useful for folks using gdb to debug
+# apache. Delete it if it bothers you.
+
+define dump_table
+ set $t = (table_entry *)((array_header *)$arg0)->elts
+ set $n = ((array_header *)$arg0)->nelts
+ set $i = 0
+ while $i < $n
+ printf "[%u] '%s'='%s'\n", $i, $t[$i].key, $t[$i].val
+ set $i = $i + 1
+ end
+end
+document dump_table
+ Print the key/value pairs in a table.
+end
+
+define dump_string_array
+ set $a = (char **)((array_header *)$arg0)->elts
+ set $n = (int)((array_header *)$arg0)->nelts
+ set $i = 0
+ while $i < $n
+ printf "[%u] '%s'\n", $i, $a[$i]
+ set $i = $i + 1
+ end
+end
+document dump_string_array
+ Print all of the elements in an array of strings.
+end