summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdCmdExec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdCmdExec.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmdCmdExec.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/lldb/tools/lldb-mi/MICmdCmdExec.cpp b/lldb/tools/lldb-mi/MICmdCmdExec.cpp
index da58993e02a..eec62c8d37e 100644
--- a/lldb/tools/lldb-mi/MICmdCmdExec.cpp
+++ b/lldb/tools/lldb-mi/MICmdCmdExec.cpp
@@ -91,8 +91,8 @@ CMICmdCmdExecRun::Execute(void)
lldb::SBError error;
lldb::SBStream errMsg;
uint32_t launch_flags = lldb::LaunchFlags::eLaunchFlagDebug;
- lldb::SBProcess process = rSessionInfo.m_lldbTarget.Launch(rSessionInfo.m_rLlldbListener, nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, launch_flags, false, error);
+ lldb::SBProcess process = rSessionInfo.GetTarget().Launch(rSessionInfo.GetListener(), nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, launch_flags, false, error);
if ((!process.IsValid()) || (error.Fail()))
{
@@ -100,9 +100,6 @@ CMICmdCmdExecRun::Execute(void)
return MIstatus::failure;
}
- // Save the process in the session info
- rSessionInfo.m_lldbProcess = process;
-
if (!CMIDriver::Instance().SetDriverStateRunningDebugging())
{
const CMIUtilString &rErrMsg(CMIDriver::Instance().GetErrorDescription());
@@ -137,7 +134,7 @@ CMICmdCmdExecRun::Acknowledge(void)
m_miResultRecord = miRecordResult;
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::pid_t pid = rSessionInfo.m_lldbProcess.GetProcessID();
+ lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
// Give the client '=thread-group-started,id="i1" pid="xyz"'
m_bHasResultRecordExtra = true;
const CMICmnMIValueConst miValueConst2("i1");
@@ -212,7 +209,7 @@ CMICmdCmdExecContinue::Execute(void)
{
const MIchar *pCmd = "continue";
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- const lldb::ReturnStatus rtn = rSessionInfo.m_rLldbDebugger.GetCommandInterpreter().HandleCommand(pCmd, m_lldbResult);
+ const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(pCmd, m_lldbResult);
MIunused(rtn);
if (m_lldbResult.GetErrorSize() == 0)
@@ -356,7 +353,7 @@ CMICmdCmdExecNext::Execute(void)
}
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("thread step-over");
if (nThreadId != UINT64_MAX)
strCmd += CMIUtilString::Format(" %llu", nThreadId);
@@ -483,7 +480,7 @@ CMICmdCmdExecStep::Execute(void)
}
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("thread step-in");
if (nThreadId != UINT64_MAX)
strCmd += CMIUtilString::Format(" %llu", nThreadId);
@@ -610,7 +607,7 @@ CMICmdCmdExecNextInstruction::Execute(void)
}
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("thread step-inst-over");
if (nThreadId != UINT64_MAX)
strCmd += CMIUtilString::Format(" %llu", nThreadId);
@@ -737,7 +734,7 @@ CMICmdCmdExecStepInstruction::Execute(void)
}
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("thread step-inst");
if (nThreadId != UINT64_MAX)
strCmd += CMIUtilString::Format(" %llu", nThreadId);
@@ -865,7 +862,7 @@ CMICmdCmdExecFinish::Execute(void)
}
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("thread step-out");
if (nThreadId != UINT64_MAX)
strCmd += CMIUtilString::Format(" %llu", nThreadId);
@@ -962,7 +959,7 @@ bool
CMICmdCmdExecInterrupt::Execute(void)
{
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
- lldb::SBDebugger &rDebugger = rSessionInfo.m_rLldbDebugger;
+ lldb::SBDebugger &rDebugger = rSessionInfo.GetDebugger();
CMIUtilString strCmd("process interrupt");
const lldb::ReturnStatus status = rDebugger.GetCommandInterpreter().HandleCommand(strCmd.c_str(), m_lldbResult, false);
MIunused(status);
OpenPOWER on IntegriCloud