void AddSymbol(Symbol symbol) { Namespace n = CreateNamespace(symbol.Namespace); if (symbol.Demangled.Contains("__thiscall")) { n.IsClass = true; } n.Symbols.Add(symbol); }
private void AddSymbols() { var stringTable = ObjectFileMember.ObjectFile.StringTable; var symbols = ObjectFileMember.ObjectFile.Symbols; for (int i = 0; i < symbols.Length; ++i) { var symbol = symbols[i]; IMAGE_SYMBOL[] auxSymbols = null; if (symbol.NumberOfAuxSymbols > 0) { auxSymbols = new IMAGE_SYMBOL[symbol.NumberOfAuxSymbols]; for (int a = 0; a < auxSymbols.Length; ++a) { auxSymbols[a] = symbols[i + 1 + a]; } } var model = new Symbol(symbol, auxSymbols, stringTable); _symbols.Add(model); i += symbol.NumberOfAuxSymbols; } }
bool IsLanguageSymbol(Symbol symbol) { string[] languageSymbolParts = { "`RTTI Complete Object Locator'", "`vftable'", "`RTTI Class Hierarchy Descriptor'", "`RTTI Base Class Array'", "`RTTI Base Class Descriptor at", "`RTTI Type Descriptor'", "`scalar deleting destructor'", "`vector deleting destructor'", "`string'", }; foreach (var s in languageSymbolParts) { if (symbol.Demangled.Contains(s)) return true; } return false; }