Chris@0
|
1 /*
|
Chris@0
|
2 * This file is part of the Symfony package.
|
Chris@0
|
3 *
|
Chris@0
|
4 * (c) Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
5 *
|
Chris@0
|
6 * For the full copyright and license information, please view the LICENSE
|
Chris@0
|
7 * file that was distributed with this source code.
|
Chris@0
|
8 */
|
Chris@0
|
9
|
Chris@0
|
10 #ifndef PHP_SYMFONY_DEBUG_H
|
Chris@0
|
11 #define PHP_SYMFONY_DEBUG_H
|
Chris@0
|
12
|
Chris@0
|
13 extern zend_module_entry symfony_debug_module_entry;
|
Chris@0
|
14 #define phpext_symfony_debug_ptr &symfony_debug_module_entry
|
Chris@0
|
15
|
Chris@0
|
16 #define PHP_SYMFONY_DEBUG_VERSION "2.7"
|
Chris@0
|
17
|
Chris@0
|
18 #ifdef PHP_WIN32
|
Chris@0
|
19 # define PHP_SYMFONY_DEBUG_API __declspec(dllexport)
|
Chris@0
|
20 #elif defined(__GNUC__) && __GNUC__ >= 4
|
Chris@0
|
21 # define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default")))
|
Chris@0
|
22 #else
|
Chris@0
|
23 # define PHP_SYMFONY_DEBUG_API
|
Chris@0
|
24 #endif
|
Chris@0
|
25
|
Chris@0
|
26 #ifdef ZTS
|
Chris@0
|
27 #include "TSRM.h"
|
Chris@0
|
28 #endif
|
Chris@0
|
29
|
Chris@0
|
30 ZEND_BEGIN_MODULE_GLOBALS(symfony_debug)
|
Chris@0
|
31 intptr_t req_rand_init;
|
Chris@0
|
32 void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
Chris@0
|
33 zval *debug_bt;
|
Chris@0
|
34 ZEND_END_MODULE_GLOBALS(symfony_debug)
|
Chris@0
|
35
|
Chris@0
|
36 PHP_MINIT_FUNCTION(symfony_debug);
|
Chris@0
|
37 PHP_MSHUTDOWN_FUNCTION(symfony_debug);
|
Chris@0
|
38 PHP_RINIT_FUNCTION(symfony_debug);
|
Chris@0
|
39 PHP_RSHUTDOWN_FUNCTION(symfony_debug);
|
Chris@0
|
40 PHP_MINFO_FUNCTION(symfony_debug);
|
Chris@0
|
41 PHP_GINIT_FUNCTION(symfony_debug);
|
Chris@0
|
42 PHP_GSHUTDOWN_FUNCTION(symfony_debug);
|
Chris@0
|
43
|
Chris@0
|
44 PHP_FUNCTION(symfony_zval_info);
|
Chris@0
|
45 PHP_FUNCTION(symfony_debug_backtrace);
|
Chris@0
|
46
|
Chris@0
|
47 static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC);
|
Chris@0
|
48 static const char *_symfony_debug_zval_type(zval *);
|
Chris@0
|
49 static const char* _symfony_debug_get_resource_type(long TSRMLS_DC);
|
Chris@0
|
50 static int _symfony_debug_get_resource_refcount(long TSRMLS_DC);
|
Chris@0
|
51
|
Chris@0
|
52 void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
Chris@0
|
53
|
Chris@0
|
54 #ifdef ZTS
|
Chris@0
|
55 #define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v)
|
Chris@0
|
56 #else
|
Chris@0
|
57 #define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v)
|
Chris@0
|
58 #endif
|
Chris@0
|
59
|
Chris@0
|
60 #endif /* PHP_SYMFONY_DEBUG_H */
|