MCPcopy Create free account
hub / github.com/TASEmulators/fceux / updateSymbol

Method updateSymbol

src/debugsymboltable.cpp:193–226  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

191}
192//--------------------------------------------------------------
193int debugSymbolPage_t::updateSymbol(debugSymbol_t *sym)
194{
195 auto itName = symNameMap.begin();
196
197 while (itName != symNameMap.end())
198 {
199 if (itName->second == sym)
200 {
201 if (sym->name().size() == 0 || sym->name().compare( itName->first ) )
202 {
203 //printf("Changing Name: %s %s\n", itName->first.c_str(), sym->name().c_str() );
204 itName = symNameMap.erase(itName);
205 }
206 break;
207 }
208 else
209 {
210 itName++;
211 }
212 }
213 if (sym->name().size() > 0)
214 {
215 symNameMap[ sym->name() ] = sym;
216 }
217
218 // Sanity Check
219 auto it = symMap.find( sym->offset() );
220
221 if ( it == symMap.end() )
222 { // This shouldn't happen
223 return -1;
224 }
225 return 0;
226}
227//--------------------------------------------------------------
228int debugSymbolPage_t::save(void)
229{

Callers 1

updateNameMethod · 0.80

Calls 5

compareMethod · 0.80
offsetMethod · 0.80
beginMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected