@@ -65,7 +65,7 @@ static void php_phpdbg_destroy_bp_symbol(void *brake) /* {{{ */
65
65
66
66
static void php_phpdbg_destroy_bp_opline (void * brake ) /* {{{ */
67
67
{
68
- efree ((char * )((phpdbg_breakline_t * )brake )-> name );
68
+ free ((char * )((phpdbg_breakline_t * )brake )-> name );
69
69
} /* }}} */
70
70
71
71
static PHP_RINIT_FUNCTION (phpdbg ) /* {{{ */
@@ -94,17 +94,29 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
94
94
return SUCCESS ;
95
95
} /* }}} */
96
96
97
- static PHP_FUNCTION (phpdbg_break ) /* {{{ */
97
+ /* {{{ proto void phpdbg_break(void)
98
+ instructs phpdbg to insert a breakpoint at the next opcode */
99
+ static PHP_FUNCTION (phpdbg_break )
98
100
{
99
101
if (EG (current_execute_data ) && EG (active_op_array )) {
100
- zend_ulong opline_num = EG (current_execute_data )-> opline - EG (active_op_array )-> opcodes ;
102
+ zend_ulong opline_num = ( EG (current_execute_data )-> opline - EG (active_op_array )-> opcodes ) ;
101
103
102
104
phpdbg_set_breakpoint_opline_ex (
103
105
& EG (active_op_array )-> opcodes [opline_num + 1 ] TSRMLS_CC );
104
106
}
105
107
} /* }}} */
106
108
109
+ /* {{{ proto void phpdbg_clear(void)
110
+ instructs phpdbg to clear breakpoints */
111
+ static PHP_FUNCTION (phpdbg_clear )
112
+ {
113
+ zend_hash_clean (& PHPDBG_G (bp_files ));
114
+ zend_hash_clean (& PHPDBG_G (bp_symbols ));
115
+ zend_hash_clean (& PHPDBG_G (bp_oplines ));
116
+ } /* }}} */
117
+
107
118
zend_function_entry phpdbg_user_functions [] = {
119
+ PHP_FE (phpdbg_clear , NULL )
108
120
PHP_FE (phpdbg_break , NULL )
109
121
#ifdef PHP_FE_END
110
122
PHP_FE_END
0 commit comments