summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorMitch Hagstrand <mhagstrand@gmail.com>2018-05-16 15:01:24 -0500
committerNikita Popov <nikita.ppv@gmail.com>2018-05-26 22:05:06 +0200
commit34fb42970a40673e17778ae06fdab751046ccf1d (patch)
tree6193e1f39a5ca89f78316a3ba22f339f9963208a /.gdbinit
parent974c46b89bdb0b84e36890907d17f7a6ae7d058a (diff)
downloadphp-git-34fb42970a40673e17778ae06fdab751046ccf1d.tar.gz
Adds print_global_vars to gdbinit
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit12
1 files changed, 12 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index 5a2675d37e..f33a72bc68 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -16,9 +16,11 @@ define ____executor_globals
end
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
+ set $eg_ptr = $eg
else
set $eg = executor_globals
set $cg = compiler_globals
+ set $eg_ptr = (zend_executor_globals*) &executor_globals
end
end
@@ -289,6 +291,16 @@ define ____printzv
end
end
+define print_global_vars
+ ____executor_globals
+ set $symtable = ((HashTable *)&($eg_ptr->symbol_table))
+ print_ht $symtable
+end
+
+document print_global_vars
+ Prints the global variables
+end
+
define print_const_table
set $ind = 1
printf "[%p] {\n", $arg0