@param iTable_ Which symbol table the symbol is in if any. If none will be NUM_SYMBOL_TABLES ===========================================================================
| 138 | // @param iTable_ Which symbol table the symbol is in if any. If none will be NUM_SYMBOL_TABLES |
| 139 | //=========================================================================== |
| 140 | std::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 | //=========================================================================== |
| 171 | bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable_ ) |
no outgoing calls
no test coverage detected