[Lldb-commits] [PATCH] D92643: [lldb] Lookup static const members in FindGlobalVariables

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 4 09:53:24 PST 2020


jingham added a comment.

In D92643#2433441 <https://reviews.llvm.org/D92643#2433441>, @werat wrote:

> In D92643#2433428 <https://reviews.llvm.org/D92643#2433428>, @labath wrote:
>
>> Are the static members included in the (SB)Type object that gets created when parsing the enclosing type? If yes, we might be able to retrieve them that way. Whether that would be cleaner -- I'm not sure...
>>
>> (I would expect they are included, as otherwise they would be unavailable to the expression evaluator.)
>
> I think they're not as of now, but there's a patch from @teemperor to add them there -- D81471 <https://reviews.llvm.org/D81471>
>
> Also, I was looking at `Type/TypeSystem` and it seems there's no API right now to get static members from a `Type`.

I couldn't tell what you meant by this...  I would expect that a Type would tell you that static members exist, and their type, etc.  But I wouldn't expect a Type to be able to get a value for a static member.  After all, the type comes from some Module, which could be shared amongst a bunch of processes in lldb.  The actual member value could be different in each of these processes, but since the Type has no process, it has no way to get the correct value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92643/new/

https://reviews.llvm.org/D92643



More information about the lldb-commits mailing list