View Issue Details

IDProjectCategoryView StatusLast Update
0000643XdebugUncategorizedpublic2011-03-21 20:42
Reporterderick Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.2dev 
Summary0000643: Profiler gets line numberes wrong
Description

Sometimes the profiler gets line numbers wrong and shows costs at the wrong place:

derick@kossu:/tmp$ cat test.php
<?php
xdebug_start_trace();
require_once('t1.inc');

$a = array("testing");

t1();
derick@kossu:/tmp$ cat t1.inc
<?php

require_once('t2.inc');

function tt() {
echo "bla";
echo "bah";

}

function t1() {
global $a;
if (count($a) && errors_fatal($a))
echo "ok";
return TRUE;
}
derick@kossu:/tmp$ cat t2.inc
<?php

function errors_fatal($a) {
count($a) && is_array($a);
return FALSE;
}

Steps To Reproduce

Run with php -dxdebug.profiler_enable=1 test.php and check the profile file with kcachegrind.

TagsNo tags attached.
Operating System
PHP Version5.3.3

Activities

derick

2011-03-21 20:42

administrator   ~0001695

Fixed in SVN for 2.1.1 and HEAD.