Skip to content

Commit 627ccc3

Browse files
committed
Merge pull request #1 from php/master
更新
2 parents edece6e + 45b1d01 commit 627ccc3

2,988 files changed

Lines changed: 110241 additions & 52220 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gdbinit

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
define set_ts
2+
set $tsrm_ls = $arg0
3+
end
4+
5+
document set_ts
6+
set the ts resource, it is impossible for gdb to
7+
call ts_resource_ex while no process is running,
8+
but we could get the resource from the argument
9+
of frame info.
10+
end
11+
112
define ____executor_globals
213
if basic_functions_module.zts
3-
set $tsrm_ls = ts_resource_ex(0, 0)
14+
if !$tsrm_ls
15+
set $tsrm_ls = ts_resource_ex(0, 0)
16+
end
417
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
518
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
619
else
@@ -38,12 +51,53 @@ define dump_bt
3851
set $t = $arg0
3952
while $t
4053
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
54+
set $fst = $t->function_state
55+
if $fst.function->common.function_name
56+
if $fst.arguments
57+
set $count = (int)*($fst.arguments)
58+
59+
if $t->object
60+
if $fst.function.common.scope
61+
printf "%s->", $fst.function.common.scope->name
62+
else
63+
if !$eg
64+
____executor_globals
65+
end
66+
67+
set $known_class = 0
68+
if $eg
69+
set $handle = $t->object.value.obj.handle
70+
set $handlers = $t->object.value.obj.handlers
71+
set $zobj = (zend_object *)$eg.objects_store.object_buckets[$handle].bucket.obj.object
72+
73+
if $handlers->get_class_entry == &zend_std_object_get_class
74+
set $known_class = 1
75+
76+
if $handlers.get_class_name
77+
if $handlers.get_class_name != &zend_std_object_get_class_name
78+
set $known_class = 0
79+
end
80+
end
81+
82+
if $known_class
83+
printf "%s->", $zobj->ce.name
84+
end
85+
end
86+
end
87+
88+
if !$known_class
89+
printf "(Unknown)->"
90+
end
91+
end
92+
else
93+
if $fst.function.common.scope
94+
printf "%s::", $fst.function.common.scope->name
95+
end
96+
end
97+
98+
printf "%s(", $fst.function->common.function_name
4599
while $count > 0
46-
set $zvalue = *(zval **)($t->function_state.arguments - $count)
100+
set $zvalue = *(zval **)($fst.arguments - $count)
47101
set $type = $zvalue->type
48102
if $type == 0
49103
printf "NULL"
@@ -73,7 +127,7 @@ define dump_bt
73127
if $type == 7
74128
printf "resource(#%d)", $zvalue->value.lval
75129
end
76-
if $type == 8
130+
if $type == 8
77131
printf "constant"
78132
end
79133
if $type == 9
@@ -89,7 +143,7 @@ define dump_bt
89143
end
90144
printf ") "
91145
else
92-
printf "%s() ", $t->function_state.function->common.function_name
146+
printf "%s() ", $fst.function->common.function_name
93147
end
94148
else
95149
printf "??? "
@@ -600,7 +654,7 @@ define zmemcheck
600654
end
601655
end
602656
if $not_found
603-
printf "no such block that begins at %p.\n", $aptr
657+
printf "no such block that begins at %p.\n", $aptr
604658
end
605659
if $arg0 == 0
606660
printf "-------------------------------------------------------------------------------\n"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ext/dba/libflatfile/flatfile.c ident
1515
ext/dba/libcdb/cdb_make.c ident
1616
ext/dba/libcdb/cdb.c ident
1717
ext/filter/filter.c ident
18+
ext/zip/php_zip.c ident
1819
README.input_filter ident
1920
run-tests.php ident
2021
sapi/nsapi/nsapi.c ident

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ stamp-h.in
9696
scan_makefile_in.awk
9797
TSRM/tsrm_config.h
9898
Zend/zend_config.h
99+
Zend/zend_dtrace_gen.h
100+
Zend/zend_dtrace_gen.hbak
99101
Zend/zend_ini_parser.c
100102
Zend/zend_ini_parser.h
101103
Zend/zend_ini_parser.output

CODING_STANDARDS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
PHP Coding Standards
33
========================
44

5-
This file lists several standards that any programmer, adding or changing
6-
code in PHP, should follow. Since this file was added at a very late
5+
This file lists several standards that any programmer adding or changing
6+
code in PHP should follow. Since this file was added at a very late
77
stage of the development of PHP v3.0, the code base does not (yet) fully
88
follow it, but it's going in that general direction. Since we are now
9-
well into the version 4 releases, many sections have been recoded to use
9+
well into version 5 releases, many sections have been recoded to use
1010
these rules.
1111

1212
Code Implementation

0 commit comments

Comments
 (0)