diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index ea7e73a51fc..e79937bfbf4 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -309,91 +309,6 @@ public: } void - DumpVariable (CommandReturnObject &result, ExecutionContext *exe_ctx, Variable *variable) - { - if (variable) - { - Stream &s = result.GetOutputStream(); - DWARFExpression &expr = variable->LocationExpression(); - Value expr_result; - Error expr_error; - Type *variable_type = variable->GetType(); - bool expr_success = expr.Evaluate(exe_ctx, NULL, NULL, expr_result, &expr_error); - - if (m_options.debug) - s.Printf ("Variable{0x%8.8x}: ", variable->GetID()); - - if (!expr_success) - s.Printf ("%s = ERROR: %s\n", variable->GetName().AsCString(NULL), expr_error.AsCString()); - else - { - Value::ValueType expr_value_type = expr_result.GetValueType(); - switch (expr_value_type) - { - case Value::eValueTypeScalar: - s.Printf ("%s = ", variable->GetName().AsCString(NULL)); - if (variable_type) - { - DataExtractor data; - if (expr_result.ResolveValue (exe_ctx, NULL).GetData (data)) - variable_type->DumpValue (exe_ctx, &s, data, 0, m_options.show_types, m_options.show_summary, m_options.debug); - } - break; - - case Value::eValueTypeFileAddress: - case Value::eValueTypeLoadAddress: - case Value::eValueTypeHostAddress: - { - s.Printf ("%s = ", variable->GetName().AsCString(NULL)); - lldb::addr_t addr = LLDB_INVALID_ADDRESS; - lldb::AddressType addr_type = eAddressTypeLoad; - - if (expr_value_type == Value::eValueTypeFileAddress) - { - lldb::addr_t file_addr = expr_result.ResolveValue (exe_ctx, NULL).ULongLong(LLDB_INVALID_ADDRESS); - SymbolContext var_sc; - variable->CalculateSymbolContext(&var_sc); - if (var_sc.module_sp) - { - ObjectFile *objfile = var_sc.module_sp->GetObjectFile(); - if (objfile) - { - Address so_addr(file_addr, objfile->GetSectionList()); - addr = so_addr.GetLoadAddress(exe_ctx->process); - } - if (addr == LLDB_INVALID_ADDRESS) - { - result.GetErrorStream().Printf ("error: %s is not loaded\n", - var_sc.module_sp->GetFileSpec().GetFilename().AsCString()); - } - } - else - { - result.GetErrorStream().Printf ("error: unable to resolve the variable address 0x%llx\n", file_addr); - } - } - else - { - if (expr_value_type == Value::eValueTypeHostAddress) - addr_type = eAddressTypeHost; - addr = expr_result.ResolveValue (exe_ctx, NULL).ULongLong(LLDB_INVALID_ADDRESS); - } - - if (addr != LLDB_INVALID_ADDRESS) - { - if (m_options.debug) - s.Printf("@ 0x%8.8llx, value = ", addr); - variable_type->DumpValueInMemory (exe_ctx, &s, addr, addr_type, m_options.show_types, m_options.show_summary, m_options.debug); - } - } - break; - } - s.EOL(); - } - } - } - - void DumpValueObject (CommandReturnObject &result, ExecutionContextScope *exe_scope, ValueObject *valobj, |