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

Ilya Bukonkin via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 14:04:30 PDT 2020


fallkrum added a comment.

In D88483#2339256 <https://reviews.llvm.org/D88483#2339256>, @jingham wrote:

> 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.

Thanks for explanation. 
Could please tell if I understood you correctly: from the start we load into some module’s type system some type for example from DWARF, but during runtime it may be altered and as a consequence ‘original’ static type becomes dynamic in-memory type? It still seems to me I do not completely understand relation between static and it’s dynamic part, if it is correctly to say so. Would like to understand the origin of this.


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