mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00

This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example). Also better comparison handling (value backup vs. page dumps). It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested. Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
48 lines
866 B
PHP
48 lines
866 B
PHP
--TEST--
|
|
Test proper watch comparisons when having multiple levels of indirection from a zval to its value
|
|
--PHPDBG--
|
|
b 3
|
|
r
|
|
w r $a
|
|
c
|
|
|
|
|
|
|
|
q
|
|
--EXPECTF--
|
|
[Successful compilation of %s]
|
|
prompt> [Breakpoint #0 added at %s:3]
|
|
prompt> [Breakpoint #0 at %s:3, hits: 1]
|
|
>00003: $b = "a";
|
|
00004: $a = $b.$b;
|
|
00005: $c = &$a;
|
|
prompt> [Added recursive watchpoint #0 for $a]
|
|
prompt> [Breaking on watchpoint $a]
|
|
Old value:
|
|
New value: aa
|
|
>00005: $c = &$a;
|
|
00006: $a[1] = "b";
|
|
00007:
|
|
prompt> [Breaking on watchpoint $a]
|
|
Old value inaccessible or destroyed
|
|
New value (reference): aa
|
|
>00006: $a[1] = "b";
|
|
00007:
|
|
00008: exit;
|
|
prompt> [Breaking on watchpoint $a]
|
|
Old value: aa
|
|
New value: ab
|
|
>00008: exit;
|
|
00009:
|
|
prompt> [$a has been removed, removing watchpoint recursively]
|
|
[Script ended normally]
|
|
prompt>
|
|
--FILE--
|
|
<?php
|
|
|
|
$b = "a";
|
|
$a = $b.$b;
|
|
$c = &$a;
|
|
$a[1] = "b";
|
|
|
|
exit;
|