void Debugger::requestInterrupt(DebuggerProxyPtr proxy) { const StringData* sid = StringData::GetStaticString(proxy->getSandboxId()); FOREACH_SANDBOX_THREAD_BEGIN(sid, ti) ti->m_reqInjectionData.debuggerIntr = true; FOREACH_SANDBOX_THREAD_END() sid = StringData::GetStaticString(proxy->getDummyInfo().id()); FOREACH_SANDBOX_THREAD_BEGIN(sid, ti) ti->m_reqInjectionData.debuggerIntr = true; FOREACH_SANDBOX_THREAD_END() }
// Ask every thread in this proxy's sandbox and the dummy sandbox to // "stop". Gaining control of these threads is the intention... the // mechanism is to force them all to start interpreting all of their // code in an effort to gain control in phpDebuggerOpcodeHook(). We // set the "debugger interrupt" flag to ensure we interpret code // rather than entering translated code, and we set the "debugger // signal" surprise flag to pop out of loops in translated code. void Debugger::requestInterrupt(DebuggerProxyPtr proxy) { TRACE(2, "Debugger::requestInterrupt\n"); const StringData* sid = makeStaticString(proxy->getSandboxId()); FOREACH_SANDBOX_THREAD_BEGIN(sid, ti) ti->m_reqInjectionData.setDebuggerIntr(true); ti->m_reqInjectionData.setFlag(DebuggerSignalFlag); FOREACH_SANDBOX_THREAD_END() sid = makeStaticString(proxy->getDummyInfo().id()); FOREACH_SANDBOX_THREAD_BEGIN(sid, ti) ti->m_reqInjectionData.setDebuggerIntr(true); ti->m_reqInjectionData.setFlag(DebuggerSignalFlag); FOREACH_SANDBOX_THREAD_END() }
void Debugger::setDebuggerFlag(const StringData* sandboxId, bool flag) { TRACE(2, "Debugger::setDebuggerFlag\n"); FOREACH_SANDBOX_THREAD_BEGIN(sandboxId, ti) ti->m_reqInjectionData.setDebugger(flag); FOREACH_SANDBOX_THREAD_END() }
void Debugger::setDebuggerFlag(const StringData* sandboxId, bool flag) { FOREACH_SANDBOX_THREAD_BEGIN(sandboxId, ti) ti->m_reqInjectionData.debugger = flag; FOREACH_SANDBOX_THREAD_END() }