Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented May 26, 2020

We expect zvals, so we should request zvals.

We expect zvals, so we should request zvals.
We can use `ZEND_HASH_FOREACH_KEY_VAL_IND()` in the first place.
@cmb69 cmb69 marked this pull request as ready for review May 27, 2020 08:27
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]
Copy link
Member

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...

Copy link
Member Author

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?

Copy link
Member

@bwoebi bwoebi May 27, 2020

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks a lot!

cmb69 added 2 commits May 27, 2020 17:53
If a watchpoint has already been removed from `watch_elements`, we must
not report that it has been removed again.
@cmb69
Copy link
Member Author

cmb69 commented Jun 2, 2020

Thanks! Applied as af4a9bf.

@cmb69 cmb69 closed this Jun 2, 2020
@cmb69 cmb69 deleted the cmb/73927 branch June 2, 2020 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants