diff options
author | Enrico Granata <egranata@apple.com> | 2016-05-02 18:13:18 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-05-02 18:13:18 +0000 |
commit | fd4e5a8801beb76f1836aad9b54cb1328faadd51 (patch) | |
tree | a51d0e1c1534c697bc138d96e510d019e6d6f8e8 /lldb/source/Core/ValueObject.cpp | |
parent | 2664d45267cccbd4948a457963c1b505b39bd408 (diff) | |
download | bcm5719-llvm-fd4e5a8801beb76f1836aad9b54cb1328faadd51.tar.gz bcm5719-llvm-fd4e5a8801beb76f1836aad9b54cb1328faadd51.zip |
Add an argument to ValueObject::GetSyntheticBase that allows for name customization on the generated value
llvm-svn: 268274
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. |