在模拟器上测试我的应用程序时收到以下消息:



这是什么意思,我的应用程序有任何危险吗?

使用Xcode 6.4和7.2

最佳答案

如果查看llvm源代码中的文件ProcessGDBRemote.cpp,您会看到在Xcode调试器进程出现意外响应时发生这种情况,在这种情况下,如果数据包不是'W''X'字符,则为:

Error
ProcessGDBRemote::DoDestroy ()
{

    // ...

    if (m_gdb_comm.SendPacketAndWaitForResponse("k", 1, response, send_async) == GDBRemoteCommunication::PacketResult::Success)
    {
        char packet_cmd = response.GetChar(0);

        if (packet_cmd == 'W' || packet_cmd == 'X')
        {
            // ...
        }
        else
        {
            if (log)
            log->Printf ("ProcessGDBRemote::DoDestroy - got unexpected response to k packet: %s", response.GetStringRef().c_str());
            exit_string.assign("got unexpected response to k packet: ");
            exit_string.append(response.GetStringRef());
    }

    // ...

    SetExitStatus(exit_status, exit_string.c_str());

    StopAsyncThread ();
    KillDebugserverProcess ();
    return error;
}

在这种情况下,调试器将发送字符串"OK"而不是"W""X"。您无能为力,Xcode的幕后存在一个问题。我发现,在重新连接到调试 session 之前,先终止Xcode的调试过程,重新启动Xcode并重新启动计算机,可以解决此问题。

要了解有关OS X上 native 进程的更多信息,请在嵌套的if语句中 check out 注释:



关于为什么会发生此错误的有用评论:

关于ios - Xcode “Message from debugger: got unexpected response to k packet: OK”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31867450/

10-09 06:29
查看更多