Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5ed2b5a9
Kaydet (Commit)
5ed2b5a9
authored
Tem 30, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix source finding if the given frame is a module-level frame.
üst
e38de851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
pdb.py
Lib/pdb.py
+11
-2
No files found.
Lib/pdb.py
Dosyayı görüntüle @
5ed2b5a9
...
...
@@ -105,6 +105,15 @@ def find_function(funcname, filename):
fp
.
close
()
return
answer
def
getsourcelines
(
obj
):
lines
,
lineno
=
inspect
.
findsource
(
obj
)
if
inspect
.
isframe
(
obj
)
and
lineno
==
0
and
\
obj
.
f_globals
is
obj
.
f_locals
:
# must be a module frame: do not try to cut a block out of it
return
lines
,
0
elif
inspect
.
ismodule
(
obj
):
return
lines
,
0
return
inspect
.
getblock
(
lines
[
lineno
:]),
lineno
+
1
# Interaction prompt line will separate file and call info from code
# text using value of line_prefix string. A newline and arrow may
...
...
@@ -1048,7 +1057,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
filename
=
self
.
curframe
.
f_code
.
co_filename
breaklist
=
self
.
get_file_breaks
(
filename
)
try
:
lines
,
lineno
=
inspect
.
getsourcelines
(
self
.
curframe
)
lines
,
lineno
=
getsourcelines
(
self
.
curframe
)
except
IOError
as
err
:
self
.
error
(
err
)
return
...
...
@@ -1064,7 +1073,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
except
:
return
try
:
lines
,
lineno
=
inspect
.
getsourcelines
(
obj
)
lines
,
lineno
=
getsourcelines
(
obj
)
except
(
IOError
,
TypeError
)
as
err
:
self
.
error
(
err
)
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment