Date: Thu Aug 20 09:06:28 CEST 2009
User: Allister Beharry
Directory: xdebug
Log Message:
[2.1-dev]
Formatted according to PHP coding standard.
-
Modified files:
xdebug/php_xdebug.h (version: 1.152.4.2)
xdebug/xdebug.c (version: 1.454.4.3)
xdebug/xdebug_code_coverage.h (version: 1.13.4.4)
[FILE: /xdebug/php_xdebug.h]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.152.4.1
retrieving revision 1.152.4.2
diff -u -r1.152.4.1 -r1.152.4.2
--- xdebug/php_xdebug.h:1.152.4.1 Mon Jul 20 08:22:01 2009 GMT
+++ xdebug/php_xdebug.h Thu Aug 20 05:06:28 2009 GMT
@@ -180,10 +180,10 @@
xdebug_hash *code_coverage;
zend_bool code_coverage_unused;
zend_bool code_coverage_dead_code_analysis;
- zend_bool code_coverage_line_coverage_ex;
- zend_bool code_coverage_branch_coverage;
- zend_bool code_coverage_dump_instructions;
- zval *code_coverage_basic_blocks;
+ zend_bool code_coverage_line_coverage_ex;
+ zend_bool code_coverage_branch_coverage;
+ zend_bool code_coverage_dump_instructions;
+ zval *code_coverage_basic_blocks;
unsigned int function_count;
int reserved_offset;
[FILE: /xdebug/xdebug.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.454.4.2
retrieving revision 1.454.4.3
diff -u -r1.454.4.2 -r1.454.4.3
--- xdebug/xdebug.c:1.454.4.2 Mon Jul 20 08:17:40 2009 GMT
+++ xdebug/xdebug.c Thu Aug 20 05:06:28 2009 GMT
@@ -426,17 +426,27 @@
}
static int xdebug_silence_handler(ZEND_OPCODE_HANDLER_ARGS)
-{
- if (XG(do_scream)) {
- execute_data->opline++;
- return ZEND_USER_OPCODE_CONTINUE;
- }
- return ZEND_USER_OPCODE_DISPATCH;
+{
+ zend_op *cur_opcode = *EG(opline_ptr);
+ if (XG(do_code_coverage)) {
+ xdebug_count_instruction(cur_opcode, execute_data TSRMLS_CC);
+ }
+
+ if (XG(do_scream)) {
+ execute_data->opline++;
+ return ZEND_USER_OPCODE_CONTINUE;
+ }
+ return ZEND_USER_OPCODE_DISPATCH;
}
static int xdebug_include_or_eval_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = execute_data->opline;
+ zend_op *cur_opcode = *EG(opline_ptr);
+
+ if (XG(do_code_coverage)) {
+ xdebug_count_instruction(cur_opcode, execute_data TSRMLS_CC);
+ }
if (Z_LVAL(opline->op2.u.constant) == ZEND_EVAL) {
zval *inc_filename;
@@ -467,7 +477,7 @@
}
/* Needed for code coverage as Zend doesn't always add EXT_STMT when expected */
-#define XDEBUG_SET_OPCODE_OVERRIDE(f,oc) \
+#define XDEBUG_SET_OPCODE_OVERRIDE(f,oc) \
zend_set_user_opcode_handler(oc, xdebug_##f##_handler);
#define XDEBUG_OPCODE_OVERRIDE(f) static int xdebug_##f##_handler(ZEND_OPCODE_HANDLER_ARGS) \
@@ -548,60 +558,6 @@
return xdebug_common_assign_dim_handler((o), (cc), ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); \
}
-
-/*
-XDEBUG_OPCODE_OVERRIDE(jmp)
-XDEBUG_OPCODE_OVERRIDE(jmpz)
-XDEBUG_OPCODE_OVERRIDE(jmpnz)
-XDEBUG_OPCODE_OVERRIDE(is_identical)
-XDEBUG_OPCODE_OVERRIDE(is_not_identical)
-XDEBUG_OPCODE_OVERRIDE(is_equal)
-XDEBUG_OPCODE_OVERRIDE(is_not_equal)
-XDEBUG_OPCODE_OVERRIDE(is_smaller)
-XDEBUG_OPCODE_OVERRIDE(is_smaller_or_equal)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign,"=",1)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_add,"+=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_sub,"-=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_mul,"*=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_div,"/=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_mod,"%=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_sl,"<<=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_sr,">>=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_concat,".=",1)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_bw_or,"|=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_bw_and,"&=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_bw_xor,"^=",0)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_dim,"=",1)
-XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_obj,"=",1)
-XDEBUG_OPCODE_OVERRIDE(add_array_element)
-XDEBUG_OPCODE_OVERRIDE(return)
-XDEBUG_OPCODE_OVERRIDE(ext_stmt)
-XDEBUG_OPCODE_OVERRIDE(raise_abstract_error)
-XDEBUG_OPCODE_OVERRIDE(send_var)
-XDEBUG_OPCODE_OVERRIDE(send_var_no_ref)
-XDEBUG_OPCODE_OVERRIDE(send_val)
-XDEBUG_OPCODE_OVERRIDE(new)
-XDEBUG_OPCODE_OVERRIDE(ext_fcall_begin)
-XDEBUG_OPCODE_OVERRIDE(catch)
-XDEBUG_OPCODE_OVERRIDE(bool)
-XDEBUG_OPCODE_OVERRIDE(add_string)
-XDEBUG_OPCODE_OVERRIDE(init_array)
-XDEBUG_OPCODE_OVERRIDE(fetch_dim_r)
-XDEBUG_OPCODE_OVERRIDE(fetch_obj_r)
-XDEBUG_OPCODE_OVERRIDE(fetch_obj_w)
-XDEBUG_OPCODE_OVERRIDE(fetch_obj_func_arg)
-XDEBUG_OPCODE_OVERRIDE(fetch_dim_func_arg)
-XDEBUG_OPCODE_OVERRIDE(fetch_dim_unset)
-XDEBUG_OPCODE_OVERRIDE(fetch_obj_unset)
-XDEBUG_OPCODE_OVERRIDE(fetch_class)
-XDEBUG_OPCODE_OVERRIDE(fetch_constant)
-XDEBUG_OPCODE_OVERRIDE(concat)
-XDEBUG_OPCODE_OVERRIDE(isset_isempty_dim_obj)
-XDEBUG_OPCODE_OVERRIDE(pre_inc_obj)
-XDEBUG_OPCODE_OVERRIDE(switch_free)
-XDEBUG_OPCODE_OVERRIDE(qm_assign)
-*/
-
XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign,"=",1)
XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_add,"+=",0)
XDEBUG_OPCODE_OVERRIDE_ASSIGN(assign_sub,"-=",0)
@@ -763,137 +719,135 @@
XG(reserved_offset) = zend_get_resource_handle(&dummy_ext);
/* Overload the "exit" opcode */
- XDEBUG_SET_OPCODE_OVERRIDE(nop, ZEND_NOP)
- XDEBUG_SET_OPCODE_OVERRIDE(add, ZEND_ADD)
- XDEBUG_SET_OPCODE_OVERRIDE(sub, ZEND_SUB)
- XDEBUG_SET_OPCODE_OVERRIDE(mul, ZEND_MUL)
- XDEBUG_SET_OPCODE_OVERRIDE(div, ZEND_DIV)
- XDEBUG_SET_OPCODE_OVERRIDE(mod, ZEND_MOD)
- XDEBUG_SET_OPCODE_OVERRIDE(sl, ZEND_SL)
- XDEBUG_SET_OPCODE_OVERRIDE(sr, ZEND_SR)
- XDEBUG_SET_OPCODE_OVERRIDE(concat, ZEND_CONCAT)
- XDEBUG_SET_OPCODE_OVERRIDE(bw_or, ZEND_BW_OR)
- XDEBUG_SET_OPCODE_OVERRIDE(bw_and, ZEND_BW_AND)
- XDEBUG_SET_OPCODE_OVERRIDE(bw_xor, ZEND_BW_XOR)
- XDEBUG_SET_OPCODE_OVERRIDE(bw_not, ZEND_BW_NOT)
- XDEBUG_SET_OPCODE_OVERRIDE(bool_not, ZEND_BOOL_NOT)
- XDEBUG_SET_OPCODE_OVERRIDE(bool_xor, ZEND_BOOL_XOR)
- XDEBUG_SET_OPCODE_OVERRIDE(is_identical, ZEND_IS_IDENTICAL)
- XDEBUG_SET_OPCODE_OVERRIDE(is_not_identical, ZEND_IS_NOT_IDENTICAL)
- XDEBUG_SET_OPCODE_OVERRIDE(is_equal, ZEND_IS_EQUAL)
- XDEBUG_SET_OPCODE_OVERRIDE(is_not_equal, ZEND_IS_NOT_EQUAL)
- XDEBUG_SET_OPCODE_OVERRIDE(is_smaller, ZEND_IS_SMALLER)
- XDEBUG_SET_OPCODE_OVERRIDE(is_smaller_or_equal, ZEND_IS_SMALLER_OR_EQUAL)
- XDEBUG_SET_OPCODE_OVERRIDE(cast, ZEND_CAST )
- XDEBUG_SET_OPCODE_OVERRIDE(qm_assign, ZEND_QM_ASSIGN )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_add,ZEND_ASSIGN_ADD )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_sub, ZEND_ASSIGN_SUB )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_mul, ZEND_ASSIGN_MUL )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_div, ZEND_ASSIGN_DIV )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_mod, ZEND_ASSIGN_MOD )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_sl, ZEND_ASSIGN_SL )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_sr, ZEND_ASSIGN_SR )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_concat, ZEND_ASSIGN_CONCAT )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_or, ZEND_ASSIGN_BW_OR )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_and, ZEND_ASSIGN_BW_AND )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_xor, ZEND_ASSIGN_BW_XOR )
- XDEBUG_SET_OPCODE_OVERRIDE(pre_inc, ZEND_PRE_INC )
- XDEBUG_SET_OPCODE_OVERRIDE(pre_dec, ZEND_PRE_DEC )
- XDEBUG_SET_OPCODE_OVERRIDE(post_inc, ZEND_POST_INC )
- XDEBUG_SET_OPCODE_OVERRIDE(post_dec, ZEND_POST_DEC )
- XDEBUG_SET_OPCODE_OVERRIDE(assign, ZEND_ASSIGN )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_ref, ZEND_ASSIGN_REF )
- XDEBUG_SET_OPCODE_OVERRIDE(echo, ZEND_ECHO )
- XDEBUG_SET_OPCODE_OVERRIDE(print, ZEND_PRINT )
- XDEBUG_SET_OPCODE_OVERRIDE(jmp, ZEND_JMP )
- XDEBUG_SET_OPCODE_OVERRIDE(jmpz, ZEND_JMPZ )
- XDEBUG_SET_OPCODE_OVERRIDE(jmpnz, ZEND_JMPNZ )
- XDEBUG_SET_OPCODE_OVERRIDE(jmpz_ex, ZEND_JMPZ_EX )
- XDEBUG_SET_OPCODE_OVERRIDE(jmpnz_ex, ZEND_JMPNZ_EX )
- XDEBUG_SET_OPCODE_OVERRIDE(case,ZEND_CASE )
- XDEBUG_SET_OPCODE_OVERRIDE(switch_free, ZEND_SWITCH_FREE )
- XDEBUG_SET_OPCODE_OVERRIDE(brk, ZEND_BRK)
- XDEBUG_SET_OPCODE_OVERRIDE(cont, ZEND_CONT)
- XDEBUG_SET_OPCODE_OVERRIDE(bool, ZEND_BOOL )
- XDEBUG_SET_OPCODE_OVERRIDE(init_string, ZEND_INIT_STRING )
- XDEBUG_SET_OPCODE_OVERRIDE(add_char, ZEND_ADD_CHAR )
- XDEBUG_SET_OPCODE_OVERRIDE(add_string, ZEND_ADD_STRING )
- XDEBUG_SET_OPCODE_OVERRIDE(add_var, ZEND_ADD_VAR )
- XDEBUG_SET_OPCODE_OVERRIDE(begin_silence, ZEND_BEGIN_SILENCE )
- XDEBUG_SET_OPCODE_OVERRIDE(end_silence, ZEND_END_SILENCE )
- XDEBUG_SET_OPCODE_OVERRIDE(init_fcall_by_name, ZEND_INIT_FCALL_BY_NAME )
- XDEBUG_SET_OPCODE_OVERRIDE(do_fcall, ZEND_DO_FCALL )
- XDEBUG_SET_OPCODE_OVERRIDE(do_fcall_by_name, ZEND_DO_FCALL_BY_NAME )
- XDEBUG_SET_OPCODE_OVERRIDE(return, ZEND_RETURN )
- XDEBUG_SET_OPCODE_OVERRIDE(recv, ZEND_RECV )
- XDEBUG_SET_OPCODE_OVERRIDE(recv_init, ZEND_RECV_INIT )
- XDEBUG_SET_OPCODE_OVERRIDE(send_val, ZEND_SEND_VAL )
- XDEBUG_SET_OPCODE_OVERRIDE(send_var, ZEND_SEND_VAR )
- XDEBUG_SET_OPCODE_OVERRIDE(send_re, ZEND_SEND_REF )
- XDEBUG_SET_OPCODE_OVERRIDE(new, ZEND_NEW )
- XDEBUG_SET_OPCODE_OVERRIDE(free, ZEND_FREE )
- XDEBUG_SET_OPCODE_OVERRIDE(init_array, ZEND_INIT_ARRAY )
- XDEBUG_SET_OPCODE_OVERRIDE(add_array_element, ZEND_ADD_ARRAY_ELEMENT )
- XDEBUG_SET_OPCODE_OVERRIDE(include_or_eval, ZEND_INCLUDE_OR_EVAL )
- XDEBUG_SET_OPCODE_OVERRIDE(unset_var, ZEND_UNSET_VAR )
- XDEBUG_SET_OPCODE_OVERRIDE(unset_dim, ZEND_UNSET_DIM )
- XDEBUG_SET_OPCODE_OVERRIDE(unset_obj, ZEND_UNSET_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(fe_reset, ZEND_FE_RESET )
- XDEBUG_SET_OPCODE_OVERRIDE(fe_fetch, ZEND_FE_FETCH )
- XDEBUG_SET_OPCODE_OVERRIDE(exit, ZEND_EXIT )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_r, ZEND_FETCH_R )
- XDEBUG_SET_OPCODE_OVERRIDE(dim_r, ZEND_FETCH_DIM_R )
- XDEBUG_SET_OPCODE_OVERRIDE(obj_r, ZEND_FETCH_OBJ_R )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_w, ZEND_FETCH_W )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_w, ZEND_FETCH_DIM_W )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_w, ZEND_FETCH_OBJ_W )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_rw, ZEND_FETCH_RW )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_rw, ZEND_FETCH_DIM_RW )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_rw, ZEND_FETCH_OBJ_RW )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_is, ZEND_FETCH_IS )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_is, ZEND_FETCH_DIM_IS )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_is, ZEND_FETCH_OBJ_IS )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_func_arg, ZEND_FETCH_FUNC_ARG )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_func_arg, ZEND_FETCH_DIM_FUNC_ARG )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_func_arg, ZEND_FETCH_OBJ_FUNC_ARG )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_unset, ZEND_FETCH_UNSET )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_unset, ZEND_FETCH_DIM_UNSET )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_unset, ZEND_FETCH_OBJ_UNSET )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_tmp_var, ZEND_FETCH_DIM_TMP_VAR )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_constant, ZEND_FETCH_CONSTANT )
- XDEBUG_SET_OPCODE_OVERRIDE(ext_stmt, ZEND_EXT_STMT )
- XDEBUG_SET_OPCODE_OVERRIDE(ext_call_begin, ZEND_EXT_FCALL_BEGIN )
- XDEBUG_SET_OPCODE_OVERRIDE(ext_call_end, ZEND_EXT_FCALL_END )
- XDEBUG_SET_OPCODE_OVERRIDE(ext_nop, ZEND_EXT_NOP )
- XDEBUG_SET_OPCODE_OVERRIDE(ticks, ZEND_TICKS )
- XDEBUG_SET_OPCODE_OVERRIDE(send_var_no_ref, ZEND_SEND_VAR_NO_REF )
- XDEBUG_SET_OPCODE_OVERRIDE(catch, ZEND_CATCH )
- XDEBUG_SET_OPCODE_OVERRIDE(throw, ZEND_THROW )
- XDEBUG_SET_OPCODE_OVERRIDE(fetch_class, ZEND_FETCH_CLASS )
- XDEBUG_SET_OPCODE_OVERRIDE(clone, ZEND_CLONE )
- XDEBUG_SET_OPCODE_OVERRIDE(init_method_call, ZEND_INIT_METHOD_CALL )
- XDEBUG_SET_OPCODE_OVERRIDE(init_static_method_call, ZEND_INIT_STATIC_METHOD_CALL)
- XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_var, ZEND_ISSET_ISEMPTY_VAR )
- XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_dim_obj, ZEND_ISSET_ISEMPTY_DIM_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(pre_inc_obj, ZEND_PRE_INC_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(pre_dec_obj, ZEND_PRE_DEC_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(post_inc_obj, ZEND_POST_INC_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(post_dec_obj, ZEND_POST_DEC_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(assign_obj, ZEND_ASSIGN_OBJ )
- XDEBUG_SET_OPCODE_OVERRIDE(instanceof, ZEND_INSTANCEOF )
- XDEBUG_SET_OPCODE_OVERRIDE(declare_class, ZEND_DECLARE_CLASS)
- XDEBUG_SET_OPCODE_OVERRIDE(inherited_class, ZEND_DECLARE_INHERITED_CLASS)
- XDEBUG_SET_OPCODE_OVERRIDE(declare_function, ZEND_DECLARE_FUNCTION)
- XDEBUG_SET_OPCODE_OVERRIDE(raise_abstract_error, ZEND_RAISE_ABSTRACT_ERROR)
- XDEBUG_SET_OPCODE_OVERRIDE(add_interface, ZEND_ADD_INTERFACE)
- XDEBUG_SET_OPCODE_OVERRIDE(verify_abstract_class, ZEND_VERIFY_ABSTRACT_CLASS)
- XDEBUG_SET_OPCODE_OVERRIDE(assign_dim, ZEND_ASSIGN_DIM)
- XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_prop_obj, ZEND_ISSET_ISEMPTY_PROP_OBJ)
- XDEBUG_SET_OPCODE_OVERRIDE(handle_exception, ZEND_HANDLE_EXCEPTION)
- XDEBUG_SET_OPCODE_OVERRIDE(user_opcode, ZEND_USER_OPCODE)
-
- XDEBUG_SET_OPCODE_OVERRIDE(silence, ZEND_BEGIN_SILENCE);
- XDEBUG_SET_OPCODE_OVERRIDE(silence, ZEND_END_SILENCE);
+ XDEBUG_SET_OPCODE_OVERRIDE(exit, ZEND_EXIT)
+ XDEBUG_SET_OPCODE_OVERRIDE(nop, ZEND_NOP)
+ XDEBUG_SET_OPCODE_OVERRIDE(add, ZEND_ADD)
+ XDEBUG_SET_OPCODE_OVERRIDE(sub, ZEND_SUB)
+ XDEBUG_SET_OPCODE_OVERRIDE(mul, ZEND_MUL)
+ XDEBUG_SET_OPCODE_OVERRIDE(div, ZEND_DIV)
+ XDEBUG_SET_OPCODE_OVERRIDE(mod, ZEND_MOD)
+ XDEBUG_SET_OPCODE_OVERRIDE(sl, ZEND_SL)
+ XDEBUG_SET_OPCODE_OVERRIDE(sr, ZEND_SR)
+ XDEBUG_SET_OPCODE_OVERRIDE(concat, ZEND_CONCAT)
+ XDEBUG_SET_OPCODE_OVERRIDE(bw_or, ZEND_BW_OR)
+ XDEBUG_SET_OPCODE_OVERRIDE(bw_and, ZEND_BW_AND)
+ XDEBUG_SET_OPCODE_OVERRIDE(bw_xor, ZEND_BW_XOR)
+ XDEBUG_SET_OPCODE_OVERRIDE(bw_not, ZEND_BW_NOT)
+ XDEBUG_SET_OPCODE_OVERRIDE(bool_not, ZEND_BOOL_NOT)
+ XDEBUG_SET_OPCODE_OVERRIDE(bool_xor, ZEND_BOOL_XOR)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_identical, ZEND_IS_IDENTICAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_not_identical, ZEND_IS_NOT_IDENTICAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_equal, ZEND_IS_EQUAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_not_equal, ZEND_IS_NOT_EQUAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_smaller, ZEND_IS_SMALLER)
+ XDEBUG_SET_OPCODE_OVERRIDE(is_smaller_or_equal, ZEND_IS_SMALLER_OR_EQUAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(cast, ZEND_CAST)
+ XDEBUG_SET_OPCODE_OVERRIDE(qm_assign, ZEND_QM_ASSIGN)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_add,ZEND_ASSIGN_ADD)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_sub, ZEND_ASSIGN_SUB)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_mul, ZEND_ASSIGN_MUL)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_div, ZEND_ASSIGN_DIV)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_mod, ZEND_ASSIGN_MOD)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_sl, ZEND_ASSIGN_SL)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_sr, ZEND_ASSIGN_SR)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_concat, ZEND_ASSIGN_CONCAT)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_or, ZEND_ASSIGN_BW_OR)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_and, ZEND_ASSIGN_BW_AND)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_bw_xor, ZEND_ASSIGN_BW_XOR)
+ XDEBUG_SET_OPCODE_OVERRIDE(pre_inc, ZEND_PRE_INC)
+ XDEBUG_SET_OPCODE_OVERRIDE(pre_dec, ZEND_PRE_DEC)
+ XDEBUG_SET_OPCODE_OVERRIDE(post_inc, ZEND_POST_INC)
+ XDEBUG_SET_OPCODE_OVERRIDE(post_dec, ZEND_POST_DEC)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign, ZEND_ASSIGN)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_ref, ZEND_ASSIGN_REF)
+ XDEBUG_SET_OPCODE_OVERRIDE(echo, ZEND_ECHO)
+ XDEBUG_SET_OPCODE_OVERRIDE(print, ZEND_PRINT)
+ XDEBUG_SET_OPCODE_OVERRIDE(jmp, ZEND_JMP)
+ XDEBUG_SET_OPCODE_OVERRIDE(jmpz, ZEND_JMPZ)
+ XDEBUG_SET_OPCODE_OVERRIDE(jmpnz, ZEND_JMPNZ)
+ XDEBUG_SET_OPCODE_OVERRIDE(jmpz_ex, ZEND_JMPZ_EX)
+ XDEBUG_SET_OPCODE_OVERRIDE(jmpnz_ex, ZEND_JMPNZ_EX)
+ XDEBUG_SET_OPCODE_OVERRIDE(case,ZEND_CASE)
+ XDEBUG_SET_OPCODE_OVERRIDE(switch_free, ZEND_SWITCH_FREE)
+ XDEBUG_SET_OPCODE_OVERRIDE(brk, ZEND_BRK)
+ XDEBUG_SET_OPCODE_OVERRIDE(cont, ZEND_CONT)
+ XDEBUG_SET_OPCODE_OVERRIDE(bool, ZEND_BOOL)
+ XDEBUG_SET_OPCODE_OVERRIDE(init_string, ZEND_INIT_STRING)
+ XDEBUG_SET_OPCODE_OVERRIDE(add_char, ZEND_ADD_CHAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(add_string, ZEND_ADD_STRING)
+ XDEBUG_SET_OPCODE_OVERRIDE(add_var, ZEND_ADD_VAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(begin_silence, ZEND_BEGIN_SILENCE)
+ XDEBUG_SET_OPCODE_OVERRIDE(end_silence, ZEND_END_SILENCE)
+ XDEBUG_SET_OPCODE_OVERRIDE(init_fcall_by_name, ZEND_INIT_FCALL_BY_NAME)
+ XDEBUG_SET_OPCODE_OVERRIDE(do_fcall, ZEND_DO_FCALL)
+ XDEBUG_SET_OPCODE_OVERRIDE(do_fcall_by_name, ZEND_DO_FCALL_BY_NAME)
+ XDEBUG_SET_OPCODE_OVERRIDE(return, ZEND_RETURN)
+ XDEBUG_SET_OPCODE_OVERRIDE(recv, ZEND_RECV)
+ XDEBUG_SET_OPCODE_OVERRIDE(recv_init, ZEND_RECV_INIT)
+ XDEBUG_SET_OPCODE_OVERRIDE(send_val, ZEND_SEND_VAL)
+ XDEBUG_SET_OPCODE_OVERRIDE(send_var, ZEND_SEND_VAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(send_re, ZEND_SEND_REF)
+ XDEBUG_SET_OPCODE_OVERRIDE(new, ZEND_NEW)
+ XDEBUG_SET_OPCODE_OVERRIDE(free, ZEND_FREE)
+ XDEBUG_SET_OPCODE_OVERRIDE(init_array, ZEND_INIT_ARRAY)
+ XDEBUG_SET_OPCODE_OVERRIDE(add_array_element, ZEND_ADD_ARRAY_ELEMENT)
+ XDEBUG_SET_OPCODE_OVERRIDE(unset_var, ZEND_UNSET_VAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(unset_dim, ZEND_UNSET_DIM)
+ XDEBUG_SET_OPCODE_OVERRIDE(unset_obj, ZEND_UNSET_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(fe_reset, ZEND_FE_RESET)
+ XDEBUG_SET_OPCODE_OVERRIDE(fe_fetch, ZEND_FE_FETCH)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_r, ZEND_FETCH_R)
+ XDEBUG_SET_OPCODE_OVERRIDE(dim_r, ZEND_FETCH_DIM_R)
+ XDEBUG_SET_OPCODE_OVERRIDE(obj_r, ZEND_FETCH_OBJ_R)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_w, ZEND_FETCH_W)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_w, ZEND_FETCH_DIM_W)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_w, ZEND_FETCH_OBJ_W)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_rw, ZEND_FETCH_RW)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_rw, ZEND_FETCH_DIM_RW)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_rw, ZEND_FETCH_OBJ_RW)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_is, ZEND_FETCH_IS)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_is, ZEND_FETCH_DIM_IS)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_is, ZEND_FETCH_OBJ_IS)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_func_arg, ZEND_FETCH_FUNC_ARG)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_func_arg, ZEND_FETCH_DIM_FUNC_ARG)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_func_arg, ZEND_FETCH_OBJ_FUNC_ARG)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_unset, ZEND_FETCH_UNSET)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_unset, ZEND_FETCH_DIM_UNSET)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_unset, ZEND_FETCH_OBJ_UNSET)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_tmp_var, ZEND_FETCH_DIM_TMP_VAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_constant, ZEND_FETCH_CONSTANT)
+ XDEBUG_SET_OPCODE_OVERRIDE(ext_stmt, ZEND_EXT_STMT)
+ XDEBUG_SET_OPCODE_OVERRIDE(ext_call_begin, ZEND_EXT_FCALL_BEGIN)
+ XDEBUG_SET_OPCODE_OVERRIDE(ext_call_end, ZEND_EXT_FCALL_END)
+ XDEBUG_SET_OPCODE_OVERRIDE(ext_nop, ZEND_EXT_NOP)
+ XDEBUG_SET_OPCODE_OVERRIDE(ticks, ZEND_TICKS)
+ XDEBUG_SET_OPCODE_OVERRIDE(send_var_no_ref, ZEND_SEND_VAR_NO_REF)
+ XDEBUG_SET_OPCODE_OVERRIDE(catch, ZEND_CATCH)
+ XDEBUG_SET_OPCODE_OVERRIDE(throw, ZEND_THROW)
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_class, ZEND_FETCH_CLASS)
+ XDEBUG_SET_OPCODE_OVERRIDE(clone, ZEND_CLONE)
+ XDEBUG_SET_OPCODE_OVERRIDE(init_method_call, ZEND_INIT_METHOD_CALL)
+ XDEBUG_SET_OPCODE_OVERRIDE(init_static_method_call, ZEND_INIT_STATIC_METHOD_CALL)
+ XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_var, ZEND_ISSET_ISEMPTY_VAR)
+ XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_dim_obj, ZEND_ISSET_ISEMPTY_DIM_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(pre_inc_obj, ZEND_PRE_INC_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(pre_dec_obj, ZEND_PRE_DEC_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(post_inc_obj, ZEND_POST_INC_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(post_dec_obj, ZEND_POST_DEC_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_obj, ZEND_ASSIGN_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(instanceof, ZEND_INSTANCEOF)
+ XDEBUG_SET_OPCODE_OVERRIDE(declare_class, ZEND_DECLARE_CLASS)
+ XDEBUG_SET_OPCODE_OVERRIDE(inherited_class, ZEND_DECLARE_INHERITED_CLASS)
+ XDEBUG_SET_OPCODE_OVERRIDE(declare_function, ZEND_DECLARE_FUNCTION)
+ XDEBUG_SET_OPCODE_OVERRIDE(raise_abstract_error, ZEND_RAISE_ABSTRACT_ERROR)
+ XDEBUG_SET_OPCODE_OVERRIDE(add_interface, ZEND_ADD_INTERFACE)
+ XDEBUG_SET_OPCODE_OVERRIDE(verify_abstract_class, ZEND_VERIFY_ABSTRACT_CLASS)
+ XDEBUG_SET_OPCODE_OVERRIDE(assign_dim, ZEND_ASSIGN_DIM)
+ XDEBUG_SET_OPCODE_OVERRIDE(isset_isempty_prop_obj, ZEND_ISSET_ISEMPTY_PROP_OBJ)
+ XDEBUG_SET_OPCODE_OVERRIDE(handle_exception, ZEND_HANDLE_EXCEPTION)
+ XDEBUG_SET_OPCODE_OVERRIDE(user_opcode, ZEND_USER_OPCODE)
+ XDEBUG_SET_OPCODE_OVERRIDE(include_or_eval, ZEND_INCLUDE_OR_EVAL)
+
if (zend_xdebug_initialised == 0) {
zend_error(E_WARNING, "Xdebug MUST be loaded as a Zend extension");
@@ -905,8 +859,8 @@
REGISTER_LONG_CONSTANT("XDEBUG_CC_UNUSED", XDEBUG_CC_OPTION_UNUSED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XDEBUG_CC_DEAD_CODE", XDEBUG_CC_OPTION_DEAD_CODE, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("XDEBUG_CC_LINE_COVERAGE_EX", XDEBUG_CC_OPTION_LINE_COVERAGE_EX, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("XDEBUG_CC_BRANCH_COVERAGE", XDEBUG_CC_OPTION_BRANCH_COVERAGE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("XDEBUG_CC_LINE_COVERAGE_EX", XDEBUG_CC_OPTION_LINE_COVERAGE_EX, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("XDEBUG_CC_BRANCH_COVERAGE", XDEBUG_CC_OPTION_BRANCH_COVERAGE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XDEBUG_CC_DUMP_INSTRUCTIONS", XDEBUG_CC_OPTION_DUMP_INSTRUCTIONS, CONST_CS | CONST_PERSISTENT);
XG(breakpoint_count) = 0;
@@ -1021,8 +975,8 @@
XG(do_trace) = 0;
XG(do_code_coverage) = 0;
XG(code_coverage) = xdebug_hash_alloc(32, xdebug_coverage_file_dtor);
- MAKE_STD_ZVAL(XG(code_coverage_basic_blocks));
- array_init(XG(code_coverage_basic_blocks));
+ MAKE_STD_ZVAL(XG(code_coverage_basic_blocks));
+ array_init(XG(code_coverage_basic_blocks));
XG(stack) = xdebug_llist_alloc(xdebug_stack_element_dtor);
XG(trace_file) = NULL;
XG(tracefile_name) = NULL;
@@ -1813,7 +1767,7 @@
}
}
- xdebug_prefill_code_coverage(op_array TSRMLS_CC); /*need to always prefill ops for code coverage*/
+ xdebug_prefill_code_coverage(op_array TSRMLS_CC); /*need to always prefill ops for code coverage*/
/* If we're in an eval, we need to create an ID for it. This ID however
* depends on the debugger mechanism in use so we need to call a function
@@ -3486,7 +3440,7 @@
file_len = strlen(file);
/*
- if (XG(do_code_coverage)) {
+ if (XG(do_code_coverage)) {
xdebug_count_line(file, lineno, 0, 0 TSRMLS_CC);
}*/
[FILE: /xdebug/xdebug_code_coverage.h]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.13.4.3
retrieving revision 1.13.4.4
diff -u -r1.13.4.3 -r1.13.4.4
--- xdebug/xdebug_code_coverage.h:1.13.4.3 Mon Jul 20 08:34:39 2009 GMT
+++ xdebug/xdebug_code_coverage.h Thu Aug 20 05:06:28 2009 GMT
@@ -24,81 +24,76 @@
#include "xdebug_mm.h"
#include "xdebug_set.h"
-typedef struct xdebug_coverage_decision
-{
- int lineno;
- int instruction_position;
- int executed;
- int branch1_lineno;
- int branch1_position;
- int branch1_executed;
- xdebug_set *branch1_set;
- int branch2_lineno;
- int branch2_position;
- int branch2_executed;
- xdebug_set *branch2_set;
+typedef struct xdebug_coverage_decision {
+ int lineno;
+ int instruction_position;
+ int executed;
+ int branch1_lineno;
+ int branch1_position;
+ int branch1_executed;
+ xdebug_set *branch1_set;
+ int branch2_lineno;
+ int branch2_position;
+ int branch2_executed;
+ xdebug_set *branch2_set;
} xdebug_coverage_decision;
-typedef struct xdebug_coverage_instruction
-{
- zend_op op;
- int position;
- char *opcode_name;
- zend_execute_data* execute_data;
- int executed;
- int lineno;
- int dead;
- int count;
- int decision;
- int decision_branch1_position;
- int decision_branch2_position;
- int decision_branch1_set;
- int decision_branch2_set;
+typedef struct xdebug_coverage_instruction {
+ zend_op op;
+ int position;
+ char *opcode_name;
+ zend_execute_data* execute_data;
+ int executed;
+ int lineno;
+ int dead;
+ int count;
+ int decision;
+ int decision_branch1_position;
+ int decision_branch2_position;
+ int decision_branch1_set;
+ int decision_branch2_set;
} xdebug_coverage_instruction;
-typedef struct xdebug_coverage_line
-{
- int dead;
+typedef struct xdebug_coverage_line {
+ int dead;
int count;
- int executed;
- int lineno;
- int decision;
- int decision_branch1_lineno;
- int decision_branch2_lineno;
- int decision_branch1_set;
- int decision_branch2_set;
- int previous_total_instructions;
- int total_instructions;
- int instructions_counted;
- xdebug_hash *instructions;
+ int executed;
+ int lineno;
+ int decision;
+ int decision_branch1_lineno;
+ int decision_branch2_lineno;
+ int decision_branch1_set;
+ int decision_branch2_set;
+ int previous_total_instructions;
+ int total_instructions;
+ int instructions_counted;
+ xdebug_hash *instructions;
} xdebug_coverage_line;
-typedef struct xdebug_coverage_function
-{
- char *name;
- char *filename;
- int dead;
- int count;
- int executed;
- xdebug_hash *lines;
- int total_lines;
- int lines_counted;
- xdebug_hash *decisions;
- int total_branches;
- xdebug_set *total_branches_set;
- int branches_counted;
- xdebug_set *branches_counted_set;
+typedef struct xdebug_coverage_function {
+ char *name;
+ char *filename;
+ int dead;
+ int count;
+ int executed;
+ xdebug_hash *lines;
+ int total_lines;
+ int lines_counted;
+ xdebug_hash *decisions;
+ int total_branches;
+ xdebug_set *total_branches_set;
+ int branches_counted;
+ xdebug_set *branches_counted_set;
} xdebug_coverage_function;
-typedef struct xdebug_coverage_file
-{
+typedef struct xdebug_coverage_file {
char *name;
- xdebug_hash *functions;
- xdebug_hash *lines;
- int total_lines;
- int lines_counted;
- int total_branches;
- int branches_counted;
+ xdebug_hash *functions;
+ xdebug_hash *lines;
+ int total_lines;
+ int lines_counted;
+ int total_branches;
+ int branches_counted;
} xdebug_coverage_file;
void xdebug_coverage_file_dtor(void *data);
Received on Thu Aug 20 2009 - 09:14:51 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST