On Sat, 15 Apr 2017, Stanislav Malyshev wrote:

> Hi!
> 
> > behavior I wasn't aware of: https://3v4l.org/6fSRb In backtraces the call
> > is located on the line of it's last argument (in PHP 5.6 the line of the
> > closing ")"). Wouldn't it make more sense to use the starting line of the
> > call? That is, use the same lineno for INIT_FCALL and DO_FCALL?
> 
> Since the call happens after evaluating the arguments, if you debug in
> IDE and go through the arguments, it'll make IDE prompt jump back
> sometimes.

Debuggers generally, and Xdebug specifically, only allow interruptions 
on function entry or on an EXT_STMT call, so that shouldn't be a problem 
here.

OTOH, this is what gdb most definitely does for optimised C code. It 
jumps back and forwards through code if the compiler has reorganised 
statements.

> Not sure it's a good. Logically, it looks like first argument eval 
> happens, then call happens, so linking it to ")" makes sense (if you 
> read it left to right, that's kind of the point where the actual call 
> happens).

I do agree with that though.

cheers,
Derick

-- 
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to