summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/Debugger.cpp5
-rw-r--r--lldb/source/Core/Module.cpp55
2 files changed, 46 insertions, 14 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index aaacd6e26ca..064f278fb69 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -2959,7 +2959,10 @@ Debugger::HandleProcessEvent (const EventSP &event_sp)
if (output_stream.GetSize() || error_stream.GetSize())
{
StreamFileSP error_stream_sp (GetOutputFile());
- bool top_io_handler_hid = HideTopIOHandler();
+ bool top_io_handler_hid = false;
+
+ if (process_sp->ProcessIOHandlerIsActive() == false)
+ top_io_handler_hid = HideTopIOHandler();
if (output_stream.GetSize())
{
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index d5758c09b1e..6ce76dc825b 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -131,16 +131,16 @@ namespace lldb {
Module::Module (const ModuleSpec &module_spec) :
m_mutex (Mutex::eMutexTypeRecursive),
- m_mod_time (module_spec.GetFileSpec().GetModificationTime()),
- m_arch (module_spec.GetArchitecture()),
+ m_mod_time (),
+ m_arch (),
m_uuid (),
- m_file (module_spec.GetFileSpec()),
- m_platform_file(module_spec.GetPlatformFileSpec()),
+ m_file (),
+ m_platform_file(),
m_remote_install_file(),
- m_symfile_spec (module_spec.GetSymbolFileSpec()),
- m_object_name (module_spec.GetObjectName()),
- m_object_offset (module_spec.GetObjectOffset()),
- m_object_mod_time (module_spec.GetObjectModificationTime()),
+ m_symfile_spec (),
+ m_object_name (),
+ m_object_offset (),
+ m_object_mod_time (),
m_objfile_sp (),
m_symfile_ap (),
m_ast (),
@@ -163,11 +163,40 @@ Module::Module (const ModuleSpec &module_spec) :
if (log)
log->Printf ("%p Module::Module((%s) '%s%s%s%s')",
this,
- m_arch.GetArchitectureName(),
- m_file.GetPath().c_str(),
- m_object_name.IsEmpty() ? "" : "(",
- m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
- m_object_name.IsEmpty() ? "" : ")");
+ module_spec.GetArchitecture().GetArchitectureName(),
+ module_spec.GetFileSpec().GetPath().c_str(),
+ module_spec.GetObjectName().IsEmpty() ? "" : "(",
+ module_spec.GetObjectName().IsEmpty() ? "" : module_spec.GetObjectName().AsCString(""),
+ module_spec.GetObjectName().IsEmpty() ? "" : ")");
+
+ // First extract all module specifications from the file using the local
+ // file path. If there are no specifications, then don't fill anything in
+ ModuleSpecList modules_specs;
+ if (ObjectFile::GetModuleSpecifications(module_spec.GetFileSpec(), 0, 0, modules_specs) == 0)
+ return;
+
+ // Now make sure that one of the module specifications matches what we just
+ // extract. We might have a module specification that specifies a file "/usr/lib/dyld"
+ // with UUID XXX, but we might have a local version of "/usr/lib/dyld" that has
+ // UUID YYY and we don't want those to match. If they don't match, just don't
+ // fill any ivars in so we don't accidentally grab the wrong file later since
+ // they don't match...
+ ModuleSpec matching_module_spec;
+ if (modules_specs.FindMatchingModuleSpec(module_spec, matching_module_spec) == 0)
+ return;
+ m_mod_time = module_spec.GetFileSpec().GetModificationTime();
+ if (module_spec.GetArchitecture().IsValid())
+ m_arch = module_spec.GetArchitecture();
+ else
+ m_arch = matching_module_spec.GetArchitecture();
+ m_mod_time = module_spec.GetFileSpec().GetModificationTime();
+ m_file = module_spec.GetFileSpec();
+ m_platform_file = module_spec.GetPlatformFileSpec();
+ m_symfile_spec = module_spec.GetSymbolFileSpec();
+ m_object_name = module_spec.GetObjectName();
+ m_object_offset = module_spec.GetObjectOffset();
+ m_object_mod_time = module_spec.GetObjectModificationTime();
+
}
Module::Module(const FileSpec& file_spec,
OpenPOWER on IntegriCloud