[Lldb-commits] [lldb] r169300 - /lldb/trunk/source/Core/CXXFormatterFunctions.cpp

Sean Callanan scallanan at apple.com
Tue Dec 4 12:56:04 PST 2012


Author: spyffe
Date: Tue Dec  4 14:56:04 2012
New Revision: 169300

URL: http://llvm.org/viewvc/llvm-project?rev=169300&view=rev
Log:
In the data formatters, if we know the result
type of an Objective-C selector, don't bother
making the expression parser resolve it all over
again.  Just send the message straight to the
object pointer as if it were an id, and cast the
result.

<rdar://problem/12799087>

Modified:
    lldb/trunk/source/Core/CXXFormatterFunctions.cpp

Modified: lldb/trunk/source/Core/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CXXFormatterFunctions.cpp?rev=169300&r1=169299&r2=169300&view=diff
==============================================================================
--- lldb/trunk/source/Core/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/Core/CXXFormatterFunctions.cpp Tue Dec  4 14:56:04 2012
@@ -37,10 +37,8 @@
         return false;
     if (!selector || !*selector)
         return false;
-    StreamString expr_path_stream;
-    valobj.GetExpressionPath(expr_path_stream, false);
     StreamString expr;
-    expr.Printf("(%s)[%s %s]",target_type,expr_path_stream.GetData(),selector);
+    expr.Printf("(%s)[(id)0x%llx %s]",target_type,valobj.GetPointerValue(),selector);
     ExecutionContext exe_ctx (valobj.GetExecutionContextRef());
     lldb::ValueObjectSP result_sp;
     Target* target = exe_ctx.GetTargetPtr();
@@ -51,8 +49,7 @@
     EvaluateExpressionOptions options;
     options.SetCoerceToId(false)
     .SetUnwindOnError(true)
-    .SetKeepInMemory(true)
-    .SetUseDynamic(lldb::eDynamicCanRunTarget);
+    .SetKeepInMemory(true);
     
     target->EvaluateExpression(expr.GetData(),
                                stack_frame,





More information about the lldb-commits mailing list