本文整理汇总了C++中DebuggerClient::internalTestingIsClientStopped方法的典型用法代码示例。如果您正苦于以下问题:C++ DebuggerClient::internalTestingIsClientStopped方法的具体用法?C++ DebuggerClient::internalTestingIsClientStopped怎么用?C++ DebuggerClient::internalTestingIsClientStopped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DebuggerClient
的用法示例。
在下文中一共展示了DebuggerClient::internalTestingIsClientStopped方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClientImpl
void CmdInternalTesting::onClientImpl(DebuggerClient &client) {
TRACE(2, "CmdInternalTesting::onClientImpl\n");
if (DebuggerCommand::displayedHelp(client)) return;
if (client.argCount() == 0) {
help(client);
return;
}
client.info("Executing internal test...");
m_arg = client.argValue(1);
if (client.arg(1, "badcmdtypesend")) {
// Give the cmd a bad type and send it over. This should cause the proxy to
// disconnect from us.
m_type = KindOfInternalTestingBad;
client.sendToServer(this);
// Spin here and wait for the client to be marked as stopped
// before going back to the event loop. This will give the local
// proxy time to recgonize the bad cmd, terminate, and wait for
// the client to stop. This will ensure that we always exit on the
// same path on both proxy and client threads, and remove any
// spurious output form ths test case.
while (!client.internalTestingIsClientStopped()) {
sleep(1);
}
throw DebuggerConsoleExitException(); // Expect no response
} else if (client.arg(1, "badcmdtypereceive")) {
client.xend<CmdInternalTesting>(this);
return;
} else if (client.arg(1, "shortcmdsend")) {
m_arg = "shortcmd"; // Force send to drop a field.
client.sendToServer(this);
// See note above about this wait.
while (!client.internalTestingIsClientStopped()) {
sleep(1);
}
throw DebuggerConsoleExitException(); // Expect no response
} else if (client.arg(1, "shortcmdreceive")) {
client.xend<CmdInternalTesting>(this);
return;
} else if (client.arg(1, "segfaultClient")) {
int *px = nullptr;
*px = 42;
} else if (client.arg(1, "segfaultServer")) {
client.xend<CmdInternalTesting>(this);
return;
}
help(client);
}