I found this mainly to be a problem when working with threading
extensions. zbacktrace doesn't show the correct stack when switching
threads.
Closes GH-6814.
I noticed this problem while dumping the contents of EG(function_table),
where keys for closures start with a null byte. printf interprets this
as a zero-length string and emits nothing. This allows the key to be
rendered properly in readable form.
Closes GH-6577.
Make it clear that types used for type declarations can overlap
with the rest, and can also overlap in MAY_BE space.
This makes things more robust against the addition of new primitive
types.
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.
1. Fixed print_const_table to work in ZE3
2. Removed ____print_const_table to use more generic ____print_ht
3. Fixed up zval types in ____printzv_contents
I thought these SEPARATE_ZVAL_IF_NOT_REF usages were safe at first,
because incdec op supports reference variables. However this
violates the constraint that IS_TMP_VAR variables may not be
references (which is an issue if you use the result of the incdec
op).
Still need to fix the cases where read_property/write_property is
used.
get(ZTS build):
(gdb) zbacktrace
You can't do that without a process to debug.
(gdb) set_ts 0x4112500
(gdb) zbacktrace
[0x2b232e83a1d8] call_user_func(array(2)[0x2b232e879528],
array(1)[0x2b232e878fa0]) /tmp/1.php:4
[0x7fffcb2efd80] A->__call("xxx", array(1)[0x2b232e878fa0])
* pull-request/209:
Eliminate process running requirement of dump_bt in .gdbinit
Add missing ____executor_globals in dump_bt if needed
Implemented FR #63188 (Display class name when debugging with gdb macro zbacktrace)
Most of the time scope are avaible, but if not, it will be hard to get them,
since we can't call function if no proccess running. try to get class name
if we can.
Use %p instead of "0x08x" (IMO this is used for print pointer, which, unfortunately, don't work under x64)
If there is any wrong, plz revert this, thanks