From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id F2AB0384B004 for ; Wed, 21 Jul 2021 01:25:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2AB0384B004 Received: by mail-ot1-x329.google.com with SMTP id i12-20020a05683033ecb02903346fa0f74dso632314otu.10 for ; Tue, 20 Jul 2021 18:25:05 -0700 (PDT) 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@dreampossible.ca> In-Reply-To: <6761b93277958c240961339bc5a1f2e2@dreampossible.ca> From: Russell VT Date: Tue, 20 Jul 2021 18:24:49 -0700 Message-ID: Subject: Re: Debugging PHP with GDB and php-debuginfo To: Jim Hyslop Cc: cygwin 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 01:25:07 -0000 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