MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / GetLocalVars

Method GetLocalVars

source/Debugger.cpp:2738–2767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2736
2737
2738void DbgStack::GetLocalVars(int aDepth, VarList *&aVars, VarList *&aStaticVars, VarBkp *&aBkp, VarBkp *&aBkpEnd)
2739{
2740 DbgStack::Entry *se = mTop - aDepth;
2741 for (;;)
2742 {
2743 if (se <= mBottom)
2744 return;
2745 if (se->type == DbgStack::SE_UDF)
2746 break;
2747 --se;
2748 }
2749 auto &func = *se->udf->func;
2750 aStaticVars = &func.mStaticVars;
2751 if (func.mInstances > 1 && aDepth > 0)
2752 {
2753 while (++se <= mTop)
2754 {
2755 if (se->type == DbgStack::SE_UDF && se->udf->func == &func)
2756 {
2757 // This instance interrupted the target instance, so its backup
2758 // contains the values of the target instance's local variables.
2759 aBkp = se->udf->backup;
2760 aBkpEnd = aBkp + se->udf->backup_count;
2761 return;
2762 }
2763 }
2764 }
2765 // Since above did not return, this instance wasn't interrupted.
2766 aVars = &func.mVars;
2767}
2768
2769
2770void Debugger::PropertyWriter::WriteProperty(LPCSTR aName, ExprTokenType &aValue)

Callers 2

DEBUGGER_COMMANDFunction · 0.80
ParsePropertyNameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected