summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-09-19 12:11:29 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-09-23 15:31:35 +0200
commit9e8ba7891e74a80265e09ff5b810ec947680c1ce (patch)
tree6550898580da2445d9d54370d2adef6e68a881b3 /.gdbinit
parent9ec2480bd6d8cadd8ca2ecac07f00fd3d411bc7a (diff)
downloadphp-git-9e8ba7891e74a80265e09ff5b810ec947680c1ce.tar.gz
Change representation of zend_type from type code to MAY_BE_* mask
This switches zend_type from storing a single IS_* type code to storing a MAY_BE_* type mask. Right now most code still assumes that there is only a single type in the mask (or two together with MAY_BE_NULL). But this will make it a lot simpler to introduce union types. An additional advantage (and why I'm doing this separately), is that a number of special cases no longer need to be handled separately: We can do a single mask & (1 << type) check to handle all simple types, booleans (true|false) and null.
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit23
1 files changed, 10 insertions, 13 deletions
diff --git a/.gdbinit b/.gdbinit
index 8e54830ef2..a903c086e5 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -252,37 +252,34 @@ define ____printzv_contents
____printzv &$zvalue->value.ref->val $arg1
end
if $type == 11
- printf "const: %s", $zvalue->value.str->val
+ printf "CONSTANT_AST"
end
if $type == 12
- printf "CONSTANT_AST"
+ printf "CALLABLE"
end
if $type == 13
- printf "indirect: "
- ____printzv $zvalue->value.zv $arg1
+ printf "ITERABLE"
end
if $type == 14
- printf "pointer: %p", $zvalue->value.ptr
+ printf "VOID"
end
if $type == 15
- printf "_ERROR"
+ printf "indirect: "
+ ____printzv $zvalue->value.zv $arg1
end
if $type == 16
- printf "_BOOL"
+ printf "pointer: %p", $zvalue->value.ptr
end
if $type == 17
- printf "CALLABLE"
+ printf "_ERROR"
end
if $type == 18
- printf "ITERABLE"
+ printf "_BOOL"
end
if $type == 19
- printf "VOID"
- end
- if $type == 20
printf "_NUMBER"
end
- if $type > 20
+ if $type > 19
printf "unknown type %d", $type
end
printf "\n"