[Lldb-commits] [lldb] r176041 - Optimization of the code-running NSDictionary formatter to skip runtime symbol fetching

Enrico Granata egranata at apple.com
Mon Feb 25 11:44:39 PST 2013


Author: enrico
Date: Mon Feb 25 13:44:39 2013
New Revision: 176041

URL: http://llvm.org/viewvc/llvm-project?rev=176041&view=rev
Log:
Optimization of the code-running NSDictionary formatter to skip runtime symbol fetching

Modified:
    lldb/trunk/source/DataFormatters/NSDictionary.cpp

Modified: lldb/trunk/source/DataFormatters/NSDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/NSDictionary.cpp?rev=176041&r1=176040&r2=176041&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/NSDictionary.cpp (original)
+++ lldb/trunk/source/DataFormatters/NSDictionary.cpp Mon Feb 25 13:44:39 2013
@@ -157,12 +157,10 @@ lldb_private::formatters::NSDictionaryCo
 {
     StreamString idx_name;
     idx_name.Printf("[%zu]",idx);
-    StreamString valobj_expr_path;
-    m_backend.GetExpressionPath(valobj_expr_path, false);
     StreamString key_fetcher_expr;
-    key_fetcher_expr.Printf("(id)[(NSArray*)[%s allKeys] objectAtIndex:%zu]",valobj_expr_path.GetData(),idx);
+    key_fetcher_expr.Printf("(id)[(NSArray*)[(id)0x%" PRIx64 " allKeys] objectAtIndex:%zu]",m_backend.GetPointerValue(),idx);
     StreamString value_fetcher_expr;
-    value_fetcher_expr.Printf("(id)[%s objectForKey:%s]",valobj_expr_path.GetData(),key_fetcher_expr.GetData());
+    value_fetcher_expr.Printf("(id)[(id)0x%" PRIx64 " objectForKey:(%s)]",m_backend.GetPointerValue(),key_fetcher_expr.GetData());
     StreamString object_fetcher_expr;
     object_fetcher_expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = %s; _lldb_valgen_item.value = %s; _lldb_valgen_item;",key_fetcher_expr.GetData(),value_fetcher_expr.GetData());
     lldb::ValueObjectSP child_sp;





More information about the lldb-commits mailing list