Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 230 lines (192 sloc) 6.625 kB
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
1 /*
2 +----------------------------------------------------------------------+
b66d5be @derickr - Licence update. This change only renames "PHP Licence" to "Xdebug L…
authored
3 | Xdebug |
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
4 +----------------------------------------------------------------------+
3fe49b9 @derickr - Bumb year.
authored
5 | Copyright (c) 2002, 2003, 2004, 2005, 2006 Derick Rethans |
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
6 +----------------------------------------------------------------------+
b66d5be @derickr - Licence update. This change only renames "PHP Licence" to "Xdebug L…
authored
7 | This source file is subject to version 1.0 of the Xdebug license, |
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
8 | that is bundled with this package in the file LICENSE, and is |
9 | available at through the world-wide-web at |
b66d5be @derickr - Licence update. This change only renames "PHP Licence" to "Xdebug L…
authored
10 | http://xdebug.derickrethans.nl/license.php |
11 | If you did not receive a copy of the Xdebug license and are unable |
12 | to obtain it through the world-wide-web, please send a note to |
13 | xdebug@derickrethans.nl so we can mail you a copy immediately. |
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
14 +----------------------------------------------------------------------+
637bd81 @derickr - Email update
authored
15 | Authors: Derick Rethans <derick@xdebug.org> |
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
16 +----------------------------------------------------------------------+
17 */
18
19 #ifndef PHP_XDEBUG_H
20 #define PHP_XDEBUG_H
21
5c055b8 @derickr - Added the XML writer to config.m4
authored
22 #define XDEBUG_NAME "Xdebug"
5d5e646 @derickr - Go with 2.0.0beta6.
authored
23 #define XDEBUG_VERSION "2.0.0beta6"
5c055b8 @derickr - Added the XML writer to config.m4
authored
24 #define XDEBUG_AUTHOR "Derick Rethans"
3fe49b9 @derickr - Bumb year.
authored
25 #define XDEBUG_COPYRIGHT "Copyright (c) 2002-2006 by Derick Rethans"
5c055b8 @derickr - Added the XML writer to config.m4
authored
26 #define XDEBUG_URL "http://xdebug.org"
87f58a5 @derickr - Added "bt" command to get backtraces
authored
27
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
28 #include "php.h"
6005ed2 @derickr - Make it compile under ZTS mode
authored
29
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
30 #include "xdebug_handlers.h"
2983739 @derickr - Implemented the list, print, show, step and pwd commands.
authored
31 #include "xdebug_hash.h"
b5be71c @derickr - srm_llist > xdebug_llist
authored
32 #include "xdebug_llist.h"
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
33
34 extern zend_module_entry xdebug_module_entry;
35 #define phpext_xdebug_ptr &xdebug_module_entry
36
4103a9b @iliaal - Added another profiling mode, which can be accessed via
iliaal authored
37 #define MICRO_IN_SEC 1000000.00
38
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
39 #ifdef PHP_WIN32
40 #define PHP_XDEBUG_API __declspec(dllexport)
41 #else
42 #define PHP_XDEBUG_API
43 #endif
44
45 #ifdef ZTS
46 #include "TSRM.h"
47 #endif
48
032b57f - Fixed compile failures with PHP 5.2
Jani Taskinen authored
49 #if PHP_VERSION_ID >= 50200
50 # define HAVE_PHP_MEMORY_USAGE 1
51 # define XG_MEMORY_USAGE() zend_memory_usage(1)
52 # define XG_MEMORY_PEAK_USAGE() zend_memory_peak_usage(1)
53 #else
54 # if MEMORY_LIMIT
55 # define HAVE_PHP_MEMORY_USAGE 1
56 # else
57 # define HAVE_PHP_MEMORY_USAGE 0
58 # endif
59 # define XG_MEMORY_USAGE() AG(allocated_memory)
60 # define XG_MEMORY_PEAK_USAGE() AG(allocated_memory_peak)
61 #endif
62
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
63 PHP_MINIT_FUNCTION(xdebug);
64 PHP_MSHUTDOWN_FUNCTION(xdebug);
65 PHP_RINIT_FUNCTION(xdebug);
66 PHP_RSHUTDOWN_FUNCTION(xdebug);
67 PHP_MINFO_FUNCTION(xdebug);
341a8ae @derickr - Fixed crash bug when a function had sprintf style parameters (ie.
authored
68 #ifdef ZEND_ENGINE_2
415d1ee @derickr - Added the xdebug_get_tracefile_name() function to retrieve the name
authored
69 ZEND_MODULE_POST_ZEND_DEACTIVATE_D(xdebug);
341a8ae @derickr - Fixed crash bug when a function had sprintf style parameters (ie.
authored
70 #endif
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
71
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
72 /* call stack functions */
d2c7573 @derickr - Added xdebug_get_stack_depth() to return the current stack depth le…
authored
73 PHP_FUNCTION(xdebug_get_stack_depth);
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
74 PHP_FUNCTION(xdebug_get_function_stack);
9e09b48 @derickr - Implemented FR #153: xdebug_get_declared_vars().
authored
75 PHP_FUNCTION(xdebug_get_declared_vars);
e47e77b @derickr - Added xdebug_call_class() as addition to xdebug_call_function().
authored
76 PHP_FUNCTION(xdebug_call_class);
6c74074 @derickr - Implement userland functions
authored
77 PHP_FUNCTION(xdebug_call_function);
78 PHP_FUNCTION(xdebug_call_file);
79 PHP_FUNCTION(xdebug_call_line);
cde9bba @derickr - Add ini_setting and functions to enable and disable showing stacktr…
authored
80
dc16630 @derickr - Fixed bug #111: xdebug does not ignore set_time_limit() function du…
authored
81 PHP_FUNCTION(xdebug_set_time_limit);
82
ffd968a @derickr - Add fancy var dumping (this overrides the default var_dump() in PHP)
authored
83 PHP_FUNCTION(xdebug_var_dump);
ee3797c @derickr - Added a function "xdebug_debug_zval" to debug zvals by printing its…
authored
84 PHP_FUNCTION(xdebug_debug_zval);
cf0a06a @derickr - Added xdebug_debug_zval_stdout().
authored
85 PHP_FUNCTION(xdebug_debug_zval_stdout);
ffd968a @derickr - Add fancy var dumping (this overrides the default var_dump() in PHP)
authored
86
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
87 /* activation functions */
cde9bba @derickr - Add ini_setting and functions to enable and disable showing stacktr…
authored
88 PHP_FUNCTION(xdebug_enable);
89 PHP_FUNCTION(xdebug_disable);
90 PHP_FUNCTION(xdebug_is_enabled);
91
01c4f12 @derickr - Added FR #5: xdebug_break() function which interupts the script for…
authored
92 /* breaking functions */
93 PHP_FUNCTION(xdebug_break);
94
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
95 /* tracing functions */
b5be71c @derickr - srm_llist > xdebug_llist
authored
96 PHP_FUNCTION(xdebug_start_trace);
97 PHP_FUNCTION(xdebug_stop_trace);
415d1ee @derickr - Added the xdebug_get_tracefile_name() function to retrieve the name
authored
98 PHP_FUNCTION(xdebug_get_tracefile_name);
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
99
be44b25 - Added xdebug_get_profile_filename() function which returns the curr…
Jani Taskinen authored
100 /* profiling functions */
613a7c1 profile -> profiler (consistent)
Jani Taskinen authored
101 PHP_FUNCTION(xdebug_get_profiler_filename);
75960dc @derickr - Added profiling aggregation functions (patch by Andrei Zmievski)
authored
102 PHP_FUNCTION(xdebug_dump_aggr_profiling_data);
103 PHP_FUNCTION(xdebug_clear_aggr_profiling_data);
be44b25 - Added xdebug_get_profile_filename() function which returns the curr…
Jani Taskinen authored
104
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
105 /* misc functions */
d63d7ee @derickr - Added dumping of superglobals (patch by Harald Radi <phanto@php.net>).
authored
106 PHP_FUNCTION(xdebug_dump_superglobals);
068edbc @derickr - Implemented the 'eval' command with which you can set and get varia…
authored
107 PHP_FUNCTION(xdebug_set_error_handler);
032b57f - Fixed compile failures with PHP 5.2
Jani Taskinen authored
108 #if HAVE_PHP_MEMORY_USAGE
1dd5909 @derickr - Implemented xdebug_memory_usage() which returns the memory in use b…
authored
109 PHP_FUNCTION(xdebug_memory_usage);
b1efad6 @derickr - Removed profiler code, and lay foundation for new code.
authored
110 PHP_FUNCTION(xdebug_peak_memory_usage);
58d605c @derickr - Disable xdebug_memory_usage() when memory_limit was not compiled in.
authored
111 #endif
f192a9b @derickr - Added the xdebug_time_index() function.
authored
112 PHP_FUNCTION(xdebug_time_index);
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
113
114 ZEND_BEGIN_MODULE_GLOBALS(xdebug)
5c055b8 @derickr - Added the XML writer to config.m4
authored
115 int status;
116 int reason;
117
996d335 @derickr - Fixed bug #93: Crash in lookup_hostname on x86_64
authored
118 long level;
b5be71c @derickr - srm_llist > xdebug_llist
authored
119 xdebug_llist *stack;
996d335 @derickr - Fixed bug #93: Crash in lookup_hostname on x86_64
authored
120 long max_nesting_level;
b5be71c @derickr - srm_llist > xdebug_llist
authored
121 zend_bool default_enable;
8e17318 @derickr - Added a new setting xdebug.show_mem_delta to show differences between
authored
122 zend_bool collect_includes;
f2394ea @derickr - Added xdebug.collect_params setting. If this setting is on (the def…
authored
123 zend_bool collect_params;
1b40076 @derickr - Implemented showing returng values in traces. The xdebug.collect_re…
authored
124 zend_bool collect_return;
b1efad6 @derickr - Removed profiler code, and lay foundation for new code.
authored
125 zend_bool extended_info;
5c3e52b @derickr - Turn the display of a stack trace whenever an exception occurs into…
authored
126 zend_bool show_ex_trace;
b1efad6 @derickr - Removed profiler code, and lay foundation for new code.
authored
127 zend_bool show_local_vars;
8e17318 @derickr - Added a new setting xdebug.show_mem_delta to show differences between
authored
128 zend_bool show_mem_delta;
e2b429e @derickr - Add support for classnames, variable include files and variable fun…
authored
129 char *manual_url;
068edbc @derickr - Implemented the 'eval' command with which you can set and get varia…
authored
130 char *error_handler;
455963f @derickr - Let the time index start from the beginning of the *script* and not…
authored
131 double start_time;
9bc776f @derickr - Implemented "bt full" which shows a full stack trace including local
authored
132 HashTable *active_symbol_table;
8e17318 @derickr - Added a new setting xdebug.show_mem_delta to show differences between
authored
133 unsigned int prev_memory;
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
134
27a1481 @derickr - Fixed bug #171: set_time_limit stack overflow on 2nd request.
authored
135 void (*orig_var_dump_func)(INTERNAL_FUNCTION_PARAMETERS);
996f387 @derickr - The zif_ trick doesn't work on Windows, so work around it by storing
authored
136 void (*orig_set_time_limit_func)(INTERNAL_FUNCTION_PARAMETERS);
137
b1efad6 @derickr - Removed profiler code, and lay foundation for new code.
authored
138 FILE *trace_file;
139 zend_bool do_trace;
140 zend_bool auto_trace;
e404565 @derickr - Changed trace file naming: xdebug.trace_output_dir is now used to c…
authored
141 char *trace_output_dir;
142 char *trace_output_name;
bd994d0 @derickr - Added a new php.ini setting "xdebug.trace_options" to configure extra
authored
143 long trace_options;
3272c98 @derickr - Added a computerized trace format for easier parsing by external pr…
authored
144 long trace_format;
415d1ee @derickr - Added the xdebug_get_tracefile_name() function to retrieve the name
authored
145 char *tracefile_name;
b1efad6 @derickr - Removed profiler code, and lay foundation for new code.
authored
146
72bcfe1 @derickr - Added code coverage, enable with xdebug_start_code_coverage(), disa…
authored
147 /* used for code coverage */
148 zend_bool do_code_coverage;
149 xdebug_hash *code_coverage;
df2814b @derickr - Fixed the exit handler hook to use the new "5.1" way of handling it…
authored
150 zend_bool code_coverage_unused;
ed743c1 @derickr - Added a cache that prevents the code coverage functionality from ru…
authored
151 xdebug_hash *code_coverage_op_array_cache;
46c3439 @derickr - Implemented function_counter
authored
152 unsigned int function_count;
72bcfe1 @derickr - Added code coverage, enable with xdebug_start_code_coverage(), disa…
authored
153
d63d7ee @derickr - Added dumping of superglobals (patch by Harald Radi <phanto@php.net>).
authored
154 /* superglobals */
d5df3e3 @derickr - Fixed some layout issues.
authored
155 zend_bool dump_globals;
d63d7ee @derickr - Added dumping of superglobals (patch by Harald Radi <phanto@php.net>).
authored
156 zend_bool dump_once;
157 zend_bool dump_undefined;
158 zend_bool dumped;
159 xdebug_llist server;
160 xdebug_llist get;
161 xdebug_llist post;
162 xdebug_llist cookie;
163 xdebug_llist files;
164 xdebug_llist env;
165 xdebug_llist request;
166 xdebug_llist session;
167
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
168 /* remote settings */
169 zend_bool remote_enable; /* 0 */
996d335 @derickr - Fixed bug #93: Crash in lookup_hostname on x86_64
authored
170 long remote_port; /* 9000 */
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
171 char *remote_host; /* localhost */
204edff @derickr - Fixed bug #93: Crash on x86_64
authored
172 long remote_mode; /* XDEBUG_NONE, XDEBUG_JIT, XDEBUG_REQ */
ab64e66 @derickr - Add dbgp handler files, which do currently nothing yet
authored
173 char *remote_handler; /* php3, gdb, dbgp */
36301bc @derickr - Added request #88: Make the url parameter XDEBUG_SESSION_START opti…
authored
174 zend_bool remote_autostart; /* Disables the requirement for XDEBUG_SESSION_START */
55317fe @derickr - Added the xdebug.remote_log setting that allows you to log debugger
authored
175 char *remote_log; /* Filename to log protocol communication to */
176 FILE *remote_log_file; /* File handler for protocol log */
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
177
f041de3 @mixedpuppy - Fix returning text nodes that contain html tags and such
mixedpuppy authored
178 char *ide_key; /* from environment, USER, USERNAME or empty */
179
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
180 /* remote debugging globals */
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
181 zend_bool remote_enabled;
e2e05d3 @derickr - Fixed problems with using 'eval' and breakpoints at the same time. The
authored
182 zend_bool breakpoints_allowed;
cb87cbc @derickr - Fixed time indices in xdebug_get_function_trace
authored
183 xdebug_con context;
5c055b8 @derickr - Added the XML writer to config.m4
authored
184 unsigned int breakpoint_count;
46c3439 @derickr - Implemented function_counter
authored
185
76c894e @derickr - Re-implemented profiling support. Xdebug outputs information the sa…
authored
186 /* profiler settings */
187 zend_bool profiler_enable;
188 char *profiler_output_dir;
be39b3e @derickr - Added internal xdebug_crc32() function. (Copy from PHP sources).
authored
189 char *profiler_output_name; /* "pid" or "crc32" */
0d77c16 @derickr - Fixed bug #108: log_only still displays some text for errors in inc…
authored
190 zend_bool profiler_enable_trigger;
4e08cb3 @derickr - Added FR #148: Option to append to cachegrind files, instead of ove…
authored
191 zend_bool profiler_append;
76c894e @derickr - Re-implemented profiling support. Xdebug outputs information the sa…
authored
192
193 /* profiler globals */
194 zend_bool profiler_enabled;
195 FILE *profile_file;
be44b25 - Added xdebug_get_profile_filename() function which returns the curr…
Jani Taskinen authored
196 char *profile_filename;
76c894e @derickr - Re-implemented profiling support. Xdebug outputs information the sa…
authored
197
46c3439 @derickr - Implemented function_counter
authored
198 /* DBGp globals */
199 char *lastcmd;
200 char *lasttransid;
ccbaa3d @mixedpuppy - magic_cookie is not necessary for remote debugging
mixedpuppy authored
201
202 /* output redirection */
203 php_output_globals stdio;
204 int stdout_redirected;
205 int stderr_redirected;
206 int stdin_redirected;
207
75960dc @derickr - Added profiling aggregation functions (patch by Andrei Zmievski)
authored
208 /* aggregate profiling */
209 HashTable aggr_calls;
210 zend_bool profiler_aggregate;
211
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
212 ZEND_END_MODULE_GLOBALS(xdebug)
213
214 #ifdef ZTS
215 #define XG(v) TSRMG(xdebug_globals_id, zend_xdebug_globals *, v)
216 #else
217 #define XG(v) (xdebug_globals.v)
218 #endif
930bdaa @derickr - Implemented remote debugger handler abstraction
authored
219
78749ee @derickr This commit was generated by cvs2svn to compensate for changes in r2,
authored
220 #endif
221
222
223 /*
224 * Local variables:
225 * tab-width: 4
226 * c-basic-offset: 4
227 * indent-tabs-mode: t
228 * End:
229 */
Something went wrong with that request. Please try again.