From 8087ca21605a2edcb16cfbded03db8813ea84ef4 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 8 Oct 2010 04:20:14 +0000 Subject: 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 --- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp') diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 5b66ef87b08..4d7ce7fa6f4 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -647,6 +647,8 @@ ObjectFileELF::GetSymtab() Symtab *symbol_table = new Symtab(this); m_symtab_ap.reset(symbol_table); + Mutex::Locker locker (symbol_table->GetMutex ()); + if (!(ParseSectionHeaders() && GetSectionHeaderStringTable())) return symbol_table; @@ -658,7 +660,7 @@ ObjectFileELF::GetSymtab() { const ELFSectionHeader &symtab_section = *I; user_id_t section_id = SectionIndex(I); - ParseSymbolTable(symbol_table, symtab_section, section_id); + ParseSymbolTable (symbol_table, symtab_section, section_id); } } @@ -685,7 +687,7 @@ ObjectFileELF::Dump(Stream *s) section_list->Dump(s, NULL, true); Symtab *symtab = GetSymtab(); if (symtab) - symtab->Dump(s, NULL); + symtab->Dump(s, NULL, lldb::eSortOrderNone); s->EOL(); DumpDependentModules(s); s->EOL(); -- cgit v1.2.3