1 --- php-5.3.10/Zend/zend.c_orig Sun Jan 1 05:15:04 2012 |
|
2 +++ php-5.3.10/Zend/zend.c Wed Feb 8 11:25:25 2012 |
|
3 @@ -29,6 +29,7 @@ |
|
4 #include "zend_builtin_functions.h" |
|
5 #include "zend_ini.h" |
|
6 #include "zend_vm.h" |
|
7 +#include "zend_dtrace.h" |
|
8 |
|
9 #ifdef ZTS |
|
10 # define GLOBAL_FUNCTION_TABLE global_function_table |
|
11 @@ -636,10 +637,17 @@ |
|
12 zend_getenv = utility_functions->getenv_function; |
|
13 zend_resolve_path = utility_functions->resolve_path_function; |
|
14 |
|
15 +#if HAVE_DTRACE |
|
16 +/* build with dtrace support */ |
|
17 + zend_compile_file = dtrace_compile_file; |
|
18 + zend_execute = dtrace_execute; |
|
19 + zend_execute_internal = dtrace_execute_internal; |
|
20 +#else |
|
21 zend_compile_file = compile_file; |
|
22 - zend_compile_string = compile_string; |
|
23 zend_execute = execute; |
|
24 zend_execute_internal = NULL; |
|
25 +#endif /* HAVE_SYS_SDT_H */ |
|
26 + zend_compile_string = compile_string; |
|
27 zend_throw_exception_hook = NULL; |
|
28 |
|
29 zend_init_opcodes_handlers(); |
|
30 @@ -1039,6 +1047,15 @@ |
|
31 |
|
32 va_start(args, format); |
|
33 |
|
34 +#ifdef HAVE_DTRACE |
|
35 + if(DTRACE_ERROR_ENABLED()) { |
|
36 + char *dtrace_error_buffer; |
|
37 + zend_vspprintf(&dtrace_error_buffer, 0, format, args); |
|
38 + DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno); |
|
39 + efree(dtrace_error_buffer); |
|
40 + } |
|
41 +#endif /* HAVE_DTRACE */ |
|
42 + |
|
43 /* if we don't have a user defined error handler */ |
|
44 if (!EG(user_error_handler) |
|
45 || !(EG(user_error_handler_error_reporting) & type) |
|