From: krakjoe Date: Mon, 11 Nov 2013 12:07:11 +0000 (+0000) Subject: break opline help X-Git-Tag: php-5.6.0alpha1~110^2~491 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28848919cf19edcb8035b1709e465173ab679b0a;p=php break opline help --- diff --git a/phpdbg_help.c b/phpdbg_help.c index 11430916c8..9fbd7bd137 100644 --- a/phpdbg_help.c +++ b/phpdbg_help.c @@ -83,11 +83,14 @@ PHPDBG_HELP(break) /* {{{ */ printf("Setting a breakpoint stops execution at a specific stage, the syntax is:\n"); printf("\tfile:line\n"); printf("\tfunction\n"); + printf("\t0x12345678\n"); printf("For example:\n"); printf("\tphpdbg> break test.php:1\n"); printf("Will break execution on line 1 of test.php\n"); printf("\tphpdbg> break my_function\n"); printf("Will break execution on entry to my_function\n"); + printf("\tphpdbg> break 0x4c79a40\n"); + printf("Will break at the opline with the address provided\n"); return SUCCESS; } /* }}} */ diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 9ab039e476..e6b17912e8 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -259,6 +259,19 @@ static PHPDBG_COMMAND(print) /* {{{ */ } } #endif + + if (PHPDBG_G(has_opline_bp)) { + HashPosition position; + phpdbg_breakline_t *brake; + + printf("--------------------------------------\n"); + printf("Opline Break Point Information:\n"); + for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp_oplines), &position); + zend_hash_get_current_data_ex(&PHPDBG_G(bp_oplines), (void**) &brake, &position) == SUCCESS; + zend_hash_move_forward_ex(&PHPDBG_G(bp_oplines), &position)) { + printf("#%d\t0x%x\n", brake->id, brake->opline); + } + } printf("--------------------------------------\n"); return SUCCESS;