From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34376 invoked by alias); 14 Oct 2016 10:35:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 34095 invoked by uid 89); 14 Oct 2016 10:35:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Consulting, amazed, HX-HELO:sk:EUR01-H, sk:tismer X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0092.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Oct 2016 10:35:00 +0000 Received: from AM4PR0202MB2769.eurprd02.prod.outlook.com (10.171.81.147) by AM4PR0202MB2769.eurprd02.prod.outlook.com (10.171.81.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Fri, 14 Oct 2016 10:34:57 +0000 Received: from AM4PR0202MB2769.eurprd02.prod.outlook.com ([10.171.81.147]) by AM4PR0202MB2769.eurprd02.prod.outlook.com ([10.171.81.147]) with mapi id 15.01.0659.020; Fri, 14 Oct 2016 10:34:57 +0000 From: Alexandru Croitor To: Christian Tismer CC: "gdb@sourceware.org" , "python-dev@python.org" Subject: Re: [Python-Dev] Debugging Python scripts with GDB on OSX Date: Fri, 14 Oct 2016 10:35:00 -0000 Message-ID: <71B1B5E4-5019-4BBB-A15A-D28E74A2A395@qt.io> References: <9013A651-56E5-4F73-A06F-77933A47696B@stackless.com> <30C9FE3D-40E0-4C01-952E-664DC3D9B52A@qt.io> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=alexandru.croitor@qt.io; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-office365-filtering-correlation-id: 2f0ac45f-c0bd-4b6d-fe5b-08d3f41dbe42 x-microsoft-exchange-diagnostics: 1;AM4PR0202MB2769;7:6hmc65+pF0WXGiwGhZKygFlv8OhdNufUFH7gIYizVCtGosKakKb4Mrbx+1jPxmXeLhiWAAd15r/UhEOpgE2YIl+ZyO9fDNmCHI4Kaz250EUR6UwqB71r4Y6+2aUvnX7hL4h2TgbVYyBBQlRZZVgniYgQavWKkIf/hlTF6dUMRvLKZ1pKjS2mpZm6Cf+rbfDc9XUs13AdbL8N5qxBdo0eykM6QiY0zWY/ZqhSzrc9nqHplo4yu5gFtQF2UVFM3n/AZ/SLcWqbmCR7PCiCyP769ZYNIuChKpIm5ohlLlzHoJxrfpl6T7B54j9AvSIq8U6cnss3GnMt2KAhzDg6ksnBru5S6vbTjd6Qjc2exrOMI4E= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM4PR0202MB2769; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(18781404527409)(166708455590820)(254730959083279)(5213294742642)(91638250987450)(64507834874202)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6043046)(6042046);SRVR:AM4PR0202MB2769;BCL:0;PCL:0;RULEID:;SRVR:AM4PR0202MB2769; x-forefront-prvs: 0095BCF226 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(24454002)(189002)(199003)(3846002)(2950100002)(19580405001)(68736007)(33656002)(8936002)(54356999)(110136003)(92566002)(50986999)(87936001)(189998001)(76176999)(19580395003)(6916009)(106116001)(105586002)(74482002)(11100500001)(7846002)(7736002)(101416001)(305945005)(102836003)(3280700002)(4326007)(8676002)(81166006)(10400500002)(2906002)(81156014)(83716003)(2900100001)(3660700001)(586003)(6116002)(106356001)(77096005)(122556002)(5002640100001)(36756003)(82746002)(15975445007)(5660300001)(575784001)(97736004)(93886004)(15395725005)(66066001)(86362001)(104396002)(554374003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM4PR0202MB2769;H:AM4PR0202MB2769.eurprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: qt.io does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: qt.io X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2016 10:34:57.0230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 20d0b167-794d-448a-9d01-aaeccc1124ac X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0202MB2769 X-SW-Source: 2016-10/txt/msg00023.txt.bz2 Hi, I'm aware of PTVS, but I was hoping of getting a crude version of that for = macOS, which you could say that GDB provides. Unfortunately the GDB functionality only works on Linux, which is why I sen= t my message in the first place, hoping that I might be missing something. Regards, Alex. > On 14 Oct 2016, at 11:56, Christian Tismer wrote: >=20 > Hi Alexandru, >=20 > because I know that you are multi-platform, I can recommend the > debugger integration of PTVS very much. >=20 > I am currently using the WingWare debugger for all my projects, > but the Python/C++ integration of PTVS is something that I didn't > find anywhere else! >=20 > Please have a look at the following introduction. >=20 > https://www.youtube.com/watch?v=3DJNNAOypc6Ek >=20 > Starting with minute 22, you will find the kind of debugging that > you are looking for. >=20 > I was pretty amazed by this, and it is probably very helpful in > debugging Qt and PySide. Will give it a try, soon. >=20 > Cheers -- Chris >=20 >=20 > On 14/10/2016 11:12, Alexandru Croitor wrote: >> Hi, >>=20 >> pdb is fine for pure python scripts. >>=20 >> I was interested in things like getting the python back trace or local >> variables from inside GDB, when used in conjunction with c++, so that I >> know which parts of C++ calls python functions, and which parts of >> python call c++ functions. You can't do that with pdb. >>=20 >>=20 >>> On 13 Oct 2016, at 19:12, Christian Tismer >> > wrote: >>>=20 >>> Hi Alexandru, >>>=20 >>> I stumbled over this question a little late by chance.=20 >>>=20 >>> There is the possibility to use GDB, but it is most likely that you >>> want to use python's pdb module, instead.=20 >>>=20 >>> Only in rare cases, when debugging the interpreter itself, you use >>> gdb. For debugging Python code, use pdb or something better.=20 >>>=20 >>> Sent from my Ei4Steve >>>=20 >>> On Jul 6, 2016, at 18:14, Alexandru Croitor >> > wrote: >>>=20 >>>> Hello, >>>>=20 >>>> I'm interested to find out if debugging Python scripts with GDB is >>>> supported on OSX at all? >>>>=20 >>>> I'm referring to the functionality described >>>> on https://wiki.python.org/moin/DebuggingWithGdb and >>>> on http://fedoraproject.org/wiki/Features/EasierPythonDebugging. >>>>=20 >>>> I've tried so far various combinations of pre-compiled GDB from the >>>> homebrew package manager, locally-compiled GDB from homebrew, as well >>>> as locally compiled GDB from MacPorts, together with a pre-compiled >>>> Python 2.7, homebrew-compiled 2.7, and custom compiled Python 2.7 >>>> from the official source tarball. >>>>=20 >>>> My results so far were not successful. The legacy GDB commands to >>>> show a python stack trace or the local variables - do not work. And >>>> the new GDB commands (referenced on the Fedora project page) are not >>>> present at all in any of the GDB versions. >>>>=20 >>>> I've checked the python CI build bot tests, and it seems the new GDB >>>> commands are only successfully tested on Linux machines, and are >>>> skipped on FreeBSD, OS X, and Solaris machines. >>>>=20 >>>> Are the new python <-> GDB commands specific to Linux? >>>> Are there any considerations to take in regards to debug symbols for >>>> Python / GDB on OSX? >>>>=20 >>>> Has anyone attempted what I'm trying to do? >>>>=20 >>>> I would be grateful for any advice. >>>>=20 >>>> And I apologize if my choice of the mailing lists is not the best. >>>>=20 >>>> Regards, Alex. >>>>=20 >>>>=20 >>>> _______________________________________________ >>>> Python-Dev mailing list >>>> Python-Dev@python.org >>>> https://mail.python.org/mailman/listinfo/python-dev >>>> Unsubscribe: >>>> https://mail.python.org/mailman/options/python-dev/tismer%40stackless.= com >>=20 >=20 >=20 > --=20 > Christian Tismer :^) tismer@stackless.com > Software Consulting : http://www.stackless.com/ > Karl-Liebknecht-Str. 121 : https://github.com/PySide > 14482 Potsdam : GPG key -> 0xFB7BEE0E > phone +49 173 24 18 776 fax +49 (30) 700143-0023