Upstream some data formatter related cleanups
llvm-svn: 253093
This commit is contained in:
parent
8f186f8574
commit
89d8ef7ee3
|
@ -173,7 +173,10 @@ lldb_private::formatters::ExtractValueFromObjCExpression (ValueObject &valobj,
|
|||
options.SetCoerceToId(false);
|
||||
options.SetUnwindOnError(true);
|
||||
options.SetKeepInMemory(true);
|
||||
|
||||
options.SetLanguage(lldb::eLanguageTypeObjC_plus_plus);
|
||||
options.SetResultIsInternal(true);
|
||||
options.SetUseDynamic(lldb::eDynamicCanRunTarget);
|
||||
|
||||
target->EvaluateExpression(expr.GetData(),
|
||||
stack_frame,
|
||||
result_sp,
|
||||
|
@ -233,10 +236,12 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
|
|||
return valobj_sp;
|
||||
if (!selector || !*selector)
|
||||
return valobj_sp;
|
||||
StreamString expr_path_stream;
|
||||
valobj.GetExpressionPath(expr_path_stream, false);
|
||||
StreamString expr;
|
||||
expr.Printf("(%s)[%s %s:%" PRId64 "]",return_type,expr_path_stream.GetData(),selector,index);
|
||||
const char *colon = "";
|
||||
llvm::StringRef selector_sr(selector);
|
||||
if (selector_sr.back() != ':')
|
||||
colon = ":";
|
||||
expr.Printf("(%s)[(id)0x%" PRIx64 " %s%s%" PRId64 "]",return_type,valobj.GetPointerValue(),selector,colon,index);
|
||||
ExecutionContext exe_ctx (valobj.GetExecutionContextRef());
|
||||
lldb::ValueObjectSP result_sp;
|
||||
Target* target = exe_ctx.GetTargetPtr();
|
||||
|
@ -248,6 +253,8 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
|
|||
options.SetCoerceToId(false);
|
||||
options.SetUnwindOnError(true);
|
||||
options.SetKeepInMemory(true);
|
||||
options.SetLanguage(lldb::eLanguageTypeObjC_plus_plus);
|
||||
options.SetResultIsInternal(true);
|
||||
options.SetUseDynamic(lldb::eDynamicCanRunTarget);
|
||||
|
||||
target->EvaluateExpression(expr.GetData(),
|
||||
|
@ -270,10 +277,12 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
|
|||
return valobj_sp;
|
||||
if (!key || !*key)
|
||||
return valobj_sp;
|
||||
StreamString expr_path_stream;
|
||||
valobj.GetExpressionPath(expr_path_stream, false);
|
||||
StreamString expr;
|
||||
expr.Printf("(%s)[%s %s:%s]",return_type,expr_path_stream.GetData(),selector,key);
|
||||
const char *colon = "";
|
||||
llvm::StringRef selector_sr(selector);
|
||||
if (selector_sr.back() != ':')
|
||||
colon = ":";
|
||||
expr.Printf("(%s)[(id)0x%" PRIx64 " %s%s%s]",return_type,valobj.GetPointerValue(),selector,colon,key);
|
||||
ExecutionContext exe_ctx (valobj.GetExecutionContextRef());
|
||||
lldb::ValueObjectSP result_sp;
|
||||
Target* target = exe_ctx.GetTargetPtr();
|
||||
|
@ -285,6 +294,8 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
|
|||
options.SetCoerceToId(false);
|
||||
options.SetUnwindOnError(true);
|
||||
options.SetKeepInMemory(true);
|
||||
options.SetLanguage(lldb::eLanguageTypeObjC_plus_plus);
|
||||
options.SetResultIsInternal(true);
|
||||
options.SetUseDynamic(lldb::eDynamicCanRunTarget);
|
||||
|
||||
target->EvaluateExpression(expr.GetData(),
|
||||
|
|
Loading…
Reference in New Issue