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
b02ceda3
Kaydet (Commit)
b02ceda3
authored
Haz 01, 2009
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
üst
09daad98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
test_trace.py
Lib/test/test_trace.py
+17
-0
NEWS
Misc/NEWS
+3
-0
frameobject.c
Objects/frameobject.c
+2
-2
No files found.
Lib/test/test_trace.py
Dosyayı görüntüle @
b02ceda3
...
@@ -740,6 +740,23 @@ class JumpTestCase(unittest.TestCase):
...
@@ -740,6 +740,23 @@ class JumpTestCase(unittest.TestCase):
def
test_19_no_jump_without_trace_function
(
self
):
def
test_19_no_jump_without_trace_function
(
self
):
no_jump_without_trace_function
()
no_jump_without_trace_function
()
def
test_20_large_function
(
self
):
d
=
{}
exec
(
"""def f(output): # line 0
x = 0 # line 1
y = 1 # line 2
''' # line 3
%
s # lines 4-1004
''' # line 1005
x += 1 # line 1006
output.append(x) # line 1007
return"""
%
(
'
\n
'
*
1000
,),
d
)
f
=
d
[
'f'
]
f
.
jump
=
(
2
,
1007
)
f
.
output
=
[
0
]
self
.
run_test
(
f
)
def
test_jump_to_firstlineno
(
self
):
def
test_jump_to_firstlineno
(
self
):
# This tests that PDB can jump back to the first line in a
# This tests that PDB can jump back to the first line in a
# file. See issue #1689458. It can only be triggered in a
# file. See issue #1689458. It can only be triggered in a
...
...
Misc/NEWS
Dosyayı görüntüle @
b02ceda3
...
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
...
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
- Issue #5330: C functions called with keyword arguments were not reported by
- Issue #5330: C functions called with keyword arguments were not reported by
the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
...
...
Objects/frameobject.c
Dosyayı görüntüle @
b02ceda3
...
@@ -98,7 +98,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
...
@@ -98,7 +98,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
int
new_iblock
=
0
;
/* The new value of f_iblock */
int
new_iblock
=
0
;
/* The new value of f_iblock */
unsigned
char
*
code
=
NULL
;
/* The bytecode for the frame... */
unsigned
char
*
code
=
NULL
;
/* The bytecode for the frame... */
Py_ssize_t
code_len
=
0
;
/* ...and its length */
Py_ssize_t
code_len
=
0
;
/* ...and its length */
char
*
lnotab
=
NULL
;
/* Iterating over co_lnotab */
unsigned
char
*
lnotab
=
NULL
;
/* Iterating over co_lnotab */
Py_ssize_t
lnotab_len
=
0
;
/* (ditto) */
Py_ssize_t
lnotab_len
=
0
;
/* (ditto) */
int
offset
=
0
;
/* (ditto) */
int
offset
=
0
;
/* (ditto) */
int
line
=
0
;
/* (ditto) */
int
line
=
0
;
/* (ditto) */
...
@@ -148,7 +148,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
...
@@ -148,7 +148,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
/* Find the bytecode offset for the start of the given
/* Find the bytecode offset for the start of the given
* line, or the first code-owning line after it. */
* line, or the first code-owning line after it. */
PyString_AsStringAndSize
(
f
->
f_code
->
co_lnotab
,
PyString_AsStringAndSize
(
f
->
f_code
->
co_lnotab
,
&
lnotab
,
&
lnotab_len
);
&
(
char
*
)
lnotab
,
&
lnotab_len
);
addr
=
0
;
addr
=
0
;
line
=
f
->
f_code
->
co_firstlineno
;
line
=
f
->
f_code
->
co_firstlineno
;
new_lasti
=
-
1
;
new_lasti
=
-
1
;
...
...
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