Browse Source

...

pull/550/head
krakjoe 13 years ago
parent
commit
0a6804a986
  1. 20
      phpdbg_bp.c
  2. 2
      phpdbg_bp.h
  3. 3
      phpdbg_prompt.c

20
phpdbg_bp.c

@ -204,11 +204,12 @@ int phpdbg_find_breakpoint_symbol(zend_function *fbc TSRMLS_DC) /* {{{ */
ops = (zend_op_array*)fbc;
if (ops->scope) {
/* do not check class methods */
return FAILURE;
/* find method breaks here */
return phpdbg_find_breakpoint_method(
ops TSRMLS_CC);
}
fname = ((zend_op_array*)fbc)->function_name;
fname = ops->function_name;
if (!fname) {
fname = "main";
@ -225,22 +226,11 @@ int phpdbg_find_breakpoint_symbol(zend_function *fbc TSRMLS_DC) /* {{{ */
return FAILURE;
} /* }}} */
int phpdbg_find_breakpoint_method(zend_function *fbc TSRMLS_DC) /* {{{ */
int phpdbg_find_breakpoint_method(zend_op_array *ops TSRMLS_DC) /* {{{ */
{
HashTable *class_table;
phpdbg_breakmethod_t *bp;
zend_op_array *ops = NULL;
if (fbc->type != ZEND_USER_FUNCTION) {
return FAILURE;
}
ops = ((zend_op_array*)fbc);
if (!ops->scope) {
return FAILURE;
}
if (zend_hash_find(&PHPDBG_G(bp_methods), ops->scope->name, ops->scope->name_length,
(void**)&class_table) == SUCCESS) {
if (zend_hash_find(

2
phpdbg_bp.h

@ -68,7 +68,7 @@ void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t TSRMLS_DC);
int phpdbg_find_breakpoint_file(zend_op_array* TSRMLS_DC);
int phpdbg_find_breakpoint_symbol(zend_function* TSRMLS_DC);
int phpdbg_find_breakpoint_method(zend_function* TSRMLS_DC);
int phpdbg_find_breakpoint_method(zend_op_array* TSRMLS_DC);
int phpdbg_find_breakpoint_opline(phpdbg_opline_ptr_t TSRMLS_DC);
void phpdbg_clear_breakpoints(TSRMLS_D);

3
phpdbg_prompt.c

@ -613,8 +613,7 @@ zend_vm_enter:
case ZEND_DO_FCALL:
case ZEND_DO_FCALL_BY_NAME:
case ZEND_INIT_STATIC_METHOD_CALL: {
if (phpdbg_find_breakpoint_symbol(previous->function_state.function TSRMLS_CC) == SUCCESS ||
phpdbg_find_breakpoint_method(previous->function_state.function TSRMLS_CC) == SUCCESS) {
if (phpdbg_find_breakpoint_symbol(previous->function_state.function TSRMLS_CC) == SUCCESS) {
while (phpdbg_interactive(TSRMLS_C) != PHPDBG_NEXT) {
if (!PHPDBG_G(quitting)) {
continue;

Loading…
Cancel
Save