]> granicus.if.org Git - php/commitdiff
- Added a function to print all CVs from the local scope.
authorDerick Rethans <derick@php.net>
Sat, 1 Aug 2009 12:55:36 +0000 (12:55 +0000)
committerDerick Rethans <derick@php.net>
Sat, 1 Aug 2009 12:55:36 +0000 (12:55 +0000)
.gdbinit

index 596f32e3efaa7d76fb33cf49196066826988261d..797e41d25424d11f37dd56430eabb8e20fdf448b 100644 (file)
--- a/.gdbinit
+++ b/.gdbinit
@@ -12,6 +12,25 @@ document ____executor_globals
        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