Optimization of the code-running NSDictionary formatter to skip runtime symbol fetching

llvm-svn: 176041
This commit is contained in:
Enrico Granata 2013-02-25 19:44:39 +00:00
parent 59c40ff3f9
commit a221e4e89c
1 changed files with 2 additions and 4 deletions

View File

@ -157,12 +157,10 @@ lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::GetChildAtIn
{
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;