com php-src: Sync types in .gdbinit, improve property dumping: .gdbinit

From: Date: Tue, 26 Feb 2019 16:26:16 +0000
Subject: com php-src: Sync types in .gdbinit, improve property dumping: .gdbinit
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104868@lists.php.net to get a copy of this message
Commit: d73789ef91ebd15f6b72529e78041d366f586611 Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 26 Feb 2019 17:26:16 +0100 Parents: d303225c3a463cb0a7dabb51234adf684de13fa5 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d73789ef91ebd15f6b72529e78041d366f586611 Log: Sync types in .gdbinit, improve property dumping If an object doesn't have a property table, we need to go through the property into table and read the corresponding slots. Changed paths: M .gdbinit Diff: diff --git a/.gdbinit b/.gdbinit index 56c11e4..8e54830 100644 --- a/.gdbinit +++ b/.gdbinit @@ -165,7 +165,7 @@ define ____printzv_contents set $type = $zvalue->u1.v.type # 15 == IS_INDIRECT - if $type > 5 && $type != 15 + if $type > 5 && $type < 12 printf "(refcount=%d) ", $zvalue->value.counted->gc.refcount end @@ -215,12 +215,8 @@ define ____printzv_contents if ! $arg1 if $handlers->get_properties == &zend_std_get_properties if $zobj->properties + printf "\nProperties " set $ht = $zobj->properties - else - set $ht = &$zobj->ce->properties_info - end - printf "\nProperties " - if $ht set $ind = $ind + 1 ____print_ht $ht 1 set $ind = $ind - 1 @@ -230,7 +226,19 @@ define ____printzv_contents set $i = $i - 1 end else - echo "not found" + printf " {\n" + set $ht = &$zobj->ce->properties_info + set $k = 0 + set $num = $ht->nNumUsed + while $k < $num + set $p = (Bucket*)($ht->arData + $k) + set $name = $p->key + set $prop = (zend_property_info*)$p->val.value.ptr + set $val = (zval*)((char*)$zobj + $prop->offset) + printf "%s => ", $name->val + printzv $val + set $k = $k + 1 + end end end end @@ -250,17 +258,20 @@ define ____printzv_contents printf "CONSTANT_AST" end if $type == 13 - printf "_BOOL" + printf "indirect: " + ____printzv $zvalue->value.zv $arg1 end if $type == 14 - printf "CALLABLE" + printf "pointer: %p", $zvalue->value.ptr end if $type == 15 - printf "indirect: " - ____printzv $zvalue->value.zv $arg1 + printf "_ERROR" + end + if $type == 16 + printf "_BOOL" end if $type == 17 - printf "pointer: %p", $zvalue->value.ptr + printf "CALLABLE" end if $type == 18 printf "ITERABLE" @@ -269,9 +280,9 @@ define ____printzv_contents printf "VOID" end if $type == 20 - printf "_ERROR" + printf "_NUMBER" end - if $type == 16 || $type > 20 + if $type > 20 printf "unknown type %d", $type end printf "\n"

« previous php.cvs (#104868) next »