derick Sat, 01 Aug 2009 12:55:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=286622
Log:
- Added a function to print all CVs from the local scope.
Changed paths:
U php/php-src/branches/PHP_5_2/.gdbinit
U php/php-src/branches/PHP_5_3/.gdbinit
U php/php-src/trunk/.gdbinit
Modified: php/php-src/branches/PHP_5_2/.gdbinit
===================================================================
--- php/php-src/branches/PHP_5_2/.gdbinit 2009-08-01 12:35:48 UTC (rev
286621)
+++ php/php-src/branches/PHP_5_2/.gdbinit 2009-08-01 12:55:36 UTC (rev
286622)
@@ -12,6 +12,25 @@
ZTS detection is automatically based on ext/standard module struct
end
+define print_cvs
+ ____executor_globals
+ set $p = $eg.current_execute_data.CVs
+ set $c = $eg.current_execute_data.op_array.last_var
+ set $v = $eg.current_execute_data.op_array.vars
+ set $i = 0
+
+ printf "Compiled variables count: %d\n", $c
+ while $i < $c
+ printf "%d = %s\n", $i, $v[$i].name
+ if $p[$i] != 0
+ printzv *$p[$i]
+ else
+ printf "*uninitialized*\n"
+ end
+ set $i = $i + 1
+ end
+end
+
define dump_bt
set $t = $arg0
while $t
Modified: php/php-src/branches/PHP_5_3/.gdbinit
===================================================================
--- php/php-src/branches/PHP_5_3/.gdbinit 2009-08-01 12:35:48 UTC (rev
286621)
+++ php/php-src/branches/PHP_5_3/.gdbinit 2009-08-01 12:55:36 UTC (rev
286622)
@@ -15,6 +15,25 @@
ZTS detection is automatically based on ext/standard module struct
end
+define print_cvs
+ ____executor_globals
+ set $p = $eg.current_execute_data.CVs
+ set $c = $eg.current_execute_data.op_array.last_var
+ set $v = $eg.current_execute_data.op_array.vars
+ set $i = 0
+
+ printf "Compiled variables count: %d\n", $c
+ while $i < $c
+ printf "%d = %s\n", $i, $v[$i].name
+ if $p[$i] != 0
+ printzv *$p[$i]
+ else
+ printf "*uninitialized*\n"
+ end
+ set $i = $i + 1
+ end
+end
+
define dump_bt
set $t = $arg0
while $t
Modified: php/php-src/trunk/.gdbinit
===================================================================
--- php/php-src/trunk/.gdbinit 2009-08-01 12:35:48 UTC (rev 286621)
+++ php/php-src/trunk/.gdbinit 2009-08-01 12:55:36 UTC (rev 286622)
@@ -125,6 +125,25 @@
If unicode is 1 the function calls printu, else it uses printf.
end
+define print_cvs
+ ____executor_globals
+ set $p = $eg.current_execute_data.CVs
+ set $c = $eg.current_execute_data.op_array.last_var
+ set $v = $eg.current_execute_data.op_array.vars
+ set $i = 0
+
+ printf "Compiled variables count: %d\n", $c
+ while $i < $c
+ printf "%d = %s\n", $i, $v[$i].name
+ if $p[$i] != 0
+ printzv *$p[$i]
+ else
+ printf "*uninitialized*\n"
+ end
+ set $i = $i + 1
+ end
+end
+
define dump_bt
set $t = $arg0
while $t
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php