Added mutex protection to the Symtab class.
Added a new SortOrder enumeration and hooked it up to the "image dump symtab"
command so we can dump symbol tables in the original order, sorted by address,
or sorted by name.
llvm-svn: 116049
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 666fde4..a4141c0 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -206,6 +206,7 @@
if (m_symtab_ap.get() == NULL)
{
m_symtab_ap.reset(new Symtab(this));
+ Mutex::Locker locker (m_symtab_ap->GetMutex());
ParseSymtab (true);
}
return m_symtab_ap.get();
@@ -1348,7 +1349,7 @@
m_sections_ap->Dump(s, NULL, true);
if (m_symtab_ap.get())
- m_symtab_ap->Dump(s, NULL);
+ m_symtab_ap->Dump(s, NULL, eSortOrderNone);
}