summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2009-08-01 12:55:36 +0000
committerDerick Rethans <derick@php.net>2009-08-01 12:55:36 +0000
commite4e7e2b8eed1c3ffba4724945d3a5265eca33d8e (patch)
treed32adcb3ee6575932dcbb73eec19cea40fbc2648 /.gdbinit
parentbe6338014aec1d63e7bd6cce4bee2462d18fdd34 (diff)
downloadphp-git-e4e7e2b8eed1c3ffba4724945d3a5265eca33d8e.tar.gz
- Added a function to print all CVs from the local scope.
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit19
1 files changed, 19 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index 4a17d50896..9d96331697 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -15,6 +15,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