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
gdb/libpython.py does not work with gdb 7.2 #73866
Comments
Printing the backtrace in gdb results in Python errors: (gdb) bt
...
#6 0x00007ffff7ba9745 in _PyEval_EvalCodeWithName (_co=<code at remote 0x7ffff1983f40>, globals=Traceback (most recent call last):
File "/home/a/.virtualenvs/3.6g/bin/python3.6-gdb.py", line 1358, in to_string
return pyop.get_truncated_repr(MAX_OUTPUT_LEN)
File "/home/a/.virtualenvs/3.6g/bin/python3.6-gdb.py", line 243, in get_truncated_repr
self.write_repr(out, set())
File "/home/a/.virtualenvs/3.6g/bin/python3.6-gdb.py", line 702, in write_repr
for pyop_key, pyop_value in self.iteritems():
File "/home/a/.virtualenvs/3.6g/bin/python3.6-gdb.py", line 669, in iteritems
entries, nentries = self._get_entries(keys)
File "/home/a/.virtualenvs/3.6g/bin/python3.6-gdb.py", line 717, in _get_entries
except gdb.error:
AttributeError: 'module' object has no attribute 'error'
... |
It's a regression introduced in Python 3.6 by CPython change: gdb.error was introduced in gdb 7.3 by the commit 07ca107c2d958b45633ef0cdcce7219a95f0cf01: |
Victor, the gdb commit that you mentioned introduced gdb.GdbError which is different from gdb.error. [1] The correct commit is 621c83642d17cf523c20f55f2ed945a7ec95ea6a. [2] [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Exception-Handling.html#Exception-Handling |
PR has been merged and backported into 3.6. If there is nothing else, please close this :) Thanks. |
@belopolsky: Tools/gdb/libpython.py still uses gdb.error in gdb.selected_frame():
See my commit 610f5d7. Should we change this line as well? |
Fixed by #363 |
Note: 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: