]> granicus.if.org Git - php/commitdiff
break opline help
authorkrakjoe <joe.watkins@live.co.uk>
Mon, 11 Nov 2013 12:07:11 +0000 (12:07 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Mon, 11 Nov 2013 12:07:11 +0000 (12:07 +0000)
phpdbg_help.c
phpdbg_prompt.c

index 11430916c8046551d6d84dcb8ea5a47a567f86ee..9fbd7bd1379f7f77a31a6266a4abfe9875f3c474 100644 (file)
@@ -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;
 } /* }}} */
 
index 9ab039e476b582790a5305bab384a3e48550b906..e6b17912e804582b8186b70898ae0ac0d60135d1 100644 (file)
@@ -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;