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
ac9a2bb0
Kaydet (Commit)
ac9a2bb0
authored
Kas 29, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use booleans where applicable.
üst
2660747a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
bdb.py
Lib/bdb.py
+11
-11
pdb.py
Lib/pdb.py
+10
-10
No files found.
Lib/bdb.py
Dosyayı görüntüle @
ac9a2bb0
...
...
@@ -168,7 +168,7 @@ class Bdb:
def
_set_stopinfo
(
self
,
stopframe
,
returnframe
,
stoplineno
=
0
):
self
.
stopframe
=
stopframe
self
.
returnframe
=
returnframe
self
.
quitting
=
0
self
.
quitting
=
False
# stoplineno >= 0 means: stop at line >= the stoplineno
# stoplineno -1 means: don't stop at all
self
.
stoplineno
=
stoplineno
...
...
@@ -225,7 +225,7 @@ class Bdb:
def
set_quit
(
self
):
self
.
stopframe
=
self
.
botframe
self
.
returnframe
=
None
self
.
quitting
=
1
self
.
quitting
=
True
sys
.
settrace
(
None
)
# Derived classes and clients can call the following methods
...
...
@@ -235,7 +235,7 @@ class Bdb:
# Call self.get_*break*() to see the breakpoints or better
# for bp in Breakpoint.bpbynumber: if bp: bp.bpprint().
def
set_break
(
self
,
filename
,
lineno
,
temporary
=
0
,
cond
=
None
,
def
set_break
(
self
,
filename
,
lineno
,
temporary
=
False
,
cond
=
None
,
funcname
=
None
):
filename
=
self
.
canonic
(
filename
)
import
linecache
# Import as late as possible
...
...
@@ -391,7 +391,7 @@ class Bdb:
except
BdbQuit
:
pass
finally
:
self
.
quitting
=
1
self
.
quitting
=
True
sys
.
settrace
(
None
)
def
runeval
(
self
,
expr
,
globals
=
None
,
locals
=
None
):
...
...
@@ -407,7 +407,7 @@ class Bdb:
except
BdbQuit
:
pass
finally
:
self
.
quitting
=
1
self
.
quitting
=
True
sys
.
settrace
(
None
)
def
runctx
(
self
,
cmd
,
globals
,
locals
):
...
...
@@ -425,7 +425,7 @@ class Bdb:
except
BdbQuit
:
pass
finally
:
self
.
quitting
=
1
self
.
quitting
=
True
sys
.
settrace
(
None
)
return
res
...
...
@@ -457,7 +457,7 @@ class Breakpoint:
# index 0 is unused, except for marking an
# effective break .... see effective()
def
__init__
(
self
,
file
,
line
,
temporary
=
0
,
cond
=
None
,
funcname
=
None
):
def
__init__
(
self
,
file
,
line
,
temporary
=
False
,
cond
=
None
,
funcname
=
None
):
self
.
funcname
=
funcname
# Needed if funcname is not None.
self
.
func_first_executable_line
=
None
...
...
@@ -465,11 +465,11 @@ class Breakpoint:
self
.
line
=
line
self
.
temporary
=
temporary
self
.
cond
=
cond
self
.
enabled
=
1
self
.
enabled
=
True
self
.
ignore
=
0
self
.
hits
=
0
self
.
number
=
Breakpoint
.
next
Breakpoint
.
next
=
Breakpoint
.
next
+
1
Breakpoint
.
next
+=
1
# Build the two lists
self
.
bpbynumber
.
append
(
self
)
if
(
file
,
line
)
in
self
.
bplist
:
...
...
@@ -486,10 +486,10 @@ class Breakpoint:
del
self
.
bplist
[
index
]
def
enable
(
self
):
self
.
enabled
=
1
self
.
enabled
=
True
def
disable
(
self
):
self
.
enabled
=
0
self
.
enabled
=
False
def
bpprint
(
self
,
out
=
None
):
if
out
is
None
:
...
...
Lib/pdb.py
Dosyayı görüntüle @
ac9a2bb0
...
...
@@ -94,14 +94,14 @@ def find_function(funcname, filename):
# consumer of this info expects the first line to be 1
lineno
=
1
answer
=
None
while
1
:
while
True
:
line
=
fp
.
readline
()
if
line
==
''
:
break
if
cre
.
match
(
line
):
answer
=
funcname
,
filename
,
lineno
break
lineno
=
lineno
+
1
lineno
+=
1
fp
.
close
()
return
answer
...
...
@@ -140,7 +140,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
self
.
prompt
=
'(Pdb) '
self
.
aliases
=
{}
self
.
mainpyfile
=
''
self
.
_wait_for_mainpyfile
=
0
self
.
_wait_for_mainpyfile
=
False
self
.
tb_lineno
=
{}
# Try to load readline if it exists
try
:
...
...
@@ -235,9 +235,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
"""This function is called when we stop or break at this line."""
if
self
.
_wait_for_mainpyfile
:
if
(
self
.
mainpyfile
!=
self
.
canonic
(
frame
.
f_code
.
co_filename
)
or
frame
.
f_lineno
<=
0
):
or
frame
.
f_lineno
<=
0
):
return
self
.
_wait_for_mainpyfile
=
0
self
.
_wait_for_mainpyfile
=
False
if
self
.
bp_commands
(
frame
):
self
.
interaction
(
frame
,
None
)
...
...
@@ -337,7 +337,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
for
tmpArg
in
args
[
1
:]:
line
=
line
.
replace
(
"
%
"
+
str
(
ii
),
tmpArg
)
ii
=
ii
+
1
ii
+=
1
line
=
line
.
replace
(
"
%*
"
,
' '
.
join
(
args
[
1
:]))
args
=
line
.
split
()
# split into ';;' separated commands
...
...
@@ -962,7 +962,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
"""q(uit)
\n
exit
Quit from the debugger. The program being executed is aborted.
"""
self
.
_user_requested_quit
=
1
self
.
_user_requested_quit
=
True
self
.
set_quit
()
return
1
...
...
@@ -974,7 +974,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
Handles the receipt of EOF as a command.
"""
self
.
message
(
''
)
self
.
_user_requested_quit
=
1
self
.
_user_requested_quit
=
True
self
.
set_quit
()
return
1
...
...
@@ -1326,9 +1326,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
# events depends on python version). So we take special measures to
# avoid stopping before we reach the main script (see user_line and
# user_call for details).
self
.
_wait_for_mainpyfile
=
1
self
.
_wait_for_mainpyfile
=
True
self
.
mainpyfile
=
self
.
canonic
(
filename
)
self
.
_user_requested_quit
=
0
self
.
_user_requested_quit
=
False
with
open
(
filename
,
"rb"
)
as
fp
:
statement
=
"exec(compile(
%
r,
%
r, 'exec'))"
%
\
(
fp
.
read
(),
self
.
mainpyfile
)
...
...
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