Add -exec-arguments command
Summary:
This patch adds -exec-arguments command for lldb-mi. -exec-arguments command allows to specify arguments for executable file in MI mode. Also it contains tests for that command.
Btw, new added files was formatted by clang-format.
Reviewers: abidh, zturner, clayborg
Reviewed By: clayborg
Subscribers: zturner, emaste, clayborg, jingham, lldb-commits
Differential Revision: http://reviews.llvm.org/D6965
llvm-svn: 229110
diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp
index 007451e..681f5fe 100644
--- a/lldb/source/API/SBLaunchInfo.cpp
+++ b/lldb/source/API/SBLaunchInfo.cpp
@@ -36,6 +36,12 @@
return *m_opaque_sp;
}
+const lldb_private::ProcessLaunchInfo &
+SBLaunchInfo::ref () const
+{
+ return *m_opaque_sp;
+}
+
lldb::pid_t
SBLaunchInfo::GetProcessID()
{
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index a6d7f0e..f7b2dbe 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -2568,3 +2568,21 @@
}
return 0;
}
+
+lldb::SBLaunchInfo
+SBTarget::GetLaunchInfo () const
+{
+ lldb::SBLaunchInfo launch_info(NULL);
+ TargetSP target_sp(GetSP());
+ if (target_sp)
+ launch_info.ref() = m_opaque_sp->GetProcessLaunchInfo();
+ return launch_info;
+}
+
+void
+SBTarget::SetLaunchInfo (const lldb::SBLaunchInfo &launch_info)
+{
+ TargetSP target_sp(GetSP());
+ if (target_sp)
+ m_opaque_sp->SetProcessLaunchInfo(launch_info.ref());
+}