X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E66A3384640C
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=dreampossible.ca
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dreampossible.ca
MIME-Version: 1.0
Date: Tue, 20 Jul 2021 18:54:27 -0400
From: Jim Hyslop <jhyslop@dreampossible.ca>
To: cygwin@cygwin.com
Subject: Debugging PHP with GDB and php-debuginfo
User-Agent: Roundcube Webmail/1.4.11
Message-ID: <6761b93277958c240961339bc5a1f2e2@dreampossible.ca>
X-Sender: jhyslop@dreampossible.ca
X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_05, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,
 RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
 URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

Hi, all

I've installed the php-debuginfo extension for gdb, but I can't figure 
out how to set a breakpoint with it. Is there a manual for 
php-debuginfo? All I can find is the package information.

I'm trying to debug why a unit test is passing (it should fail). I'm 
using the CakePHP framework (www.cakephp.org). From the command line, I 
normally just execute `vendor/bin/phpunit`.

With gdb, I execute `gdb $(which php)`, then at the command line in GDB 
I type ` b ./tests/TestCase/Controller/UsersControllerTest.php:80`

GDB responds with:
No source file named 
./tests/TestCase/Controller/UsersControllerTest.php.
Make breakpoint pending on future shared library load? (y or [n])

The file name is valid. I've tried using the full path instead of the 
relative path.

When I run the tests with `r vendor/bin/phpunit` the unit tests all 
execute, but GDB doesn't stop at the breakpoint.

Do I need to modify php.ini to use gdb? Any pointers?

-- 
Jim Hyslop

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
