[Lldb-commits] [PATCH] D48775: Add new SBTarget::IsDummy method.
Alexander Polyakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 29 10:11:43 PDT 2018
apolyakov updated this revision to Diff 153516.
apolyakov edited the summary of this revision.
apolyakov added a comment.
Added description to source files and commit message.
https://reviews.llvm.org/D48775
Files:
include/lldb/API/SBTarget.h
scripts/interface/SBTarget.i
source/API/SBTarget.cpp
Index: source/API/SBTarget.cpp
===================================================================
--- source/API/SBTarget.cpp
+++ source/API/SBTarget.cpp
@@ -146,6 +146,10 @@
return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid();
}
+bool SBTarget::IsDummy() const {
+ return *this == GetDebugger().GetDummyTarget();
+}
+
SBProcess SBTarget::GetProcess() {
SBProcess sb_process;
ProcessSP process_sp;
Index: scripts/interface/SBTarget.i
===================================================================
--- scripts/interface/SBTarget.i
+++ scripts/interface/SBTarget.i
@@ -81,6 +81,11 @@
bool
IsValid() const;
+ %feature("docstring",
+ "Returns true if *this target is a dummy one, false otherwise.") IsDummy;
+ bool
+ IsDummy () const;
+
static bool
EventIsTargetEvent (const lldb::SBEvent &event);
Index: include/lldb/API/SBTarget.h
===================================================================
--- include/lldb/API/SBTarget.h
+++ include/lldb/API/SBTarget.h
@@ -62,6 +62,9 @@
bool IsValid() const;
+ // Returns true if *this target is a dummy one, false otherwise.
+ bool IsDummy() const;
+
static bool EventIsTargetEvent(const lldb::SBEvent &event);
static lldb::SBTarget GetTargetFromEvent(const lldb::SBEvent &event);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48775.153516.patch
Type: text/x-patch
Size: 1304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180629/fee034f3/attachment-0001.bin>
More information about the lldb-commits
mailing list