MCPcopy Create free account
hub / github.com/Vector35/debugger / ProcessOneVariable

Method ProcessOneVariable

core/debuggercontroller.cpp:1454–1480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452
1453
1454void DebuggerController::ProcessOneVariable(uint64_t varAddress, Confidence<Ref<Type>> type, const std::string& name)
1455{
1456 StackVariableNameAndType varNameAndType(type, name);
1457 auto iter = m_debuggerVariables.find(varAddress);
1458 if ((iter == m_debuggerVariables.end()) || (iter->second != varNameAndType))
1459 {
1460 // The variable is not yet defined, or has changed. Define it.
1461 // Should we use DataVariable, or UserDataVariable?
1462 m_liveView->DefineDataVariable(varAddress, type);
1463 if (!name.empty())
1464 {
1465 SymbolRef sym = new Symbol(DataSymbol, name, name, name, varAddress);
1466 m_liveView->DefineUserSymbol(sym);
1467 }
1468 m_debuggerVariables[varAddress] = varNameAndType;
1469 }
1470
1471 m_addressesWithVariable.insert(varAddress);
1472
1473 // If there is still a data variable at varAddress, we remove it from the oldAddresses set.
1474 // After we process all data variables, values in the set oldAddresses means where there was a data var,
1475 // but there no longer should be one. Later we iterate over it and remove all data vars and symbols at
1476 // these addresses.
1477 auto iter2 = m_oldAddresses.find(varAddress);
1478 if (iter2 != m_oldAddresses.end())
1479 m_oldAddresses.erase(iter2);
1480}
1481
1482
1483void DebuggerController::DefineVariablesRecursive(uint64_t address, Confidence<Ref<Type>> type)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected