View Issue Details

IDProjectCategoryView StatusLast Update
0000461Xdebugpublic2009-08-06 10:39
Reportertoddw Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
Summary0000461: xdebug 2.0.5 with php 5.3 - context_get for function variables always appear as "unitialized" - Linux
Description

This is a similar report as to http://bugs.xdebug.org/view.php?id=376

Sample code:

<?php

class Test {
function __construct($abc) {
$test = 'asdf' . $abc . "\n";
echo $abc;
}

function callTarget($arg) {
    $msg = 'Calling ' . $arg . &quot;\n&quot;;
    echo $msg;

}
}

function outer($arg1, $arg2) {
$local = $arg1 . " " . $arg2 . "\n";
echo $local;
}

$t = new Test('someone');
$t->callTarget('12345');
outer("Time", "flies");

?>

If I place a breakpoint at any of the above "echo" lines, all local variables and function arguments are reported as uninitialized.

Note: This seems specific to Linux (or it may be I'm doing something wrong with the compiling of xdebug), as the prebuilt xdebug Windows binaries do not have this problem. I've tried both x86 and x86_64 Linux platforms - both experience the same problem.

The xdebug request/response is as follows:

context_get -c 0 -d 0 -i 39

<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="context_get" transaction_id="39" context="0">
<property name="abc" fullname="$abc" type="uninitialized"></property>
<property name="test" fullname="$test" type="uninitialized"></property>
<property name="$this" fullname="$this" address="14441248" type="object" children="0" classname="Test" numchildren="0"></property>
</response>

The initial xdebug handshake does confirm that I'm am indeed using the 2.0.5 version:

<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; fileuri="file:///home/toddw/tmp/p.php" language="PHP" protocol_version="1.0" appid="20417" session="Z3KUwFTDxTo=" idekey="toddw">
<engine version="2.0.5">
<![CDATA[Xdebug]]>
</engine>
<author>
<![CDATA[Derick Rethans]]>
</author>
<url>
<![CDATA[http://xdebug.org]]>
</url>
<copyright>
<![CDATA[Copyright (c) 2002-2009 by Derick Rethans]]>
</copyright>
</init>

Additional Information

PHP version details (self compiled php 5.3.0 from php.net):
PHP 5.3.0 (cli) (built: Jul 1 2009 16:10:01)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

TagsNo tags attached.
Operating SystemLinux
PHP Version5.3.0

Relationships

duplicate of 0000376 closed Fail context for local variable 

Activities

derick

2009-08-06 10:39

administrator   ~0001028

Duplicate of 0000376 — My mistake, this is only in HEAD (2.1-dev) and not in 2.0.5.

Issue History

Date Modified Username Field Change
2009-08-05 22:57 toddw New Issue
2009-08-05 22:57 toddw Operating System => Linux
2009-08-05 22:57 toddw PHP Version => 5.3.0
2009-08-05 22:57 toddw Xdebug Version => 2.0.5
2009-08-06 10:39 derick Note Added: 0001028
2009-08-06 10:39 derick Relationship added duplicate of 0000376
2009-08-06 10:39 derick Duplicate ID 0 => 376
2009-08-06 10:39 derick Status new => resolved
2009-08-06 10:39 derick Resolution open => duplicate
2009-08-06 10:39 derick Assigned To => derick
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)