diff options
author | Greg Clayton <gclayton@apple.com> | 2010-11-04 01:54:29 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-11-04 01:54:29 +0000 |
commit | 8f343b09e946cce2ef79461b5a86d987f6a31748 (patch) | |
tree | 5e3d5709fe5b7468e9d24fa01ca2be63a81e5be5 /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | 10af7c430a426ab649ac000152bc51c3601eb395 (diff) | |
download | bcm5719-llvm-8f343b09e946cce2ef79461b5a86d987f6a31748.tar.gz bcm5719-llvm-8f343b09e946cce2ef79461b5a86d987f6a31748.zip |
Added support for loading and unloading shared libraries. This was done by
adding support into lldb_private::Process:
virtual uint32_t
lldb_private::Process::LoadImage (const FileSpec &image_spec,
Error &error);
virtual Error
lldb_private::Process::UnloadImage (uint32_t image_token);
There is a default implementation that should work for both linux and MacOSX.
This ability has also been exported through the SBProcess API:
uint32_t
lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec,
lldb::SBError &error);
lldb::SBError
lldb::SBProcess::UnloadImage (uint32_t image_token);
Modified the DynamicLoader plug-in interface to require it to be able to
tell us if it is currently possible to load/unload a shared library:
virtual lldb_private::Error
DynamicLoader::CanLoadImage () = 0;
This way the dynamic loader plug-ins are allows to veto whether we can
currently load a shared library since the dynamic loader might know if it is
currenlty loading/unloading shared libraries. It might also know about the
current host system and know where to check to make sure runtime or malloc
locks are currently being held.
Modified the expression parser to have ClangUserExpression::Evaluate() be
the one that causes the dynamic checkers to be loaded instead of other code
that shouldn't have to worry about it.
llvm-svn: 118227
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 7f7c780978a..2045c59d058 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -218,21 +218,6 @@ CommandObjectExpression::EvaluateExpression return false; } - if (!m_exe_ctx.process->GetDynamicCheckers()) - { - DynamicCheckerFunctions *dynamic_checkers = new DynamicCheckerFunctions(); - - StreamString install_errors; - - if (!dynamic_checkers->Install(install_errors, m_exe_ctx)) - { - error_stream.Printf("Couldn't install dynamic checkers into the execution context: %s\n", install_errors.GetData()); - return false; - } - - m_exe_ctx.process->SetDynamicCheckers(dynamic_checkers); - } - const char *prefix = NULL; if (m_exe_ctx.target) |