Skip to content

Commit 25b9a36

Browse files
committed
- Implemented issue #11 (until command)
1 parent 3cb6af2 commit 25b9a36

File tree

4 files changed

+108
-74
lines changed

4 files changed

+108
-74
lines changed

phpdbg_help.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ PHPDBG_HELP(next) /* {{{ */
4949
return SUCCESS;
5050
} /* }}} */
5151

52+
PHPDBG_HELP(until) /* {{{ */
53+
{
54+
phpdbg_writeln("While stepping through execution, or after a breakpoint, use the until command to step back into the vm and reaches the next source line");
55+
return SUCCESS;
56+
} /* }}} */
57+
5258
PHPDBG_HELP(compile) /* {{{ */
5359
{
5460
phpdbg_writeln("Pre-compilation of the execution context provides the opportunity to inspect the opcodes before they are executed");
@@ -80,7 +86,7 @@ PHPDBG_HELP(print) /* {{{ */
8086
phpdbg_notice("Commands");
8187
{
8288
const phpdbg_command_t *print_command = phpdbg_print_commands;
83-
89+
8490
while (print_command && print_command->name) {
8591
phpdbg_writeln("\t%s\t%s", print_command->name, print_command->tip);
8692
++print_command;
@@ -125,7 +131,7 @@ PHPDBG_HELP(break) /* {{{ */
125131
phpdbg_writeln("If you have to clean the environment and recompile then your opline break points will be invalid");
126132
phpdbg_writeln(EMPTY);
127133
phpdbg_writeln("Conditional breaks are costly, use them sparingly !!");
128-
134+
129135
return SUCCESS;
130136
} /* }}} */
131137

phpdbg_help.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ PHPDBG_HELP(step);
4040
PHPDBG_HELP(next);
4141
PHPDBG_HELP(run);
4242
PHPDBG_HELP(eval);
43+
PHPDBG_HELP(until);
4344
PHPDBG_HELP(print);
4445
PHPDBG_HELP(break);
4546
PHPDBG_HELP(clean);
@@ -59,6 +60,7 @@ static const phpdbg_command_t phpdbg_help_commands[] = {
5960
PHPDBG_HELP_D(next, "continue executing while stepping or after breaking"),
6061
PHPDBG_HELP_D(run, "execution inside the phpdbg vm allows detailed inspection and debugging"),
6162
PHPDBG_HELP_D(eval, "access to eval() allows you to affect the environment during execution"),
63+
PHPDBG_HELP_D(until, "continue until the program reaches a source line different than the current one"),
6264
PHPDBG_HELP_D(print, "printing allows inspection of the execution environment"),
6365
PHPDBG_HELP_D(break, "breakpoints allow execution interruption"),
6466
PHPDBG_HELP_D(clean, "resetting the environment is useful while debugging and recompiling"),

0 commit comments

Comments
 (0)