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
610f5d73
Kaydet (Commit)
610f5d73
authored
Ara 16, 2016
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
python-gdb.py: catch gdb.error on gdb.selected_frame()
üst
7b440dfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
libpython.py
Tools/gdb/libpython.py
+18
-2
No files found.
Tools/gdb/libpython.py
Dosyayı görüntüle @
610f5d73
...
...
@@ -1527,7 +1527,11 @@ class Frame(object):
def
get_selected_python_frame
(
cls
):
'''Try to obtain the Frame for the python-related code in the selected
frame, or None'''
frame
=
cls
.
get_selected_frame
()
try
:
frame
=
cls
.
get_selected_frame
()
except
gdb
.
error
:
# No frame: Python didn't start yet
return
None
while
frame
:
if
frame
.
is_python_frame
():
...
...
@@ -1668,6 +1672,10 @@ PyList()
def
move_in_stack
(
move_up
):
'''Move up or down the stack (for the py-up/py-down command)'''
frame
=
Frame
.
get_selected_python_frame
()
if
not
frame
:
print
(
'Unable to locate python frame'
)
return
while
frame
:
if
move_up
:
iter_frame
=
frame
.
older
()
...
...
@@ -1730,6 +1738,10 @@ class PyBacktraceFull(gdb.Command):
def
invoke
(
self
,
args
,
from_tty
):
frame
=
Frame
.
get_selected_python_frame
()
if
not
frame
:
print
(
'Unable to locate python frame'
)
return
while
frame
:
if
frame
.
is_python_frame
():
frame
.
print_summary
()
...
...
@@ -1747,8 +1759,12 @@ class PyBacktrace(gdb.Command):
def
invoke
(
self
,
args
,
from_tty
):
sys
.
stdout
.
write
(
'Traceback (most recent call first):
\n
'
)
frame
=
Frame
.
get_selected_python_frame
()
if
not
frame
:
print
(
'Unable to locate python frame'
)
return
sys
.
stdout
.
write
(
'Traceback (most recent call first):
\n
'
)
while
frame
:
if
frame
.
is_python_frame
():
frame
.
print_traceback
()
...
...
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