[Lldb-commits] [lldb] r192322 - Add logging for POSIX DYLD failures
Ed Maste
emaste at freebsd.org
Wed Oct 9 12:57:12 PDT 2013
Author: emaste
Date: Wed Oct 9 14:57:11 2013
New Revision: 192322
URL: http://llvm.org/viewvc/llvm-project?rev=192322&view=rev
Log:
Add logging for POSIX DYLD failures
Modified:
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=192322&r1=192321&r2=192322&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Wed Oct 9 14:57:11 2013
@@ -431,14 +431,30 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentMo
ModuleList module_list;
if (!m_rendezvous.Resolve())
+ {
+ Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
+ if (log)
+ log->Printf("DynamicLoaderPOSIXDYLD::%s unable to resolve POSIX DYLD rendezvous address",
+ __func__);
return;
+ }
for (I = m_rendezvous.begin(), E = m_rendezvous.end(); I != E; ++I)
{
- FileSpec file(I->path.c_str(), false);
+ const char *module_path = I->path.c_str();
+ FileSpec file(module_path, false);
ModuleSP module_sp = LoadModuleAtAddress(file, I->base_addr);
if (module_sp.get())
+ {
module_list.Append(module_sp);
+ }
+ else
+ {
+ Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
+ if (log)
+ log->Printf("DynamicLoaderPOSIXDYLD::%s failed loading module %s at 0x%" PRIx64,
+ __func__, module_path, I->base_addr);
+ }
}
m_process->GetTarget().ModulesDidLoad(module_list);
More information about the lldb-commits
mailing list