mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
No longer need to use codehack -- use co.co_firstlineno instead.
This commit is contained in:
parent
2deb73a961
commit
c444865994
1 changed files with 1 additions and 2 deletions
|
@ -112,7 +112,6 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
||||||
filename = self.curframe.f_code.co_filename
|
filename = self.curframe.f_code.co_filename
|
||||||
except:
|
except:
|
||||||
# Try function name as the argument
|
# Try function name as the argument
|
||||||
import codehack
|
|
||||||
try:
|
try:
|
||||||
func = arg
|
func = arg
|
||||||
if hasattr(func, 'im_func'):
|
if hasattr(func, 'im_func'):
|
||||||
|
@ -122,7 +121,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
||||||
print '*** The specified object',
|
print '*** The specified object',
|
||||||
print 'is not a function', arg
|
print 'is not a function', arg
|
||||||
return
|
return
|
||||||
lineno = codehack.getlineno(code)
|
lineno = code.co_firstlineno
|
||||||
filename = code.co_filename
|
filename = code.co_filename
|
||||||
|
|
||||||
# now set the break point
|
# now set the break point
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue