From: Joe Orton Date: Mon, 24 Jan 2005 14:51:45 +0000 (+0000) Subject: * .gdbinit (dump_table): Handle NULL value pointers. X-Git-Tag: 2.1.3~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a41fe8e457615c3d6b013adc4faf3069d35d7a1;p=apache * .gdbinit (dump_table): Handle NULL value pointers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@126286 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/.gdbinit b/.gdbinit index 0fbe4a1a5a..672b392c86 100644 --- a/.gdbinit +++ b/.gdbinit @@ -6,7 +6,11 @@ define dump_table set $n = ((apr_array_header_t *)$arg0)->nelts set $i = 0 while $i < $n - printf "[%u] '%s'='%s'\n", $i, $t[$i].key, $t[$i].val + if $t[$i].val == (void *)0L + printf "[%u] '%s'=>NULL\n", $i, $t[$i].key + else + printf "[%u] '%s'='%s'\n", $i, $t[$i].key, $t[$i].val + end set $i = $i + 1 end end