Skip to content

Latest commit

 

History

History
112 lines (85 loc) · 2.73 KB

.gdbinit.md

File metadata and controls

112 lines (85 loc) · 2.73 KB

set_ts

set the ts resource, it is impossible for gdb to
call ts_resource_ex while no process is running,
but we could get the resource from the argument
of frame info.

____executor_globals

portable way of accessing executor_globals, set as $eg
this also sets compiler_globals to $cg
ZTS detection is automatically based on ext/standard module struct

print_cvs

Prints the compiled variables and their values.
If a zend_execute_data pointer is set, this will print the compiled
variables of that scope. If no parameter is used, it will use
current_execute_data for scope.

Usage: print_cvs [(zend_execute_data*)ped]

dump_bt

dumps execution stack of PHP code.

Usage: dump_bt (zend_execute_data*)ped
Example: dump_bt executor_globals.current_execute_data
See also: zbacktrace

printzv

prints zval address and contents
Usage: printzv (zval*)pzval

print_global_vars

Prints the global variables
Usage: print_global_vars

print_const_table

Dumps elements of Constants HashTable
Usage: print_const_table (HashTable*)pct
Example: print_const_table executor_globals.zend_constants

print_ht

dumps elements of HashTable made of zval
Usage: print_ht (HashTable*)pht

print_htptr

dumps elements of HashTable made of pointers
Usage: print_htptr (HashTable*)pht

print_htstr

dumps elements of HashTable made of strings
Usage: print_htstr (HashTable*)pht

print_ft

dumps a function table (HashTable)
Usage: print_ft (HashTable*)pft

print_inh

Usage: print_inh (zend_class_entry*)pce

print_pi

Takes a pointer to an object's property and prints the property information
Usage: print_pi <ptr>

printzn

print type and content of znode.
Usage: printzn (znode*)pznode

printzops

Dump operands of the current opline
Usage: printzops

print_zstr

Print the length and contents of a zend string
Usage: print_zstr (zend_string*)ptr [max length]

zbacktrace

prints backtrace.
This command is almost a short cut for
> (gdb) ____executor_globals
> (gdb) dump_bt $eg.current_execute_data

lookup_root

lookup a refcounted in root
Usage: lookup_root [ptr].

dump_opline

Print opline information
Usage: dump_opline (zend_op*)opline

dump_current_opline

Dump currently executed opline information
Usage: dump_current_opline

dump_op_array

Dump opline information in an op_array
Usage: dump_op_array (zend_op_array*)poparray

dump_current_op_array

Dump opline information of current function
Usage: dump_current_op_array

bp_opline

Set breakpoint at opline->handler
Usage: bp_opline (zend_op*)opline

bp_op_array

Set breakpoint at each opline handler in op_array
Usage: bp_op_array (zend_op_array*)poparray

bp_current_op_array

Set breakpoint at each opline handler in current op_array
Usage: bp_current_op_array