Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18180 invoked from network); 16 Apr 2017 08:16:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2017 08:16:45 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Received: from [82.113.146.227] ([82.113.146.227:57144] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/D3-61625-B6823F85 for ; Sun, 16 Apr 2017 04:16:43 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 8153410C584; Sun, 16 Apr 2017 09:16:40 +0100 (BST) Date: Sun, 16 Apr 2017 09:16:39 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Stanislav Malyshev cc: Nikita Popov , PHP Developers Mailing List In-Reply-To: <1c651049-c92e-80c3-39c7-684ddbdc5f01@gmail.com> Message-ID: References: <1c651049-c92e-80c3-39c7-684ddbdc5f01@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] Re: Inconsistency in line numbers. From: derick@php.net (Derick Rethans) 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