mike Fri May 5 15:49:41 2006 UTC Modified files: (Branch: PHP_5_1) /php-src .gdbinit Log: - treat interfaces and classes gracefully in print_inh http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.10.4.2&r2=1.10.4.3&diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.10.4.2 php-src/.gdbinit:1.10.4.3 --- php-src/.gdbinit:1.10.4.2 Fri May 5 15:14:37 2006 +++ php-src/.gdbinit Fri May 5 15:49:41 2006 @@ -259,6 +259,44 @@ dumps a function table (HashTable) end +define ____print_inh_class + set $ce = $arg0 + if $ce->ce_flags & 0x10 || $ce->ce_flags & 0x20 + printf "abstract " + else + if $ce->ce_flags & 0x40 + printf "final " + end + end + printf "class %s", $ce->name + if $ce->parent != 0 + printf " extends %s", $ce->parent->name + end + if $ce->num_interfaces != 0 + printf " implements" + set $tmp = 0 + while $tmp < $ce->num_interfaces + printf " %s", $ce->interfaces[$tmp]->name + set $tmp = $tmp + 1 + if $tmp < $ce->num_interfaces + printf "," + end + end + end + set $ce = $ce->parent +end + +define ____print_inh_iface + set $ce = $arg0 + printf "interface %s", $ce->name + if $ce->num_interfaces != 0 + set $ce = $ce->interfaces[0] + printf " extends %s", $ce->name + else + set $ce = 0 + end +end + define print_inh set $ce = $arg0 set $depth = 0 @@ -268,13 +306,13 @@ printf " " set $tmp = $tmp - 1 end - printf "class %s", $ce->name - if $ce->parent != 0 - printf " extends %s", $ce->parent->name + set $depth = $depth + 1 + if $ce->ce_flags & 0x80 + ____print_inh_iface $ce + else + ____print_inh_class $ce end printf " {\n" - set $depth = $depth + 1 - set $ce = $ce->parent end while $depth != 0 set $tmp = $depth
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php