MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / FindSymbolFromAddress

Function FindSymbolFromAddress

source/Debugger/Debugger_Symbols.cpp:140–168  ·  view source on GitHub ↗

@param iTable_ Which symbol table the symbol is in if any. If none will be NUM_SYMBOL_TABLES ===========================================================================

Source from the content-addressed store, hash-verified

138// @param iTable_ Which symbol table the symbol is in if any. If none will be NUM_SYMBOL_TABLES
139//===========================================================================
140std::string const* FindSymbolFromAddress (WORD nAddress, int * iTable_ )
141{
142 // Bugfix/User feature: User symbols should be searched first
143 int iTable = NUM_SYMBOL_TABLES;
144 if (iTable_)
145 {
146 *iTable_ = iTable;
147 }
148
149 while (iTable-- > 0)
150 {
151 if (! g_aSymbols[iTable].size())
152 continue;
153
154 if (! (g_bDisplaySymbolTables & (1 << iTable)))
155 continue;
156
157 std::map<WORD, std::string>::iterator iSymbols = g_aSymbols[iTable].find(nAddress);
158 if (g_aSymbols[iTable].find(nAddress) != g_aSymbols[iTable].end())
159 {
160 if (iTable_)
161 {
162 *iTable_ = iTable;
163 }
164 return &iSymbols->second;
165 }
166 }
167 return NULL;
168}
169
170//===========================================================================
171bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable_ )

Callers 6

DrawDisassemblyLineFunction · 0.85
GetDisassemblyLineFunction · 0.85
ParseSymbolTableFunction · 0.85
SymbolUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected