From 743d7491ef61b3321eb6cb40b2bf57f85b3aa2ae Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 5 Apr 2018 04:33:05 -0500 Subject: [PATCH 1/5] tweaks to issue15817 --- Misc/gdbinit | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/Misc/gdbinit b/Misc/gdbinit index 3b6fe50ef93179..40ac850da0443f 100644 --- a/Misc/gdbinit +++ b/Misc/gdbinit @@ -14,9 +14,11 @@ # with embedded macros that you may find superior to what is in here. # See Tools/gdb/libpython.py and http://bugs.python.org/issue8032. -# Prints a representation of the object to stderr, along with the -# number of reference counts it current has and the hex address the -# object is allocated at. The argument must be a PyObject* +document pyo + Prints a representation of the object to stderr, along with the + number of reference counts it currently has and the hex address the + object is allocated at. The argument must be a PyObject* +end define pyo # side effect of calling _PyObject_Dump is to dump the object's # info - assigning just prevents gdb from printing the @@ -24,14 +26,18 @@ define pyo set $_unused_void = _PyObject_Dump($arg0) end -# Prints a representation of the object to stderr, along with the -# number of reference counts it current has and the hex address the -# object is allocated at. The argument must be a PyGC_Head* +document pyg + Prints a representation of the object to stderr, along with the + number of reference counts it currently has and the hex address the + object is allocated at. The argument must be a PyGC_Head* +end define pyg print _PyGC_Dump($arg0) end -# print the local variables of the current frame +document pylocals + Print the local variables of the current frame. +end define pylocals set $_i = 0 while $_i < f->f_code->co_nlocals @@ -69,7 +75,9 @@ define lineno printf "%d", $__li end -# print the current frame - verbose +document pyframev + Print the current frame - verbose +end define pyframev pyframe pylocals @@ -126,7 +134,9 @@ end # the interpreter you may will have to change the functions you compare with # $pc. -# print the entire Python call stack +document pystack + Print the entire Python call stack +end define pystack while $pc < Py_Main || $pc > Py_GetArgcArgv if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx @@ -137,7 +147,9 @@ define pystack select-frame 0 end -# print the entire Python call stack - verbose mode +document pystackv + Print the entire Python call stack - verbose mode +end define pystackv while $pc < Py_Main || $pc > Py_GetArgcArgv if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx @@ -148,7 +160,9 @@ define pystackv select-frame 0 end -# generally useful macro to print a Unicode string +document pu + Generally useful macro to print a Unicode string +end def pu set $uni = $arg0 set $i = 0 From 7b6871620d2f465c77d913b4f20969dcc0ff5786 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 5 Apr 2018 06:50:41 -0500 Subject: [PATCH 2/5] match other indents --- Misc/gdbinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/gdbinit b/Misc/gdbinit index 40ac850da0443f..9f216215eac2b8 100644 --- a/Misc/gdbinit +++ b/Misc/gdbinit @@ -161,7 +161,7 @@ define pystackv end document pu - Generally useful macro to print a Unicode string + Generally useful macro to print a Unicode string end def pu set $uni = $arg0 From e0292aa45eaa176284d8b04ceab9ebdd43e58ce5 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Wed, 27 May 2020 14:34:01 -0500 Subject: [PATCH 3/5] one more removal --- Include/cpython/unicodeobject.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 4fd674ffea36ea..3b49ce7759037e 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -2,10 +2,6 @@ # error "this header file must not be included directly" #endif -#ifdef __cplusplus -extern "C" { -#endif - /* Py_UNICODE was the native Unicode storage format (code unit) used by Python and represents a single Unicode element in the Unicode type. With PEP 393, Py_UNICODE is deprecated and replaced with a @@ -1221,7 +1217,3 @@ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*); PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *); PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *); - -#ifdef __cplusplus -} -#endif From d49c4bc4befacc487187da5e97b46131ae887e74 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Wed, 27 May 2020 14:42:20 -0500 Subject: [PATCH 4/5] *sigh* wrong branch --- Include/cpython/unicodeobject.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 3b49ce7759037e..4fd674ffea36ea 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -2,6 +2,10 @@ # error "this header file must not be included directly" #endif +#ifdef __cplusplus +extern "C" { +#endif + /* Py_UNICODE was the native Unicode storage format (code unit) used by Python and represents a single Unicode element in the Unicode type. With PEP 393, Py_UNICODE is deprecated and replaced with a @@ -1217,3 +1221,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*); PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *); PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *); + +#ifdef __cplusplus +} +#endif From 96e733e7276b9a6b71c50fc3d61a69aa37d972d4 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 4 Aug 2020 09:18:09 -0500 Subject: [PATCH 5/5] missing dependency --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.pre.in b/Makefile.pre.in index 0a19313ea99397..a89d661ecb3453 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1073,6 +1073,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/cpython/dictobject.h \ $(srcdir)/Include/cpython/fileobject.h \ $(srcdir)/Include/cpython/fileutils.h \ + $(srcdir)/Include/cpython/frameobject.h \ $(srcdir)/Include/cpython/import.h \ $(srcdir)/Include/cpython/initconfig.h \ $(srcdir)/Include/cpython/interpreteridobject.h \ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy