Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: [Python-Dev] Debugging Python scripts with GDB on OSX
       [not found]   ` <30C9FE3D-40E0-4C01-952E-664DC3D9B52A@qt.io>
@ 2016-10-14  9:56     ` Christian Tismer
  2016-10-14 10:35       ` Alexandru Croitor
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Tismer @ 2016-10-14  9:56 UTC (permalink / raw)
  To: Alexandru Croitor; +Cc: gdb, python-dev

Hi Alexandru,

because I know that you are multi-platform, I can recommend the
debugger integration of PTVS very much.

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!

Please have a look at the following introduction.

https://www.youtube.com/watch?v=JNNAOypc6Ek

Starting with minute 22, you will find the kind of debugging that
you are looking for.

I was pretty amazed by this, and it is probably very helpful in
debugging Qt and PySide. Will give it a try, soon.

Cheers -- Chris


On 14/10/2016 11:12, Alexandru Croitor wrote:
> Hi,
> 
> pdb is fine for pure python scripts.
> 
> 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.
> 
> 
>> On 13 Oct 2016, at 19:12, Christian Tismer <tismer@stackless.com
>> <mailto:tismer@stackless.com>> wrote:
>>
>> Hi Alexandru,
>>
>> I stumbled over this question a little late by chance. 
>>
>> There is the possibility to use GDB, but it is most likely that you
>> want to use python's pdb module, instead. 
>>
>> Only in rare cases, when debugging the interpreter itself, you use
>> gdb. For debugging Python code, use pdb or something better. 
>>
>> Sent from my Ei4Steve
>>
>> On Jul 6, 2016, at 18:14, Alexandru Croitor <alexandru.croitor@qt.io
>> <mailto:alexandru.croitor@qt.io>> wrote:
>>
>>> Hello,
>>>
>>> I'm interested to find out if debugging Python scripts with GDB is
>>> supported on OSX at all?
>>>
>>> I'm referring to the functionality described
>>> on https://wiki.python.org/moin/DebuggingWithGdb and
>>> on http://fedoraproject.org/wiki/Features/EasierPythonDebugging.
>>>
>>> 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.
>>>
>>> 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.
>>>
>>> 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.
>>>
>>> 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?
>>>
>>> Has anyone attempted what I'm trying to do?
>>>
>>> I would be grateful for any advice.
>>>
>>> And I apologize if my choice of the mailing lists is not the best.
>>>
>>> Regards, Alex.
>>>
>>>
>>> _______________________________________________
>>> Python-Dev mailing list
>>> Python-Dev@python.org <mailto:Python-Dev@python.org>
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com
> 


-- 
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Python-Dev] Debugging Python scripts with GDB on OSX
  2016-10-14  9:56     ` [Python-Dev] Debugging Python scripts with GDB on OSX Christian Tismer
@ 2016-10-14 10:35       ` Alexandru Croitor
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandru Croitor @ 2016-10-14 10:35 UTC (permalink / raw)
  To: Christian Tismer; +Cc: gdb, python-dev

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 sent my message in the first place, hoping that I might be missing something.

Regards,

Alex.


> On 14 Oct 2016, at 11:56, Christian Tismer <tismer@stackless.com> wrote:
> 
> Hi Alexandru,
> 
> because I know that you are multi-platform, I can recommend the
> debugger integration of PTVS very much.
> 
> 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!
> 
> Please have a look at the following introduction.
> 
> https://www.youtube.com/watch?v=JNNAOypc6Ek
> 
> Starting with minute 22, you will find the kind of debugging that
> you are looking for.
> 
> I was pretty amazed by this, and it is probably very helpful in
> debugging Qt and PySide. Will give it a try, soon.
> 
> Cheers -- Chris
> 
> 
> On 14/10/2016 11:12, Alexandru Croitor wrote:
>> Hi,
>> 
>> pdb is fine for pure python scripts.
>> 
>> 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.
>> 
>> 
>>> On 13 Oct 2016, at 19:12, Christian Tismer <tismer@stackless.com
>>> <mailto:tismer@stackless.com>> wrote:
>>> 
>>> Hi Alexandru,
>>> 
>>> I stumbled over this question a little late by chance. 
>>> 
>>> There is the possibility to use GDB, but it is most likely that you
>>> want to use python's pdb module, instead. 
>>> 
>>> Only in rare cases, when debugging the interpreter itself, you use
>>> gdb. For debugging Python code, use pdb or something better. 
>>> 
>>> Sent from my Ei4Steve
>>> 
>>> On Jul 6, 2016, at 18:14, Alexandru Croitor <alexandru.croitor@qt.io
>>> <mailto:alexandru.croitor@qt.io>> wrote:
>>> 
>>>> Hello,
>>>> 
>>>> I'm interested to find out if debugging Python scripts with GDB is
>>>> supported on OSX at all?
>>>> 
>>>> I'm referring to the functionality described
>>>> on https://wiki.python.org/moin/DebuggingWithGdb and
>>>> on http://fedoraproject.org/wiki/Features/EasierPythonDebugging.
>>>> 
>>>> 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.
>>>> 
>>>> 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.
>>>> 
>>>> 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.
>>>> 
>>>> 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?
>>>> 
>>>> Has anyone attempted what I'm trying to do?
>>>> 
>>>> I would be grateful for any advice.
>>>> 
>>>> And I apologize if my choice of the mailing lists is not the best.
>>>> 
>>>> Regards, Alex.
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Python-Dev mailing list
>>>> Python-Dev@python.org <mailto:Python-Dev@python.org>
>>>> https://mail.python.org/mailman/listinfo/python-dev
>>>> Unsubscribe:
>>>> https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com
>> 
> 
> 
> -- 
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-14 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BBF024F4-DEA9-48D4-BE6E-298E2951AD4E@qt.io>
     [not found] ` <9013A651-56E5-4F73-A06F-77933A47696B@stackless.com>
     [not found]   ` <30C9FE3D-40E0-4C01-952E-664DC3D9B52A@qt.io>
2016-10-14  9:56     ` [Python-Dev] Debugging Python scripts with GDB on OSX Christian Tismer
2016-10-14 10:35       ` Alexandru Croitor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox