From: Felipe Pena Date: Sun, 10 Nov 2013 20:06:19 +0000 (-0200) Subject: - Renamed breakpoint find functions X-Git-Tag: php-5.6.0alpha1~110^2~516^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b6982796d6d535ec868b3e07585d44423b725dc;p=php - Renamed breakpoint find functions --- diff --git a/phpdbg_bp.c b/phpdbg_bp.c index a531f4f1af..2db30d3366 100644 --- a/phpdbg_bp.c +++ b/phpdbg_bp.c @@ -103,7 +103,7 @@ void phpdbg_set_breakpoint_symbol(const char *expr, const char *opline_num_pos T zend_llist_add_element(break_sym_ptr, &new_break); } /* }}} */ -int phpdbg_breakpoint_file(zend_op_array *op_array TSRMLS_DC) /* {{{ */ +int phpdbg_find_breakpoint_file(zend_op_array *op_array TSRMLS_DC) /* {{{ */ { size_t name_len = strlen(op_array->filename); zend_llist *break_list; @@ -126,7 +126,7 @@ int phpdbg_breakpoint_file(zend_op_array *op_array TSRMLS_DC) /* {{{ */ return FAILURE; } /* }}} */ -int phpdbg_breakpoint_symbol(zend_function *fbc TSRMLS_DC) /* {{{ */ +int phpdbg_find_breakpoint_symbol(zend_function *fbc TSRMLS_DC) /* {{{ */ { const char *fname; zend_llist *break_list; diff --git a/phpdbg_bp.h b/phpdbg_bp.h index c6d057c280..e8cb84b92e 100644 --- a/phpdbg_bp.h +++ b/phpdbg_bp.h @@ -41,4 +41,7 @@ typedef struct _phpdbg_breaksymbol_t { void phpdbg_set_breakpoint_file(const char*, const char* TSRMLS_DC); void phpdbg_set_breakpoint_symbol(const char*, const char* TSRMLS_DC); +int phpdbg_find_breakpoint_file(zend_op_array* TSRMLS_DC); +int phpdbg_find_breakpoint_symbol(zend_function* TSRMLS_DC); + #endif /* PHPDBG_BP_H */ diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index cd432fbf61..fc559dd2df 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -254,7 +254,7 @@ static PHPDBG_COMMAND(help) /* {{{ */ ++help_command; } } else { - if (phpdbg_do_cmd(phpdbg_help_commands, expr, expr_len TSRMLS_CC) == FAILURE) { + if (phpdbg_do_cmd(phpdbg_help_commands, (char*)expr, expr_len TSRMLS_CC) == FAILURE) { printf("failed to find help command: %s\n", expr); } } @@ -334,7 +334,8 @@ int phpdbg_interactive(int argc, char **argv TSRMLS_DC) /* {{{ */ return SUCCESS; } /* }}} */ -static void phpdbg_print_opline(zend_execute_data *execute_data TSRMLS_DC) { /* {{{ */ +static void phpdbg_print_opline(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */ +{ zend_op *opline = execute_data->opline; printf("[OPLINE: %p:%s]\n", opline, phpdbg_decode_opcode(opline->opcode)); @@ -361,7 +362,7 @@ zend_vm_enter: phpdbg_print_opline(execute_data TSRMLS_CC); if (PHPDBG_G(has_file_bp) - && phpdbg_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) { + && phpdbg_find_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) { while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) { continue; } @@ -369,7 +370,7 @@ zend_vm_enter: if (PHPDBG_G(has_sym_bp) && (execute_data->opline->opcode == ZEND_DO_FCALL || execute_data->opline->opcode == ZEND_DO_FCALL_BY_NAME) - && phpdbg_breakpoint_symbol(execute_data->function_state.function TSRMLS_CC) == SUCCESS) { + && phpdbg_find_breakpoint_symbol(execute_data->function_state.function TSRMLS_CC) == SUCCESS) { while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) { continue; }