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
eb1f4aa2
Kaydet (Commit)
eb1f4aa2
authored
Haz 27, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#9064: accept number of frames for "up" and "down" commands in pdb.
üst
952867aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
20 deletions
+42
-20
pdb.rst
Doc/library/pdb.rst
+6
-4
pdb.doc
Lib/pdb.doc
+6
-6
pdb.py
Lib/pdb.py
+28
-10
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/pdb.rst
Dosyayı görüntüle @
eb1f4aa2
...
...
@@ -210,11 +210,13 @@ w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow
indicates the current frame, which determines the context of most commands.
d(own)
Move the current frame one level down in the stack trace (to a newer frame).
d(own) [*count*]
Move the current frame *count* (default one) levels down in the stack trace
(to a newer frame).
u(p)
Move the current frame one level up in the stack trace (to an older frame).
u(p) [*count*]
Move the current frame *count* (default one) levels up in the stack trace
(to an older frame).
b(reak) [[*filename*:]\ *lineno* | *function*\ [, *condition*]]
With a *lineno* argument, set a break there in the current file. With a
...
...
Lib/pdb.doc
Dosyayı görüntüle @
eb1f4aa2
...
...
@@ -68,13 +68,13 @@ w(here)
An arrow indicates the "current frame", which determines the
context of most commands.
d(own)
Move the current frame
one level down in the stack trac
e
(to a newer frame).
d(own)
[ count ]
Move the current frame
count (default one) levels down in th
e
stack trace
(to a newer frame).
u(p)
Move the current frame
one level up in the stack trac
e
(to an older frame).
u(p)
[ count ]
Move the current frame
count (default one) levels up in th
e
stack trace
(to an older frame).
b(reak) [ ([filename:]lineno | function) [, condition] ]
With a filename:line number argument, set a break there. If
...
...
Lib/pdb.py
Dosyayı görüntüle @
eb1f4aa2
...
...
@@ -618,26 +618,44 @@ class Pdb(bdb.Bdb, cmd.Cmd):
do_w
=
do_where
do_bt
=
do_where
def
_select_frame
(
self
,
number
):
assert
0
<=
number
<
len
(
self
.
stack
)
self
.
curindex
=
number
self
.
curframe
=
self
.
stack
[
self
.
curindex
][
0
]
self
.
curframe_locals
=
self
.
curframe
.
f_locals
self
.
print_stack_entry
(
self
.
stack
[
self
.
curindex
])
self
.
lineno
=
None
def
do_up
(
self
,
arg
):
if
self
.
curindex
==
0
:
print
(
'*** Oldest frame'
,
file
=
self
.
stdout
)
return
try
:
count
=
int
(
arg
or
1
)
except
ValueError
:
print
(
'*** Invalid frame count (
%
s)'
%
arg
,
file
=
self
.
stdout
)
return
if
count
<
0
:
newframe
=
0
else
:
self
.
curindex
=
self
.
curindex
-
1
self
.
curframe
=
self
.
stack
[
self
.
curindex
][
0
]
self
.
curframe_locals
=
self
.
curframe
.
f_locals
self
.
print_stack_entry
(
self
.
stack
[
self
.
curindex
])
self
.
lineno
=
None
newframe
=
max
(
0
,
self
.
curindex
-
count
)
self
.
_select_frame
(
newframe
)
do_u
=
do_up
def
do_down
(
self
,
arg
):
if
self
.
curindex
+
1
==
len
(
self
.
stack
):
print
(
'*** Newest frame'
,
file
=
self
.
stdout
)
return
try
:
count
=
int
(
arg
or
1
)
except
ValueError
:
print
(
'*** Invalid frame count (
%
s)'
%
arg
,
file
=
self
.
stdout
)
return
if
count
<
0
:
newframe
=
len
(
self
.
stack
)
-
1
else
:
self
.
curindex
=
self
.
curindex
+
1
self
.
curframe
=
self
.
stack
[
self
.
curindex
][
0
]
self
.
curframe_locals
=
self
.
curframe
.
f_locals
self
.
print_stack_entry
(
self
.
stack
[
self
.
curindex
])
self
.
lineno
=
None
newframe
=
min
(
len
(
self
.
stack
)
-
1
,
self
.
curindex
+
count
)
self
.
_select_frame
(
newframe
)
do_d
=
do_down
def
do_until
(
self
,
arg
):
...
...
Misc/NEWS
Dosyayı görüntüle @
eb1f4aa2
...
...
@@ -456,6 +456,8 @@ C-API
Library
-------
- Issue #9064: pdb's "up" and "down" commands now accept an optional argument.
- Issue #9018: os.path.normcase() now raises a TypeError if the argument is
not ``str`` or ``bytes``.
...
...
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