[Lldb-commits] [PATCH] D88483: Add possibility to get module from SBType

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 10:19:32 PDT 2020


jingham added a comment.

You can make up types in the expression parser.  So for instance, I can do:

In D88483#2338408 <https://reviews.llvm.org/D88483#2338408>, @fallkrum wrote:

> Can you please give me a couple of words on what m_static_type and m_dynamic_type is in TypeImpl class, in what cases can it be initialized with both of those types?

ValueObjectDynamic value uses a TypeImpl to store its type, and it stores both the static type (the one returned by the parsed expression or was in the DWARF variable records for some local value) and the dynamic type it figured out by looking at the value in memory in this TypeImpl.  See for instance ValueObjectDynamicValue::UpdateValue.  ValueObjectDynamicValue could also get its static type from its parent.  I'm not sure why it doesn't do that and stores it in its TypeImpl instead; presumably this was more convenient somewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88483



More information about the lldb-commits mailing list