[PATCH] D72590: NFC: Change PointerLikeTypeTraits::NumLowBitsAvailable from enum to static member. This allows GDB pretty printer to find the value.
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 14:45:51 PST 2020
csigg added a comment.
I was not able to get to NumLowBitsAvailable through Python GDB if it's an enumeration inside an anonymous struct.
- If it's in a named struct, I could use `gdb.lookup_type(enum_name).fields()` and parse the Field.name and get the Field.enumvalue.
- If it's a static member, I can do `gdb.parse_and_evel(enumeration_name)` or `gdb.lookup_symbol(enumeration_name)[0].value()`.
I'm not sure anymore if I tried a named struct with the latter, but possibly it would work.
The current status is a mix of anonymous enums and 'static const', so maybe unifying it is the easiest way to make it work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72590/new/
https://reviews.llvm.org/D72590
More information about the llvm-commits
mailing list