-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-gdb: display wrapper_call() #73553
Comments
python-gdb.py handles various Python calls, but not descriptors. Attached patch adds code to display calls to wrapperobject objects. The patch adds the first "<method-wrapper ...>" line of the traceback: (gdb) py-bt
Traceback (most recent call first):
<method-wrapper '__init__' of CodecInfo object at 0x7ffff7e9d7a8>
File "/home/haypo/prog/python/git_cpython/Lib/encodings/utf_8.py", line 41, in getregentry
streamwriter=StreamWriter,
File "/home/haypo/prog/python/git_cpython/Lib/encodings/__init__.py", line 122, in search_function
entry = getregentry() I wrote this patch while working on the issue bpo-29358. Object instanciation is full of wrappers. A better debugger helps to me understand my bugs ;-) Example to get such tracecback: haypo@selma$ gdb -args ./python -m test -v test_sys
(gdb) b wrapper_call
(gdb) run
(gdb) py-bt
Traceback (most recent call first):
<method-wrapper '__init__' of _EnumDict object at 0x7ffff023d388>
File "/home/haypo/prog/python/default/Lib/enum.py", line 66, in __init__
super().__init__()
File "/home/haypo/prog/python/default/Lib/enum.py", line 117, in __prepare__
enum_dict = _EnumDict()
<built-in method __build_class__ of module object at remote 0x7ffff7f46c58>
File "/home/haypo/prog/python/default/Lib/enum.py", line 509, in <module>
class Enum(metaclass=EnumMeta):
<built-in method exec of module object at remote 0x7ffff7f46c58>
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
(...) I guess that the next step is to write a test ;-) |
New changeset 54fa95b19fae by Victor Stinner in branch 'default': |
New changeset ffd2e5f9256a by Victor Stinner in branch 'default': |
New changeset efaf32ac89ec by Victor Stinner in branch 'default': |
New changeset 30867b703933d6ba30bc5f609a1a2337925ead33 by Victor Stinner in branch 'master': |
New changeset 88835e6022a81d8107a296c9f6e5f16c7d39e27a by Victor Stinner in branch 'master': |
New changeset da331c7d12c4648b9734ebb07e9f722c8478d269 by Victor Stinner in branch 'master': |
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: