@@ -38,12 +38,53 @@ define dump_bt
38
38
set $t = $arg0
39
39
while $t
40
40
printf " [%p] " , $t
41
- if $t ->function_state.function->common .function_name
42
- if $t ->function_state.arguments
43
- set $count = (int)*($t ->function_state.arguments)
44
- printf " %s(" , $t ->function_state.function->common .function_name
41
+ set $fst = $t ->function_state
42
+ if $fst .function->common .function_name
43
+ if $fst .arguments
44
+ set $count = (int)*($fst .arguments)
45
+
46
+ if $t ->object
47
+ if $fst .function.common .scope
48
+ printf " %s->" , $fst .function.common .scope ->name
49
+ else
50
+ if !$eg && !basic_functions_module.zts
51
+ ____executor_globals
52
+ end
53
+
54
+ set $known_class = 0
55
+ if $eg
56
+ set $handle = $t ->object.value.obj.handle
57
+ set $handlers = $t ->object.value.obj.handlers
58
+ set $zobj = (zend_object *)$eg .objects_store.object_buckets[$handle ].bucket.obj.object
59
+
60
+ if $handlers ->get_class_entry == &zend_std_object_get_class
61
+ set $known_class = 1
62
+
63
+ if $handlers .get_class_name
64
+ if $handlers .get_class_name != &zend_std_object_get_class_name
65
+ set $known_class = 0
66
+ end
67
+ end
68
+
69
+ if $known_class
70
+ printf " %s->" , $zobj ->ce.name
71
+ end
72
+ end
73
+ end
74
+
75
+ if !$known_class
76
+ printf " Unknown->"
77
+ end
78
+ end
79
+ else
80
+ if $fst .function.common .scope
81
+ printf " %s::" , $fst .function.common .scope ->name
82
+ end
83
+ end
84
+
85
+ printf " %s(" , $fst .function->common .function_name
45
86
while $count > 0
46
- set $zvalue = *(zval **)($t ->function_state .arguments - $count )
87
+ set $zvalue = *(zval **)($fst .arguments - $count )
47
88
set $type = $zvalue ->type
48
89
if $type == 0
49
90
printf " NULL"
@@ -73,7 +114,7 @@ define dump_bt
73
114
if $type == 7
74
115
printf " resource(#%d)" , $zvalue ->value.lval
75
116
end
76
- if $type == 8
117
+ if $type == 8
77
118
printf " constant"
78
119
end
79
120
if $type == 9
@@ -89,7 +130,7 @@ define dump_bt
89
130
end
90
131
printf " ) "
91
132
else
92
- printf " %s() " , $t ->function_state .function->common .function_name
133
+ printf " %s() " , $fst .function->common .function_name
93
134
end
94
135
else
95
136
printf " ??? "
@@ -600,7 +641,7 @@ define zmemcheck
600
641
end
601
642
end
602
643
if $not_found
603
- printf " no such block that begins at %p.\n " , $aptr
644
+ printf " no such block that begins at %p.\n " , $aptr
604
645
end
605
646
if $arg0 == 0
606
647
printf " -------------------------------------------------------------------------------\n "
0 commit comments