Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Wed, 2013-04-10 at 01:45 +0200, David Ostrovsky wrote:
On Tue, 2013-04-09 at 11:26 -0400, David Malcolm wrote:

[...snip...]

http://docs.python.org/devguide/gdb.html#gdb-7-and-later

In particular:
  (gdb) py-list
should give you python source code for the current python frame.
        

Works like a charm here on OpenSUSE 12.3 too, with system python3.3:

[...snip...]

Good to hear.

I must be missing something, but i didn't find a standard way how to
install Tools/gdb/libpython.py from cpython, so i just cloned the
upstream python, with 
hg clone http://hg.python.org/cpython

and borrowed that lib from there (sourcing it manually on gdb):
cpython/Tools/gdb/libpython.py

You can grab that file directly from hg using:
http://hg.python.org/cpython/raw-file/default/Tools/gdb/libpython.py
(where the "default" means the default branch i.e. the trunk for
upstream CPython 3.* development).


I wrote a detailed summary on wiki:

https://wiki.documentfoundation.org/Development/Python_Unit_Tests
That:
  su -c "debuginfo-install python3-3.3.0-1.fc18.x86_64"
can probably be replaced with just:
  su -c "debuginfo-install python3"
since debuginfo-install has the smarts to pick the debuginfo package
with the correct NVR (you *have* to have the debuginfo package for
exactly the build of python3 that you're using, otherwise the debug
information will be out of sync with the machine code, and gdb will
understandably get too confused to give useful information).

FWIW there are some more notes on how I made the debugging "just work"
on Fedora here:
http://fedoraproject.org/wiki/Features/EasierPythonDebugging
if you're looking to do the same for your distro.

Hope this is helpful
Dave


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.