return SUCCESS;
} /* }}} */
+static PHPDBG_COMMAND(back) { /* {{{ */
+ if (EG(in_execution)) {
+ const zend_execute_data *current = EG(current_execute_data);
+ if (current) {
+ do {
+ printf("%d\n", current->opline->opcode);
+ } while ((current = current->prev_execute_data));
+ }
+ return SUCCESS;
+ } else {
+ printf("Not executing !\n");
+ return FAILURE;
+ }
+} /* }}} */
+
static PHPDBG_COMMAND(print) { /* {{{ */
if (!expr_len) {
printf("Showing Execution Context Information:\n");
PHPDBG_COMMAND_D(eval, "evaluate some code"),
PHPDBG_COMMAND_D(print, "print something"),
PHPDBG_COMMAND_D(break, "set breakpoint"),
+ PHPDBG_COMMAND_D(back, "show backtrace"),
PHPDBG_COMMAND_D(help, "show help menu"),
PHPDBG_COMMAND_D(quit, "exit phpdbg"),
{NULL, 0, 0}
void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC)
{
- zend_bool original_in_execution;
+ zend_bool original_in_execution = EG(in_execution);
- original_in_execution = EG(in_execution);
EG(in_execution) = 1;
if (0) {