Commit: 6d95449e0a0f5ceb326a6fe7df9c2764ca4722e5 Author: krakjoe <joe.watk...@live.co.uk> Tue, 26 Nov 2013 15:58:27 +0000 Parents: bc7df607ab2d7771a3c2226b46598645e67e053f Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6d95449e0a0f5ceb326a6fe7df9c2764ca4722e5 Log: fix #27 Bugs: https://bugs.php.net/27 Changed paths: M phpdbg_bp.c Diff: diff --git a/phpdbg_bp.c b/phpdbg_bp.c index 40a3a50..792ac99 100644 --- a/phpdbg_bp.c +++ b/phpdbg_bp.c @@ -203,6 +203,7 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* HashTable class_breaks, *class_table; size_t class_len = strlen(class_name); size_t func_len = strlen(func_name); + char *lcname = zend_str_tolower_dup(func_name, func_len); if (zend_hash_find(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_name, class_len, (void**)&class_table) != SUCCESS) { @@ -224,7 +225,7 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* new_break.func_len = func_len; new_break.id = PHPDBG_G(bp_count)++; - zend_hash_update(class_table, func_name, func_len, + zend_hash_update(class_table, lcname, func_len, &new_break, sizeof(phpdbg_breakmethod_t), NULL); phpdbg_notice("Breakpoint #%d added at %s::%s", @@ -232,6 +233,8 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* } else { phpdbg_notice("Breakpoint exists at %s::%s", class_name, func_name); } + + efree(lcname); } /* }}} */ PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */ @@ -408,9 +411,6 @@ int phpdbg_find_breakpoint_symbol(zend_function *fbc TSRMLS_DC) /* {{{ */ return FAILURE; } /* }}} */ -/* -* @TODO(anyone) this is case sensitive -*/ int phpdbg_find_breakpoint_method(zend_op_array *ops TSRMLS_DC) /* {{{ */ { HashTable *class_table; @@ -418,17 +418,22 @@ int phpdbg_find_breakpoint_method(zend_op_array *ops TSRMLS_DC) /* {{{ */ if (zend_hash_find(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], ops->scope->name, ops->scope->name_length, (void**)&class_table) == SUCCESS) { + char *lcname = zend_str_tolower_dup(ops->function_name, strlen(ops->function_name)); + size_t lcname_len = strlen(lcname); + if (zend_hash_find( class_table, - ops->function_name, - strlen(ops->function_name), (void**)&bp) == SUCCESS) { - + lcname, + lcname_len, (void**)&bp) == SUCCESS) { + efree(lcname); phpdbg_notice("Breakpoint #%d in %s::%s() at %s:%u", bp->id, bp->class_name, bp->func_name, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C)); return SUCCESS; } + + efree(lcname); } return FAILURE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php