]> granicus.if.org Git - php/commitdiff
Fixed frame number order
authorBob Weinand <bobwei9@hotmail.com>
Sat, 12 Apr 2014 20:08:02 +0000 (22:08 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Sat, 12 Apr 2014 20:08:02 +0000 (22:08 +0200)
phpdbg_frame.c

index de02addc1b9f69572dfd2b7405528e4866fa74d7..a235fe8cb04c25a5ed46a2fdb4905a8b54830ccc 100644 (file)
@@ -167,7 +167,7 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */
        zval **tmp;
        zval **file, **line;
        HashPosition position;
-       int i = 1, limit = num;
+       int i = 0, limit = num;
        int user_defined;
 
        if (limit < 0) {
@@ -186,7 +186,7 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */
 
                if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace),
                        (void**)&tmp, &position) == FAILURE) {
-                       phpdbg_write("frame #0: {main} at %s:%ld", Z_STRVAL_PP(file), Z_LVAL_PP(line));
+                       phpdbg_write("frame #%d: {main} at %s:%ld", i, Z_STRVAL_PP(file), Z_LVAL_PP(line));
                        break;
                }