Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.
They will now be represented as:
eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true
eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true
eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false
This simplifies the logic when dealing with symbols and allows for symbols
to be coalesced into a single symbol most of the time.
Enabled the minimal symbol table for mach-o again after working out all the
kinks. We now get nice concise symbol tables and debugging with DWARF in the
.o files with a debug map in the binary works well again. There were issues
where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and
symbol indexes interchangeably. Now that all those issues are resolved
debugging is working nicely.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113678 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index e7af0bd..91e4cd4 100644
--- a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -90,14 +90,14 @@
{
abilities |= CompileUnits;
}
- symtab->AppendSymbolIndexesWithType(eSymbolTypeFunction, m_func_indexes);
+ symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, Symtab::eDebugYes, Symtab::eVisibilityAny, m_func_indexes);
if (!m_func_indexes.empty())
{
symtab->SortSymbolIndexesByValue(m_func_indexes, true);
abilities |= Functions;
}
- symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, m_code_indexes);
+ symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, Symtab::eDebugNo, Symtab::eVisibilityAny, m_code_indexes);
if (!m_code_indexes.empty())
{
symtab->SortSymbolIndexesByValue(m_code_indexes, true);
@@ -319,8 +319,7 @@
{
const uint32_t start_size = sc_list.GetSize();
std::vector<uint32_t> symbol_indexes;
- symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeFunction, symbol_indexes);
- symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeCode, symbol_indexes);
+ symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
const uint32_t num_matches = symbol_indexes.size();
if (num_matches)
{