[Lldb-commits] [lldb] r151636 - /lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Sean Callanan
scallanan at apple.com
Tue Feb 28 09:55:31 PST 2012
Author: spyffe
Date: Tue Feb 28 11:55:31 2012
New Revision: 151636
URL: http://llvm.org/viewvc/llvm-project?rev=151636&view=rev
Log:
Extended the IR interpreter to support symbols
that have valid load addresses.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=151636&r1=151635&r2=151636&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Tue Feb 28 11:55:31 2012
@@ -1043,10 +1043,22 @@
Value ret;
- uint64_t symbol_addr = sym_address.GetFileAddress();
-
- ret.GetScalar() = symbol_addr;
- ret.SetValueType(Value::eValueTypeFileAddress);
+ ProcessSP process_sp (m_parser_vars->m_exe_ctx.GetProcessSP());
+
+ if (process_sp)
+ {
+ uint64_t symbol_load_addr = sym_address.GetLoadAddress(&process_sp->GetTarget());
+
+ ret.GetScalar() = symbol_load_addr;
+ ret.SetValueType(Value::eValueTypeLoadAddress);
+ }
+ else
+ {
+ uint64_t symbol_file_addr = sym_address.GetFileAddress();
+
+ ret.GetScalar() = symbol_file_addr;
+ ret.SetValueType(Value::eValueTypeFileAddress);
+ }
return ret;
}
More information about the lldb-commits
mailing list