-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #73927: phpdbg fails with windows error prompt at "watch array" #5630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We expect zvals, so we should request zvals.
We can use `ZEND_HASH_FOREACH_KEY_VAL_IND()` in the first place.
sapi/phpdbg/tests/bug73927.phpt
Outdated
prompt> [Added watchpoint #0 for $value] | ||
prompt> [Added watchpoint #1 for $lower[0]] | ||
prompt> [$lower[0] has been removed, removing watchpoint] | ||
[$lower[0] has been removed, removing watchpoint] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why this message appears twice...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me either. I doesn't happen in interactive mode. Maybe @bwoebi has an idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gdb) p (char*)phpdbg_globals.watch_recreation->arData[0]->key->val
$8 = 0x1084051f8 "$lower[0]"
(gdb) p (char*)phpdbg_globals.watch_recreation->arData[1]->key->val
$9 = 0x108405108 "$lower[]"
(gdb) p *(phpdbg_watch_element*)phpdbg_globals.watch_recreation->arData[1]->val.value.ptr
$11 = {id = 138956800, watch = 0x10847b0c0, flags = 16 '\020', child = 0x1084852a0, parent = 0x0, ...
The latter watch is an implicit (element->flags & PHPDBG_WATCH_IMPLICIT holds) one (i.e. for $lower[0] to be watched, we need a watchpoint on the hashtable).
I think it should be silenced in phpdbg_dequeue_elements_for_recreation if child->id
is not present anymore in PHPDBG_G(watch_elements)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks a lot!
If a watchpoint has already been removed from `watch_elements`, we must not report that it has been removed again.
Thanks! Applied as af4a9bf. |
We expect zvals, so we should request zvals.