cvs: php-src / .gdbinit

From: Date: Mon, 09 Jan 2006 07:48:19 +0000
Subject: cvs: php-src / .gdbinit
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36453@lists.php.net to get a copy of this message
helly Mon Jan 9 07:48:19 2006 UTC Modified files: /php-src .gdbinit Log: Add print_ft to dump function tables (lists the names) http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.10&r2=1.11&diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.10 php-src/.gdbinit:1.11 --- php-src/.gdbinit:1.10 Mon Feb 16 20:20:55 2004 +++ php-src/.gdbinit Mon Jan 9 07:48:19 2006 @@ -165,7 +165,7 @@ end if $p->nKeyLength > 0 - printf "\"%s\" => ", $p->arKey + printf "\"%s\" => ", $p->key.u.string else printf "%d => ", $p->h end @@ -196,7 +196,7 @@ end if $p->nKeyLength > 0 - printf "\"%s\" => ", $p->arKey + printf "\"%s\" => ", (char*)$p->key.u.string else printf "%d => ", $p->h end @@ -217,6 +217,41 @@ dumps elements of HashTable made of zval end +define ____print_ft + set $ht = $arg0 + set $p = $ht->pListHead + + while $p != 0 + set $func = (zend_function*)$p->pData + + set $i = $ind + while $i > 0 + printf " " + set $i = $i - 1 + end + + if $p->nKeyLength > 0 + printf "\"%s\" => ", (char*)$p->key.u.string + else + printf "%d => ", $p->h + end + + printf "\"%s\"\n", $func->common.function_name + set $p = $p->pListNext + end +end + +define print_ft + set $ind = 1 + printf "[0x%08x] {\n", $arg0 + ____print_ft $arg0 + printf "}\n" +end + +document print_ft + dumps a function table (HashTable) +end + define printzn ____executor_globals set $ind = 0

« previous php.cvs (#36453) next »