This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, eric.snow, exarkun
Date 2012-09-11.13:09:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347368980.79.0.300695408958.issue15911@psf.upfronthosting.co.za>
In-reply-to
Content
I'm going to guess this is a shortcoming of pdb when it comes to frozen modules as I can get to the source using inspect (which pdb leans on)::

>>> len(inspect.findsource(_frozen_importlib)[0])
1761
>>> len(inspect.findsource(importlib._bootstrap)[0])
1761

Which are accurate line counts::

$ wc Lib/importlib/_bootstrap.py 
 1761  6236 62517 Lib/importlib/_bootstrap.py

So why gdb can't output the source line when it has the line number of the file I don't know when it can already get access to the source without issue.

And yes, debugging imports are hard. =) Still, it's better than before as you can easily toss in a print statement or two and then just regenerate the frozen object. But I do agree it would be nice to get gdb to play along with the whole situation (and thus the title change for this bug).
History
Date User Action Args
2012-09-11 13:09:40brett.cannonsetrecipients: + brett.cannon, exarkun, eric.snow
2012-09-11 13:09:40brett.cannonsetmessageid: <1347368980.79.0.300695408958.issue15911@psf.upfronthosting.co.za>
2012-09-11 13:09:40brett.cannonlinkissue15911 messages
2012-09-11 13:09:39brett.cannoncreate