]> granicus.if.org Git - php/commitdiff
Merge branch 'pull-request/209' into PHP-5.4
authorStanislav Malyshev <stas@php.net>
Mon, 1 Oct 2012 03:31:36 +0000 (20:31 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 1 Oct 2012 03:31:36 +0000 (20:31 -0700)
* pull-request/209:
  Eliminate process running requirement of dump_bt in .gdbinit
  Add missing ____executor_globals in dump_bt if needed
  Implemented FR #63188 (Display class name when debugging with gdb macro zbacktrace)

1  2 
.gdbinit

diff --cc .gdbinit
index 4a26d9608bd3947f6bd9d847ee147cbe3e8fa9b8,be2f007d2707c12c313b5c8933bcf6bcaffca241..87c942561571fc79459a433c7f42107622ec4d20
+++ b/.gdbinit
@@@ -38,12 -38,53 +38,53 @@@ define dump_b
        set $t = $arg0
        while $t
                printf "[%p] ", $t
-               if $t->function_state.function->common.function_name
-                       if $t->function_state.arguments
-                               set $count = (int)*($t->function_state.arguments)
-                               printf "%s(", $t->function_state.function->common.function_name
+               set $fst = $t->function_state
+               if $fst.function->common.function_name
+                       if $fst.arguments
+                               set $count = (int)*($fst.arguments)
+                               if $t->object
+                                       if $fst.function.common.scope
+                                               printf "%s->", $fst.function.common.scope->name
+                                       else
+                                               if !$eg && !basic_functions_module.zts
+                                                       ____executor_globals
+                                               end
+                                               set $known_class = 0
+                                               if $eg
+                                                       set $handle = $t->object.value.obj.handle
+                                                       set $handlers = $t->object.value.obj.handlers
+                                                       set $zobj = (zend_object *)$eg.objects_store.object_buckets[$handle].bucket.obj.object
+                                                       if $handlers->get_class_entry == &zend_std_object_get_class
+                                                               set $known_class = 1
+                                                               if $handlers.get_class_name
+                                                                       if $handlers.get_class_name != &zend_std_object_get_class_name
+                                                                               set $known_class = 0
+                                                                       end
+                                                               end
+                                                               if $known_class
+                                                                       printf "%s->", $zobj->ce.name
+                                                               end
+                                                       end
+                                               end
+                                               if !$known_class
 -                                                      printf "Unknow->"
++                                                      printf "Unknown->"
+                                               end
+                                       end
+                               else
+                                       if $fst.function.common.scope
+                                               printf "%s::", $fst.function.common.scope->name
+                                       end
+                               end
+                               printf "%s(", $fst.function->common.function_name
                                while $count > 0
-                                       set $zvalue = *(zval **)($t->function_state.arguments - $count)
+                                       set $zvalue = *(zval **)($fst.arguments - $count)
                                        set $type = $zvalue->type
                                        if $type == 0
                                                printf "NULL"