mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-93696: Fixed the breakpoint display error for frozen modules (#132862)
This commit is contained in:
parent
0a387b311e
commit
eef49c3595
3 changed files with 19 additions and 10 deletions
|
@ -1971,12 +1971,6 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
if last is None:
|
||||
last = first + 10
|
||||
filename = self.curframe.f_code.co_filename
|
||||
# gh-93696: stdlib frozen modules provide a useful __file__
|
||||
# this workaround can be removed with the closure of gh-89815
|
||||
if filename.startswith("<frozen"):
|
||||
tmp = self.curframe.f_globals.get("__file__")
|
||||
if isinstance(tmp, str):
|
||||
filename = tmp
|
||||
breaklist = self.get_file_breaks(filename)
|
||||
try:
|
||||
lines = linecache.getlines(filename, self.curframe.f_globals)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue