MCPcopy Create free account
hub / github.com/Norbyte/bg3se / CollectSymbols

Method CollectSymbols

SymbolTableGenerator/SymbolTableGenerator.cpp:92–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 void CollectSymbols()
93 {
94 CComPtr<IDiaSymbol> pglobal;
95 if (FAILED(session_->get_globalScope(&pglobal)))
96 {
97 std::cout << "get_globalScope failed" << std::endl;
98 return;
99 }
100
101 CollectSymbols(pglobal);
102
103 std::sort(symbols_.begin(), symbols_.end(), [](Symbol const& a, Symbol const& b) {
104 return a.rva < b.rva;
105 });
106
107 uint64_t lastVa{ 0 };
108 for (auto const& sym : symbols_) {
109 if (sym.rva > lastVa) {
110 lastVa = sym.rva;
111 filteredSymbols_.push_back(sym);
112 }
113 }
114 }
115
116 static void TrimOccurrences(std::string& s, std::string_view f)
117 {

Callers 1

mainFunction · 0.80

Calls 4

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected