本文整理汇总了C++中StringExtractorGDBRemote::GetHexMaxU32方法的典型用法代码示例。如果您正苦于以下问题:C++ StringExtractorGDBRemote::GetHexMaxU32方法的具体用法?C++ StringExtractorGDBRemote::GetHexMaxU32怎么用?C++ StringExtractorGDBRemote::GetHexMaxU32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringExtractorGDBRemote
的用法示例。
在下文中一共展示了StringExtractorGDBRemote::GetHexMaxU32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendPacketNoLock
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServer::Handle_vFile_Open (StringExtractorGDBRemote &packet)
{
packet.SetFilePos(::strlen("vFile:open:"));
std::string path;
packet.GetHexByteStringTerminatedBy(path,',');
if (!path.empty())
{
if (packet.GetChar() == ',')
{
uint32_t flags = packet.GetHexMaxU32(false, 0);
if (packet.GetChar() == ',')
{
mode_t mode = packet.GetHexMaxU32(false, 0600);
Error error;
int fd = ::open (path.c_str(), flags, mode);
const int save_errno = fd == -1 ? errno : 0;
StreamString response;
response.PutChar('F');
response.Printf("%i", fd);
if (save_errno)
response.Printf(",%i", save_errno);
return SendPacketNoLock(response.GetData(), response.GetSize());
}
}
}
return SendErrorResponse(18);
}
示例2: SendPacketNoLock
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerCommon::Handle_qPlatform_mkdir(
StringExtractorGDBRemote &packet) {
packet.SetFilePos(::strlen("qPlatform_mkdir:"));
mode_t mode = packet.GetHexMaxU32(false, UINT32_MAX);
if (packet.GetChar() == ',') {
std::string path;
packet.GetHexByteString(path);
Error error = FileSystem::MakeDirectory(FileSpec{path, false}, mode);
StreamGDBRemote response;
response.Printf("F%u", error.GetError());
return SendPacketNoLock(response.GetString());
}
return SendErrorResponse(20);
}
示例3: SendPacketNoLock
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerCommon::Handle_qPlatform_chmod (StringExtractorGDBRemote &packet)
{
packet.SetFilePos(::strlen("qPlatform_chmod:"));
mode_t mode = packet.GetHexMaxU32(false, UINT32_MAX);
if (packet.GetChar() == ',')
{
std::string path;
packet.GetHexByteString(path);
Error error = FileSystem::SetFilePermissions(FileSpec{path, true}, mode);
StreamGDBRemote response;
response.Printf("F%u", error.GetError());
return SendPacketNoLock(response.GetData(), response.GetSize());
}
return SendErrorResponse(19);
}