msg288684 - (view) |
Author: Alexander Belopolsky (belopolsky) *  |
Date: 2017-02-28 00:02 |
Some gdb macros defined in Misc/gdbinit got broken when _PyUnicode_AsString was renamed to PyUnicode_AsUTF8. (gdb) pystack No symbol "_PyUnicode_AsString" in current context. |
|
|
msg288685 - (view) |
Author: Alexander Belopolsky (belopolsky) *  |
Date: 2017-02-28 00:19 |
I tried to simply replace _PyUnicode_AsString with PyUnicode_AsUTF8, but it looks like code structure has changed and the pyframe and pystack macros don't work anymore. |
|
|
msg288687 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2017-02-28 01:59 |
Note that these macros were always expected to be fragile. They depend to a great extent on the layout of the functions in Python/ceval.c. I've had to tweak them a couple times over the years. I'm pretty sure the gdb instance I have available to me at work wasn't configured --with-python, and corporate policies would prevent me from downloading the source and building my own private version. For me, Misc/gdbinit is likely to be the best I can do for the foreseeable future. If the layout of ceval.c has changed sufficiently between Python 2.x and 3.x, perhaps two versions of gdbinit are warranted, with the version delivered for Python 3 being appropriate for the current release. |
|
|
msg313954 - (view) |
Author: Marcel Plch (Dormouse759) * |
Date: 2018-03-16 16:36 |
I have created a PR here - https://github.com/python/cpython/pull/6126 The problem was, indeed, change in the code structure. The macro checked for presence inside of PyEval_EvalFrame() using address of a neighbouring function. Also, arguments to PyEval_EvalFrame() were changed, so the macro responsible for printing of the frame needed a little tweak. |
|
|
msg314935 - (view) |
Author: Charalampos Stratakis (cstratak) * |
Date: 2018-04-04 14:32 |
A PR has been filed, could someone take a look? |
|
|
msg314947 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-04-04 18:14 |
Thanks for the PR and the ping. I've sent an email to the python-dev list requesting review help for gdb issues including this one. |
|
|
msg315033 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-04-06 21:22 |
New changeset 3a9ccee0e5dbf7d67f5ab79f6095755969db117c by Ned Deily (Marcel Plch) in branch 'master': bpo-29673: fix gdb scripts pystack and pystackv (GH-6126) https://github.com/python/cpython/commit/3a9ccee0e5dbf7d67f5ab79f6095755969db117c |
|
|
msg315037 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-04-06 22:14 |
New changeset 3c193cf8afce525b1283986f113de0e16f23e115 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-29673: fix gdb scripts pystack and pystackv (GH-6126) (GH-6399) https://github.com/python/cpython/commit/3c193cf8afce525b1283986f113de0e16f23e115 |
|
|
msg315038 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-04-06 22:15 |
New changeset 3468a05f6a7d730a656d254730a3f5b6b7e85983 by Ned Deily (Miss Islington (bot)) in branch '3.6': [3.6] bpo-29673: fix gdb scripts pystack and pystackv (GH-6126) (GH-6400) https://github.com/python/cpython/commit/3468a05f6a7d730a656d254730a3f5b6b7e85983 |
|
|
msg315039 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-04-06 22:17 |
Thanks, Marcel, for the fix and thanks, Skip, for the review. Merged for release in 3.6.6 and 3.7.0. |
|
|