summaryrefslogtreecommitdiff
path: root/Tools/gdb/libpython.py
AgeCommit message (Collapse)AuthorLines
2018-10-16bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899)Victor Stinner-13/+33
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. (cherry picked from commit 2e438cc2554495b28480a3ffe5cdf41b6ab823a0)
2018-06-15bpo-32962: Backport python-gdb.py and test_gdb.py from master (GH-7726)Victor Stinner-33/+115
* bpo-32962: python-gdb catchs ValueError on read_var() (GH-7692) python-gdb now catchs ValueError on read_var(): when Python has no debug symbols for example. (cherry picked from commit 019d33b7a447e78057842332fb5d3bad01922122) * bpo-32962: python-gdb catchs UnicodeDecodeError (GH-7693) python-gdb now catchs UnicodeDecodeError exceptions when calling string(). (cherry picked from commit d22fc0bc7de7882da204abe50884bbde2da4f9e7) bpo-29367: python-gdb.py now supports also method-wrapper (wrapperobject) objects. (cherry picked from commit 611083331d534481ca7956a376e38fb0e9ef3854)
2016-04-20Fix python-gdb.py: get C types on demandVictor Stinner-9/+17
Issue #26799: Fix python-gdb.py: don't get C types once when the Python code is loaded, but get C types on demand. The C types can change if python-gdb.py is loaded before the Python executable. Patch written by Thomas Ilsche.
2016-04-17Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka-2/+2
2015-09-03python-gdb.py: enhance py-bt commandVictor Stinner-14/+169
* Add py-bt-full command * py-bt now gives an output similar to a regular Python traceback * py-bt indicates: - if the garbage collector is running - if the thread is waiting for the GIL - detect PyCFunction_Call to get the name of the builtin function
2014-01-16Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka-0/+0
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.
2013-11-23Issue #19308: fix the gdb plugin on gdbs linked with Python 3Antoine Pitrou-28/+61
2013-08-26#18803: fix more typos. Patch by Févry Thibault.Ezio Melotti-1/+1
2011-12-19Issue #13628: python-gdb.py is now able to retrieve more frames in the PythonVictor Stinner-8/+26
traceback if Python is optimized. * delay the lookup of the size_t type, it is not available at startup * The second argument of the PyFrameObjectPtr constructor is optional, as done in other constructors * iter_builtins() and iter_globals() methods of PyFrameObjectPtr returns an empty tuple instead of None if Python is optimized * Fix py-bt to handle correctly "optimized" frames * Frame.get_pyop() tries to get the frame pointer from PyEval_EvalCodeEx() if the pointer is optimized out in PyEval_EvalFrameEx()
2010-09-08Merged revisions 84635-84636 via svnmerge fromAntoine Pitrou-27/+38
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84635 | antoine.pitrou | 2010-09-08 22:57:48 +0200 (mer., 08 sept. 2010) | 5 lines Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well as wide (UCS4) unicode builds for both the host interpreter (embedded inside gdb) and the interpreter under test. ........ r84636 | antoine.pitrou | 2010-09-08 23:07:40 +0200 (mer., 08 sept. 2010) | 4 lines Add a safety limit to the number of unicode characters we fetch (followup to r84635, suggested by Dave Malcolm). ........
2010-07-14Merged revisions 82872,82874 via svnmerge fromGeorg Brandl-0/+1
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82872 | georg.brandl | 2010-07-14 10:53:18 +0200 (Mi, 14 Jul 2010) | 1 line Remove XXX from text. ........ r82874 | georg.brandl | 2010-07-14 10:54:40 +0200 (Mi, 14 Jul 2010) | 1 line #9235: fix missing import of sys. ........
2010-05-20libpython.py: fix support of non-BMP unicode charactersVictor Stinner-0/+28
Forward port some code from Python3: * join surrogate pairs if sizeof(Py_UNICODE)==2 * Enable non-BMP test on narrow builds using u"\U0001D121" instead of unichr(0x1D121)
2010-04-20Issue #8437: Fix test_gdb failures, patch written by Dave MalcolmVictor Stinner-14/+14
2010-04-17Issue #8279: Fix test_gdb failures.Martin v. Löwis-3/+18
2010-04-01Issue #8032: For gdb7, a python-gdb.py file is added to the build,Martin v. Löwis-0/+1392
allowing to use advanced gdb features when debugging Python.