diff options
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 69205aaf754..a74599e00df 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2227,13 +2227,19 @@ ValueObject::GetSyntheticChildAtOffset(uint32_t offset, } ValueObjectSP -ValueObject::GetSyntheticBase (uint32_t offset, const CompilerType& type, bool can_create) +ValueObject::GetSyntheticBase (uint32_t offset, + const CompilerType& type, + bool can_create, + ConstString name_const_str) { ValueObjectSP synthetic_child_sp; - char name_str[64]; - snprintf(name_str, sizeof(name_str), "%s", type.GetTypeName().AsCString("<unknown>")); - ConstString name_const_str(name_str); + if (name_const_str.IsEmpty()) + { + char name_str[128]; + snprintf(name_str, sizeof(name_str), "base%s@%i", type.GetTypeName().AsCString("<unknown>"), offset); + name_const_str.SetCString(name_str); + } // Check if we have already created a synthetic array member in this // valid object. If we have we will re-use it. |