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
7a92d74c
Kaydet (Commit)
7a92d74c
authored
Nis 02, 2004
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
It would help if I deleted the old pystack!
Also, move pystack comment down next to it
üst
74d07f2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
23 deletions
+11
-23
gdbinit
Misc/gdbinit
+11
-23
No files found.
Misc/gdbinit
Dosyayı görüntüle @
7a92d74c
...
...
@@ -26,17 +26,6 @@ define pyg
print _PyGC_Dump
(
$arg0
)
end
# Here's a somewhat fragile way to print the entire Python stack from gdb.
# It's fragile because the tests for the value of $pc depend on the layout
# of specific functions in the C source code.
# Explanation of while and if tests: We want to pop up the stack until we
# land in Py_Main (this is probably an incorrect assumption in an embedded
# interpreter, but the test can be extended by an interested party). If
# Py_Main <= $pc <= Py_GetArgcArv is true $pc is in Py_Main(), so the while
# tests succeeds as long as it's not true. In a similar fashion the if
# statement tests to see if we are in eval_frame().
# print the local variables of the current frame
define pylocals
set
$_i
=
0
...
...
@@ -62,6 +51,17 @@ define pyframe
pylocals
end
# Here's a somewhat fragile way to print the entire Python stack from gdb.
# It's fragile because the tests for the value of $pc depend on the layout
# of specific functions in the C source code.
# Explanation of while and if tests: We want to pop up the stack until we
# land in Py_Main (this is probably an incorrect assumption in an embedded
# interpreter, but the test can be extended by an interested party). If
# Py_Main <= $pc <= Py_GetArgcArv is true, $pc is in Py_Main(), so the while
# tests succeeds as long as it's not true. In a similar fashion the if
# statement tests to see if we are in eval_frame().
# print the entire Python call stack
define pystack
while
$pc
< Py_Main
||
$pc
>
Py_GetArgcArgv
...
...
@@ -72,15 +72,3 @@ define pystack
end
select
-frame
0
end
define pystack
while
$pc
< Py_Main
||
$pc
>
Py_GetArgcArgv
if
$pc
>
eval_frame
&&
$pc
< PyEval_EvalCodeEx
set
$__fn
=
PyString_AsString
(
co->co_filename
)
set
$__n
=
PyString_AsString
(
co->co_name
)
printf
"%s (%d): %s
\n
"
,
$__fn
, f->f_lineno,
$__n
end
up-silently 1
end
select
-frame
0
end
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