@@ -301,24 +301,12 @@ static PHP_FUNCTION(phpdbg_exec)
301301 }
302302} /* }}} */
303303
304- /* {{{ proto void phpdbg_break([integer type, string expression] )
304+ /* {{{ proto void phpdbg_break_next( )
305305 instructs phpdbg to insert a breakpoint at the next opcode */
306- static PHP_FUNCTION (phpdbg_break )
306+ static PHP_FUNCTION (phpdbg_break_next )
307307{
308- if (ZEND_NUM_ARGS () > 0 ) {
309- long type = 0 ;
310- char * expr = NULL ;
311- int expr_len = 0 ;
312- phpdbg_param_t param ;
313-
314- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "ls" , & type , & expr , & expr_len ) == FAILURE ) {
315- return ;
316- }
317-
318- phpdbg_parse_param (expr , expr_len , & param TSRMLS_CC );
319- phpdbg_do_break (& param TSRMLS_CC );
320- phpdbg_clear_param (& param TSRMLS_CC );
321-
308+ if (zend_parse_parameters_none () != SUCCESS ) {
309+ return ;
322310 } else if (EG (current_execute_data ) && EG (active_op_array )) {
323311 zend_ulong opline_num = (EG (current_execute_data )-> opline -
324312 EG (active_op_array )-> opcodes );
@@ -328,6 +316,48 @@ static PHP_FUNCTION(phpdbg_break)
328316 }
329317} /* }}} */
330318
319+ /* {{{ proto void phpdbg_break_file(string file, integer line) */
320+ static PHP_FUNCTION (phpdbg_break_file )
321+ {
322+ char * file = NULL ;
323+ int flen = 0 ;
324+ long line ;
325+
326+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "sl" , & file , & flen , & line ) == FAILURE ) {
327+ return ;
328+ }
329+
330+ phpdbg_set_breakpoint_file (file , line TSRMLS_CC );
331+ } /* }}} */
332+
333+ /* {{{ proto void phpdbg_break_method(string class, string method) */
334+ static PHP_FUNCTION (phpdbg_break_method )
335+ {
336+ char * class = NULL ,
337+ * method = NULL ;
338+ int clen = 0 ,
339+ mlen = 0 ;
340+
341+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "ss" , & class , & clen , & method , & mlen ) == FAILURE ) {
342+ return ;
343+ }
344+
345+ phpdbg_set_breakpoint_method (class , method TSRMLS_CC );
346+ } /* }}} */
347+
348+ /* {{{ proto void phpdbg_break_function(string function) */
349+ static PHP_FUNCTION (phpdbg_break_function )
350+ {
351+ char * function = NULL ;
352+ int function_len ;
353+
354+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "s" , & function , & function_len ) == FAILURE ) {
355+ return ;
356+ }
357+
358+ phpdbg_set_breakpoint_symbol (function , function_len TSRMLS_CC );
359+ } /* }}} */
360+
331361/* {{{ proto void phpdbg_clear(void)
332362 instructs phpdbg to clear breakpoints */
333363static PHP_FUNCTION (phpdbg_clear )
@@ -377,9 +407,21 @@ static PHP_FUNCTION(phpdbg_prompt)
377407 phpdbg_set_prompt (prompt TSRMLS_CC );
378408} /* }}} */
379409
380- ZEND_BEGIN_ARG_INFO_EX (phpdbg_break_arginfo , 0 , 0 , 0 )
381- ZEND_ARG_INFO (0 , type )
382- ZEND_ARG_INFO (0 , expression )
410+ ZEND_BEGIN_ARG_INFO_EX (phpdbg_break_next_arginfo , 0 , 0 , 0 )
411+ ZEND_END_ARG_INFO ()
412+
413+ ZEND_BEGIN_ARG_INFO_EX (phpdbg_break_file_arginfo , 0 , 0 , 2 )
414+ ZEND_ARG_INFO (0 , file )
415+ ZEND_ARG_INFO (0 , line )
416+ ZEND_END_ARG_INFO ()
417+
418+ ZEND_BEGIN_ARG_INFO_EX (phpdbg_break_method_arginfo , 0 , 0 , 2 )
419+ ZEND_ARG_INFO (0 , class )
420+ ZEND_ARG_INFO (0 , method )
421+ ZEND_END_ARG_INFO ()
422+
423+ ZEND_BEGIN_ARG_INFO_EX (phpdbg_break_function_arginfo , 0 , 0 , 1 )
424+ ZEND_ARG_INFO (0 , function )
383425ZEND_END_ARG_INFO ()
384426
385427ZEND_BEGIN_ARG_INFO_EX (phpdbg_color_arginfo , 0 , 0 , 0 )
@@ -400,7 +442,10 @@ ZEND_END_ARG_INFO()
400442
401443zend_function_entry phpdbg_user_functions [] = {
402444 PHP_FE (phpdbg_clear , phpdbg_clear_arginfo )
403- PHP_FE (phpdbg_break , phpdbg_break_arginfo )
445+ PHP_FE (phpdbg_break_next , phpdbg_break_next_arginfo )
446+ PHP_FE (phpdbg_break_file , phpdbg_break_file_arginfo )
447+ PHP_FE (phpdbg_break_method , phpdbg_break_method_arginfo )
448+ PHP_FE (phpdbg_break_function , phpdbg_break_function_arginfo )
404449 PHP_FE (phpdbg_exec , phpdbg_exec_arginfo )
405450 PHP_FE (phpdbg_color , phpdbg_color_arginfo )
406451 PHP_FE (phpdbg_prompt , phpdbg_prompt_arginfo )
0 commit comments