1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 20:22:36 +02:00
set last command/param more carefully
This commit is contained in:
krakjoe
2013-11-24 07:37:54 +00:00
parent 6e8eeea3bc
commit abef3fccc2
2 changed files with 6 additions and 4 deletions

View File

@@ -380,14 +380,16 @@ PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *in
}
}
if (!(PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) {
rc = command->handler(&param, input TSRMLS_CC);
/* only set last command when it is worth it ! */
if ((rc != FAILURE) &&
!(PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) {
PHPDBG_G(lcmd) = (phpdbg_command_t*) command;
phpdbg_clear_param(
&PHPDBG_G(lparam) TSRMLS_CC);
PHPDBG_G(lparam) = param;
}
rc = command->handler(&param, input TSRMLS_CC);
break;
}
command++;

View File

@@ -651,7 +651,7 @@ PHPDBG_COMMAND(back) /* {{{ */
zend_hash_move_forward_ex(Z_ARRVAL(zbacktrace), &position);
if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) {
phpdbg_write(
"frame #%d {main} at %s:%d",
"frame #%d: {main} at %s:%d",
i, Z_STRVAL_PP(file), Z_LVAL_PP(line));
break;
}