X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B52E8398EC16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1626830777; bh=VtqvPsXWTNH6HGSOY06R00Sj547G/2GxOjl4OrEvjb8=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UwsdnqYCaYFL7gjYMNK5ymhFC9AtLJICn66M8KUNOn/ondHdqRFThoKNtVq1tn71W nlBQSLLLKlwauvmYZlYUpaR6uwy1OsDy2j+lEFjesf5VDK6YOq60EIdznHpLjOwTFP ZhjoDAob6JeQRp3+24tZH5sf9VlX4UBHhy3REnzk= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2AB0384B004 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NswZogTdqsZPsIrX5cQDx/VjSlVzW+CQUiyz3EHuVd8=; b=OfNHOPvNxvVunzrmXgekGr6iMcaM2rJujNjhkhFUHjf6ZNT8hDlEzSBwd+oh3tjOGo qHH7CmPdMZiK3ZEDlF3Qb/LZrXfRXDqZPBul/6w9+At093xgP0kQZ/LJ64ztqwoOgP38 hm3c3n7OKIVJD+wxZfvHzrn8YUom24Xsag7/n31Cv2pqq4JmvgPZYJ4wTgdCaNC/tegc /rwQ7nn50KwC7ono62VoWjcMv5+qvXI7NnJ5flWO1ysVJWoiLAzF7uJZI0FGrq8qH9hg UO7X8ILiqvV5tN3sr/6lLt4/Lan3vTuNLx25pEKr+52+lvx4AXxGzTx4Fr3+T8eyInL9 BfPA== X-Gm-Message-State: AOAM531ksitgvBqkr6YkNbxVZ3LwNbRnfWeSoI4ybJf6GkqDXpSU00iD XBfHzczRtH2CV1Dknurpqh06UdTDfPJHa/tr+vY= X-Google-Smtp-Source: ABdhPJyfNkY/oLyfl4nJh4bkmQU0IicKxVdp3xeeBM0/m4Nc3jjWT1Syz7Jsg0YZP0ZvJwBhnv9BKKFnWzxOvSxDNmQ= X-Received: by 2002:a9d:5603:: with SMTP id e3mr24164912oti.178.1626830705190; Tue, 20 Jul 2021 18:25:05 -0700 (PDT) MIME-Version: 1.0 References: <6761b93277958c240961339bc5a1f2e2 AT dreampossible DOT ca> In-Reply-To: <6761b93277958c240961339bc5a1f2e2@dreampossible.ca> Date: Tue, 20 Jul 2021 18:24:49 -0700 Message-ID: Subject: Re: Debugging PHP with GDB and php-debuginfo To: Jim Hyslop X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Russell VT via Cygwin Reply-To: Russell VT Cc: cygwin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" There's the "Magic Method" in PHP for __debuginfo() . Also see PHP RFC: __debugInfo() . You may have better luck asking the PHP devs how to best use this with GDB, or the GDB folks how to use the extension. Hope that helps! Russell VT On Tue, Jul 20, 2021 at 3:55 PM Jim Hyslop wrote: > 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 > -- Russell M. Van Tassell -- 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