]> granicus.if.org Git - php/commitdiff
add really nice dump_bt function for debugging in gdb
authorThies C. Arntzen <thies@php.net>
Fri, 14 Feb 2003 12:04:03 +0000 (12:04 +0000)
committerThies C. Arntzen <thies@php.net>
Fri, 14 Feb 2003 12:04:03 +0000 (12:04 +0000)
.gdbinit [new file with mode: 0644]
Zend/Makefile.am

diff --git a/.gdbinit b/.gdbinit
new file mode 100644 (file)
index 0000000..b58b1eb
--- /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
index 2182442d5b6c05d98d7ea0c62baedb0a84617f89..a985b9dc41be46d0f0af6f9c6d61ff9c3673f31a 100644 (file)
@@ -14,7 +14,7 @@ libZend_la_SOURCES=\
        zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
        zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
        zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
-       zend_object_API.c
+       zend_object_API.c zend_symtable.c
 
 libZend_la_LDFLAGS =
 libZend_la_LIBADD = @ZEND_EXTRA_LIBS@