Bug #73704 [Asn->Csd]: phpdbg shows the wrong line in files with shebang
Edit report at https://bugs.php.net/bug.php?id=73704&edit=1
ID: 73704
Updated by: bwoebi@php.net
Reported by: stahlstift at gmail dot com
Summary: phpdbg shows the wrong line in files with shebang
-Status: Assigned
+Status: Closed
Type: Bug
Package: phpdbg
Operating System: Windows 10 Pro
PHP Version: 7.0.14
Assigned To: bwoebi
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3b2b080cbcdcadb97f9dd2db1a6e9e4200c34023
Log: Fixed bug #73704 (phpdbg shows the wrong line in files with shebang)
Previous Comments:
------------------------------------------------------------------------
[2016-12-21 11:17:16] bwoebi@php.net
Are you having by chance a shebang line in the script?
By including one, I could reproduce... will fix.
------------------------------------------------------------------------
[2016-12-21 07:49:31] stahlstift at gmail dot com
No problem - thanks for your afford!
Here the output:
C:\Users\username\PhpstormProjects\product\scripts>phpdbg -ep* orderimport.php
function name: (null)
L1-6 {main}() C:\Users\username\PhpstormProjects\product\scripts\orderimport.php - 0x6a76000 + 10
ops
L4 #0 EXT_STMT
L4 #1 EXT_FCALL_BEGIN
L4 #2 INCLUDE_OR_EVAL "boot.php" @0
L4 #3 EXT_FCALL_END
L4 #4 ASSIGN $application @0
L6 #5 EXT_STMT
L6 #6 EXT_FCALL_BEGIN
L6 #7 INCLUDE_OR_EVAL "C:\\Users\\username\"+
L6 #8 EXT_FCALL_END
L6 #9 RETURN 1
[Script ended normally]
------------------------------------------------------------------------
[2016-12-21 01:57:22] bwoebi@php.net
Sorry for the delay.
I cannot reproduce this locally.
Could you please run: phpdbg -ep* orderimport.php
This should dump the opcodes, perhaps for some reasons you have opcodes on that line, it
shouldn't even be possible to halt on line 4 here as there should be no opcodes...
------------------------------------------------------------------------
[2016-12-09 14:31:05] stahlstift at gmail dot com
Description:
------------
Win 10 Pro 64Bit - PHP 7.14 x84 NTS
C:\Users\username\PhpstormProjects\product\scripts>phpdbg -e orderimport.php env=development
[Welcome to phpdbg, the interactive PHP debugger, v0.5.0]
To get help using phpdbg type "help" and press enter
[Please report bugs to <http://bugs.php.net/report.php>]
[Successful compilation of C:\Users\username\PhpstormProjects\product\scripts\orderimport.php]
prompt> l 10
00001: <?php
00002:
00003: $application = require 'boot.php';
00004:
00005: require __DIR__
.'/../vendor/plugins/PluginName/scripts/orderimport/orderimporter.php';
prompt> b 2
[Breakpoint #0 added at C:\Users\username\PhpstormProjects\product\scripts\orderimport.php:2]
prompt> b 3
[Breakpoint #1 added at C:\Users\username\PhpstormProjects\product\scripts\orderimport.php:3]
prompt> b 4
[Breakpoint #2 added at C:\Users\username\PhpstormProjects\product\scripts\orderimport.php:4]
prompt> run
[Breakpoint #2 at C:\Users\username\PhpstormProjects\product\scripts\orderimport.php:4, hits: 1]
>00004:
00005: require __DIR__
.'/../vendor/plugins/PluginName/scripts/orderimport/orderimporter.php';
prompt>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73704&edit=1
Thread (5 messages)