| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
test_gdb now skips tests if it detects that gdb failed to read debug
information because the Python binary is optimized.
|
|
|
|
|
|
| |
python-gdb.py now checks for "take_gil" function name to check if a
frame tries to acquire the GIL, instead of checking for
"pthread_cond_timedwait" which is specific to Linux and can be a
different condition than the GIL.
|
|
|
|
|
|
|
|
| |
(GH-15232)
This fixes the exception '`ValueError: invalid literal for int() with base 10`
if `str(gdbval)` returns a hexadecimal value (e.g. '0xa0'). This is the case if
the output-radix is set to 16 in gdb. See
https://sourceware.org/gdb/onlinedocs/gdb/Numbers.html for more information.
|
|
|
|
|
|
|
| |
bpo-37151: remove special case for PyCFunction from PyObject_Call
Alse, make the undocumented function PyCFunction_Call an alias
of PyObject_Call and deprecate it.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As it changes the way functions are called, the PEP 590 implementation
skipped the functions that the GDB integration is looking for
(by name) to find function calls.
Looking for the new helper `cfunction_call_varargs` hopefully fixes the
tests, and thus buildbots.
The changed frame nuber in test_gdb is due to there being fewer
C calls when calling a built-in method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
python-gdb.py now handles errors on computing the line number
of a Python frame.
Changes:
* PyFrameObjectPtr.current_line_num() now catchs any Exception on
calling addr2line(), instead of failing with a surprising "<class
'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
getting a line from the Python source file.
|
|
|
|
| |
python-gdb now catchs UnicodeDecodeError exceptions when calling
string().
|
|
|
|
| |
python-gdb now catchs ValueError on read_var(): when Python has no
debug symbols for example.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds. This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.
This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.
test_gdb passes on both a debug and a non-debug build.
Original patch by Bruno "Polaco" Penteado.
|
|
|
|
|
|
|
|
|
|
| |
* Revert "Add Bruno Penteado to ACKS (#3091)"
This reverts commit f978405b3f092e4005b92ba1dbaab15f609b3bb0.
* Revert "bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803)"
This reverts commit 2e0f4db114424a00354eab889ba8f7334a2ab8f0.
|
|
|
|
|
|
|
| |
pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.
Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.
This patch fixes that. Tested locally on python3.6
|
|
|
|
|
|
|
|
| |
* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
expression>) when supported (e.g. any(), all(), tuple(), min(), &
max())
|
|
|
| |
This change is required to make python-dbg.py compatible with GDB versions before 7.3.
|
|
|
|
| |
Calling builtin method is at most 10% faster.
|
|
|
|
|
| |
Issue #29367: python-gdb.py now supports also method-wrapper (wrapperobject)
objects.
|
|
|
|
|
|
|
|
| |
Issue #29259:
* Detect PyCFunction is the current frame, not only in the older frame
* Ignore PyCFunction_Call() since it now calls _PyCFunction_FastCallDict(), and
_PyCFunction_FastCallDict() is already detected
|
|
|
|
| |
Issue #29259.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #29259: Write fast path in _PyCFunction_FastCallKeywords() for
METH_FASTCALL, avoid the creation of a temporary dictionary for keyword
arguments.
Cleanup also _PyCFunction_FastCallDict():
* Don't dereference func before checking that it's not NULL
* Move code to raise the "no keyword argument" exception into a new
no_keyword_error label.
Update python-gdb.py for the change.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Frame.is_other_python_frame() now also handles _PyCFunction_FastCallDict()
frames.
Thanks to the new code to handle fast calls, python-gdb.py is now also able to
detect the <built-in id method of module ...> frame.
|
| |
| |
| |
| |
| |
| | |
Replace int(value.address)+offset with value.cast(unsigned char*)+offset.
It seems like int(value.address) fails on old versions of GDB.
|
| | |
|
|/ |
|
|
|
|
| |
The function was only called in _sizeof_void_p()
|
|
|
|
|
|
|
|
| |
Issue #26799: Fix python-gdb.py: don't get once C types when the Python code
is loaded, but get C types on demande. The C types can change if
python-gdb.py is loaded before the Python executable.
Patch written by Thomas Ilsche.
|
|
|
|
|
|
| |
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
|
|\
| |
| |
| |
| |
| |
| | |
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang lines in the unittestgui and checkpip scripts.
|
| |
| |
| |
| |
| |
| |
| | |
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang line to use python3 executable in the unittestgui script.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
in docstrings and comments.
|
| |
| |
| |
| | |
in docstrings and comments.
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
(test.test_gdb.PyBtTests)
|
|/
|
|
|
|
| |
display invalid strings. Such strings can be found while Python is creating a
new string, in a text decoder for example, when Python is compiled in debug
mode.
|
| |
|
|
|
|
| |
Patch from Serhiy Storchaka.
|
|
|
|
|
|
|
|
|
| |
The gdb hooks for debugging CPython (within Tools/gdb) have
been enhanced to show information on more C frames relevant to CPython within
the "py-bt" and "py-bt-full" commands:
* C frames that are waiting on the GIL
* C frames that are garbage-collecting
* C frames that are due to the invocation of a PyCFunction
|
|
|
|
| |
Patch from Mark Shannon.
|