[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 21 07:27:57 PDT 2023
DavidSpickett added a comment.
On the subject of not using `TypeSystemClang`, looking around it seems like `TypeSystem` is purely used to look up basic types, never to make new ones. When new types are made the code asks the `TypeSystem` for its `TypeSystemClang` and then uses that to do it.
Is that a limitation of `TypeSystem` or just that it's missing methods? I also looked for ways to build types without the type system then add them to it, but didn't find any. Do we have anyone who knows more about this? (I sure don't)
I could move the code into an existing plugin like Platform. Problems with that:
- Platform implementations are plugins, the base class is not so I have to have 3 copies of the method.
- When using a core file, the platform is always the host. Might be able to work around that by passing the core file's triple in each time.
Or put the code into a new plugin but then I've just got the same dependency problem with more steps.
There is code for dealing with user expressions so I could make the types out of strings and evaluate something like:
*reinterpret_cast(
__attribute__((packed)) struct __lldb_register_fields_cpsr {
uint32_t z;
...
})(<fake address of register value)
It does feel like something that code wasn't intended to do.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145580/new/
https://reviews.llvm.org/D145580
More information about the lldb-commits
mailing list