Delete some GDB debugvis cruft#154195
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| if version_info[0] >= 3: | ||
| xrange = range | ||
|
|
There was a problem hiding this comment.
This removes Python 2 support, which was probably broken anyway. Not really possible to say.
| class EnumProvider(printer_base): | ||
| def __init__(self, valobj): | ||
| content = valobj[valobj.type.fields()[0]] | ||
| fields = content.type.fields() | ||
| self._empty = len(fields) == 0 | ||
| if not self._empty: | ||
| if len(fields) == 1: | ||
| discriminant = 0 | ||
| else: | ||
| discriminant = int(content[fields[0]]) + 1 | ||
| self._active_variant = content[fields[discriminant]] | ||
| self._name = fields[discriminant].name | ||
| self._full_name = "{}::{}".format(valobj.type.name, self._name) | ||
| else: | ||
| self._full_name = valobj.type.name | ||
|
|
||
| def to_string(self): | ||
| return self._full_name | ||
|
|
||
| def children(self): | ||
| if not self._empty: | ||
| yield self._name, self._active_variant |
There was a problem hiding this comment.
Mentioned in other file, but this is older GDB support.
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@rustbot author (since I still need to fix these issues) |
|
Reminder, once the PR becomes ready for a review, use |
|
☔ The latest upstream changes (presumably #154824) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Gonna close this for now; there are merge conflicts and I think I want to do this a bit slower first. |
Based upon discussion on Zulip: #t-compiler/debuginfo > GDB debugvis cruft
This ensures that
ruff checkpasses, which will verify that it works on Python 3.9 (lowest valid version for Ruff to check). It removes:HashMap/HashSetstuff (rust-gdbis managed byrustupnow)It also replaces the glob imports with ones that
ruff checkwill be able to verify.I would like to do more refactoring here and potentially split apart the visualisers across the various libstd crates (core, alloc, and std) but that is a larger change that this one, and this is mostly just to get verification on the changes being acceptable.