mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-127321: Avoid stopping at an opcode without an associated line number for breakpoint() (#127457)
This commit is contained in:
parent
a880358af0
commit
1bc4f076d1
3 changed files with 24 additions and 0 deletions
|
@ -438,6 +438,13 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
if (self.mainpyfile != self.canonic(frame.f_code.co_filename)):
|
||||
return
|
||||
self._wait_for_mainpyfile = False
|
||||
if self.trace_opcodes:
|
||||
# GH-127321
|
||||
# We want to avoid stopping at an opcode that does not have
|
||||
# an associated line number because pdb does not like it
|
||||
if frame.f_lineno is None:
|
||||
self.set_stepinstr()
|
||||
return
|
||||
self.bp_commands(frame)
|
||||
self.interaction(frame, None)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue