[xdebug-dev] Bug 0000158: Function calls from the {main} scope always have the line number 0

From: <xdebug-dev[@]lists.xdebug.org>
Date: Fri, 30 Dec 2005 16:59:15 +0100

The following bug has been CLOSED
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000158
======================================================================
Reporter: jan
Handler:
======================================================================
Project: Xdebug
Bug ID: 158
Category: Feature/Change request
Reproducibility: always
Severity: trivial
Priority: normal
Status: closed
Operating System: OSX 10.4
PHP Version: 5.1.0-dev
Xdebug Version: 2.0.0beta4
======================================================================
Date Submitted: 2005-10-21 23:35 CEST
Last Modified: 2005-12-30 16:59 CET
======================================================================
Summary: Function calls from the {main} scope always have the line number 0
Description:
xdebug does not record the line number of function calls made from the
{main} scope.

A supposed fix for this is here:
Index: xdebug_profiler.c
===================================================================
RCS file: /repository/xdebug/xdebug_profiler.c,v
retrieving revision 1.30
diff -u -r1.30 xdebug_profiler.c
--- xdebug_profiler.c 22 Sep 2005 18:36:51 -0000 1.30
+++ xdebug_profiler.c 21 Oct 2005 21:24:49 -0000
@@ -130,6 +130,11 @@
                         xdfree(tmp_name);
                         tmp_name = tmp_fname;
                         default_lineno = 1;
+ break;
+
+ default:
+ default_lineno = fse->lineno;
+ break;
         }
 
         if (fse->prev) {

and can be viewed online, as well:
http://jan.prima.de/~jan/xdebug_profiler_patch.diff
======================================================================

----------------------------------------------------------------------
 derick - 2005-12-30 16:59 CET
----------------------------------------------------------------------
I committed your patch (with a small change) to CVS. Thanks!

Bug History
Date Modified Username Field Change
======================================================================
2005-10-21 23:35jan New Bug
2005-10-21 23:35jan Bug Monitored: jan
2005-12-30 16:59derick Bugnote Added: 0000322
2005-12-30 16:59derick Status new => closed
======================================================================
Received on Fri Dec 30 2005 - 16:59:17 GMT

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