[xdebug-dev] Bug 0000360: Function line number in profile not correct

From: <noreply[@]lists.xdebug.org>
Date: Wed, 9 Apr 2008 15:32:50 +0200

The following NEW bug has been ADDED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000360
======================================================================
Reporter: oetting
Handler:
======================================================================
Project: Xdebug
Bug ID: 360
Category: Usage problems
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Operating System: OS X
PHP Version: 5.2.4
Xdebug Version: 2.0.2
======================================================================
Date Submitted: 2008-04-09 15:32 CEST
Last Modified: 2008-04-09 15:32 CEST
======================================================================
Summary: Function line number in profile not correct
Description:
Please consider the example script and profile below. In the part of the
profile that describes the invocation of the function "func" the line
number in the cost line is 6. This is the line from where it was called(as
described in the cfn block for that function) and not the line where the
function is defined.

http://valgrind.org/docs/manual/cl-format.html section 3.1.2 paragraph 3
states:
"Thus, the first cost line specifies that in line 15 of source file
"file.f" there is code belonging to function "main"."

As I understand that, the line number should point to code belonging to
the function, just as the fl parameter is the file containing the
function.

##### Script (line numbers added)
1 <?php
2 function func(){
3 1+1;
4 }
5
6 func();

##### Profile
version: 0.9.6
cmd: /Users/jacob/development/webdev/docroot/webgrind/test.php
part: 1

events: Time

fl=/Users/jacob/development/webdev/docroot/webgrind/test.php
fn=func
6 51

fl=/Users/jacob/development/webdev/docroot/webgrind/test.php
fn={main}

summary: 135

0 83
cfn=func
calls=1 0 0
6 51

======================================================================

Bug History
Date Modified Username Field Change
======================================================================
2008-04-09 15:32oetting New Bug
2008-04-09 15:32oetting Bug Monitored: oetting
======================================================================
Received on Wed Apr 09 2008 - 15:32:53 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST