本文整理汇总了C++中StringExtractorGDBRemote::GetHexU8方法的典型用法代码示例。如果您正苦于以下问题:C++ StringExtractorGDBRemote::GetHexU8方法的具体用法?C++ StringExtractorGDBRemote::GetHexU8怎么用?C++ StringExtractorGDBRemote::GetHexU8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringExtractorGDBRemote
的用法示例。
在下文中一共展示了StringExtractorGDBRemote::GetHexU8方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShouldStop
bool GDBRemoteClientBase::ShouldStop(const UnixSignals &signals,
StringExtractorGDBRemote &response) {
std::lock_guard<std::mutex> lock(m_mutex);
if (m_async_count == 0)
return true; // We were not interrupted. The process stopped on its own.
// Older debugserver stubs (before April 2016) can return two
// stop-reply packets in response to a ^C packet.
// Additionally, all debugservers still return two stop replies if
// the inferior stops due to some other reason before the remote
// stub manages to interrupt it. We need to wait for this
// additional packet to make sure the packet sequence does not get
// skewed.
StringExtractorGDBRemote extra_stop_reply_packet;
ReadPacket(extra_stop_reply_packet, milliseconds(100), false);
// Interrupting is typically done using SIGSTOP or SIGINT, so if
// the process stops with some other signal, we definitely want to
// stop.
const uint8_t signo = response.GetHexU8(UINT8_MAX);
if (signo != signals.GetSignalNumberFromName("SIGSTOP") &&
signo != signals.GetSignalNumberFromName("SIGINT"))
return true;
// We probably only stopped to perform some async processing, so continue
// after that is done.
// TODO: This is not 100% correct, as the process may have been stopped with
// SIGINT or SIGSTOP that was not caused by us (e.g. raise(SIGINT)). This will
// normally cause a stop, but if it's done concurrently with a async
// interrupt, that stop will get eaten (llvm.org/pr20231).
return false;
}