]> granicus.if.org Git - php/commitdiff
print_opline function to decode opline
authorkrakjoe <joe.watkins@live.co.uk>
Sun, 10 Nov 2013 18:05:11 +0000 (18:05 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Sun, 10 Nov 2013 18:05:11 +0000 (18:05 +0000)
phpdbg_prompt.c

index fe81c8cb9dd69adebb1d0342a6620bf1a3729cea..d60bafa4abcc2238de7e036f4a0df3b37f575c45 100644 (file)
@@ -436,6 +436,13 @@ int phpdbg_interactive(int argc, char **argv TSRMLS_DC) /* {{{ */
        return SUCCESS;
 } /* }}} */
 
+static void phpdbg_print_opline(zend_execute_data *execute_data TSRMLS_DC) { /* {{{ */
+    zend_op *opline = execute_data->opline;
+    
+    printf(
+        "[OPLINE: %p:%d]\n", opline, opline->opcode);
+} /* }}} */
+
 void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC)
 {
        zend_bool original_in_execution = EG(in_execution);
@@ -454,7 +461,7 @@ zend_vm_enter:
                }
 #endif
 
-        printf("[OPLINE: %p]\n", execute_data->opline);
+        phpdbg_print_opline(execute_data TSRMLS_CC);
 
         if (PHPDBG_G(has_file_bp)
                        && phpdbg_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) {