Adding two new markers to the ${var..} specifier
- %N = show the name of the variable
- %> = show the expression path of the variable
llvm-svn: 184502
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 67b46bb..e2a87d4 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1693,6 +1693,10 @@
{
const char *cstr = NULL;
+
+ // this is a local stream that we are using to ensure that the data pointed to by cstr survives
+ // long enough for us to copy it to its destination - it is necessary to have this temporary storage
+ // area for cases where our desired output is not backed by some other longer-term storage
StreamString strm;
if (custom_format != eFormatInvalid)
@@ -1724,6 +1728,15 @@
case eValueObjectRepresentationStyleType:
cstr = GetTypeName().AsCString();
break;
+
+ case eValueObjectRepresentationStyleName:
+ cstr = GetName().AsCString();
+ break;
+
+ case eValueObjectRepresentationStyleExpressionPath:
+ GetExpressionPath(strm, false);
+ cstr = strm.GetString().c_str();
+ break;
}
if (!cstr)