summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index d829123401e..aca9a973f95 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -13,6 +13,7 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "lldb/Core/Log.h"
#include "lldb/Core/Module.h"
#include "lldb/Host/Symbols.h"
#include "lldb/Symbol/ObjectFile.h"
@@ -374,6 +375,29 @@ ModuleList::Dump(Stream *s) const
}
}
+void
+ModuleList::LogUUIDAndPaths (LogSP &log_sp, const char *prefix_cstr)
+{
+ if (log_sp)
+ {
+ Mutex::Locker locker(m_modules_mutex);
+ char uuid_cstr[256];
+ collection::const_iterator pos, begin = m_modules.begin(), end = m_modules.end();
+ for (pos = begin; pos != end; ++pos)
+ {
+ Module *module = pos->get();
+ module->GetUUID().GetAsCString (uuid_cstr, sizeof(uuid_cstr));
+ const FileSpec &module_file_spec = module->GetFileSpec();
+ log_sp->Printf ("%s[%u] %s (%s) \"%s/%s\"",
+ prefix_cstr ? prefix_cstr : "",
+ (uint32_t)std::distance (begin, pos),
+ uuid_cstr,
+ module->GetArchitecture().AsCString(),
+ module_file_spec.GetDirectory().GetCString(),
+ module_file_spec.GetFilename().GetCString());
+ }
+ }
+}
bool
ModuleList::ResolveFileAddress (lldb::addr_t vm_addr, Address& so_addr)
OpenPOWER on IntegriCloud