summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2003-02-14 12:04:03 +0000
committerThies C. Arntzen <thies@php.net>2003-02-14 12:04:03 +0000
commitc1706b50bfd142ab34d9d308f4eec78709e1740a (patch)
tree6ceafd3873f9b63f7710cb9005c84704d1360763 /.gdbinit
parent801210d60cfc81444f798d8e19d087ddc61563ed (diff)
downloadphp-git-c1706b50bfd142ab34d9d308f4eec78709e1740a.tar.gz
add really nice dump_bt function for debugging in gdb
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit19
1 files changed, 19 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
new file mode 100644
index 0000000000..b58b1ebab4
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,19 @@
+define dump_bt
+ set $t = $arg0
+ while $t
+ printf "[0x%08x] ", $t
+ if $t->function_state.function->common.function_name
+ printf "%s() ", $t->function_state.function->common.function_name
+ else
+ printf "??? "
+ end
+ if $t->op_array != 0
+ printf "%s:%d ", $t->op_array->filename, $t->opline->lineno
+ end
+ set $t = $t->prev_execute_data
+ printf "\n"
+ end
+end
+document dump_bt
+ dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data
+end