Fix #73927: phpdbg fails with windows error prompt at "watch array"#5630
Closed
cmb69 wants to merge 5 commits intophp:PHP-7.4from
Closed
Fix #73927: phpdbg fails with windows error prompt at "watch array"#5630cmb69 wants to merge 5 commits intophp:PHP-7.4from
cmb69 wants to merge 5 commits intophp:PHP-7.4from
Conversation
We expect zvals, so we should request zvals.
nikic
reviewed
May 27, 2020
We can use `ZEND_HASH_FOREACH_KEY_VAL_IND()` in the first place.
nikic
approved these changes
May 27, 2020
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] |
Member
There was a problem hiding this comment.
Wondering why this message appears twice...
Member
Author
There was a problem hiding this comment.
Me either. I doesn't happen in interactive mode. Maybe @bwoebi has an idea?
Member
There was a problem hiding this comment.
(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).
If a watchpoint has already been removed from `watch_elements`, we must not report that it has been removed again.
Member
Author
|
Thanks! Applied as af4a9bf. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We expect zvals, so we should request zvals.