summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectMemory.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-07-07 01:59:51 +0000
committerGreg Clayton <gclayton@apple.com>2011-07-07 01:59:51 +0000
commit644247c1dc56106a06afbf8ac25fa4e07f46dd88 (patch)
treef318a596a16b71724e40d6ae52564b263b5baa10 /lldb/source/Core/ValueObjectMemory.cpp
parenta3c122db7e4883129bb35558becd6fe8c4722295 (diff)
downloadbcm5719-llvm-644247c1dc56106a06afbf8ac25fa4e07f46dd88.tar.gz
bcm5719-llvm-644247c1dc56106a06afbf8ac25fa4e07f46dd88.zip
Added "target variable" command that allows introspection of global
variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
Diffstat (limited to 'lldb/source/Core/ValueObjectMemory.cpp')
-rw-r--r--lldb/source/Core/ValueObjectMemory.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp
index 900d27fbb1a..bfa58378911 100644
--- a/lldb/source/Core/ValueObjectMemory.cpp
+++ b/lldb/source/Core/ValueObjectMemory.cpp
@@ -205,7 +205,7 @@ ValueObjectMemory::UpdateValue ()
case Value::eValueTypeScalar:
// The variable value is in the Scalar value inside the m_value.
// We can point our m_data right to it.
- m_error = m_value.GetValueAsData (&exe_ctx, GetClangAST(), m_data, 0);
+ m_error = m_value.GetValueAsData (&exe_ctx, GetClangAST(), m_data, 0, GetModule());
break;
case Value::eValueTypeFileAddress:
@@ -247,7 +247,7 @@ ValueObjectMemory::UpdateValue ()
else
value.SetContext(Value::eContextTypeClangType, m_clang_type.GetOpaqueQualType());
- m_error = value.GetValueAsData(&exe_ctx, GetClangAST(), m_data, 0);
+ m_error = value.GetValueAsData(&exe_ctx, GetClangAST(), m_data, 0, GetModule());
}
break;
}
@@ -267,3 +267,11 @@ ValueObjectMemory::IsInScope ()
return true;
}
+
+Module *
+ValueObjectMemory::GetModule()
+{
+ return m_address.GetModule();
+}
+
+
OpenPOWER on IntegriCloud