本文整理汇总了C++中LLDBCommand::GetProcessID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDBCommand::GetProcessID方法的具体用法?C++ LLDBCommand::GetProcessID怎么用?C++ LLDBCommand::GetProcessID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDBCommand
的用法示例。
在下文中一共展示了LLDBCommand::GetProcessID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AttachProcess
void CodeLiteLLDBApp::AttachProcess(const LLDBCommand& command)
{
wxPrintf("codeite-lldb: attaching to process with PID %d\n", command.GetProcessID());
if(!InitializeLLDB(command)) {
return;
}
lldb::SBError errorCode;
lldb::SBListener listener;
lldb::SBProcess process = m_target.AttachToProcessWithID(listener, (lldb::pid_t)command.GetProcessID(), errorCode);
if(!errorCode.Success()) {
wxPrintf("codeite-lldb: error attaching process %d. '%s'\n", command.GetProcessID(), errorCode.GetCString());
NotifyExited();
return;
}
wxPrintf("codeite-lldb: process attached successfully\n");
// Launch the thread that will handle the LLDB process events
m_lldbProcessEventThread =
new LLDBProcessEventHandlerThread(this, m_debugger, m_target.GetProcess(), kDebugSessionTypeAttach);
m_lldbProcessEventThread->Start();
// In any case, reset the interrupt reason
m_interruptReason = kInterruptReasonNone;
// Notify codelite that the debugger started successfully
NotifyStarted(kDebugSessionTypeAttach);
}