summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-05-08 23:06:07 +0000
committerJim Ingham <jingham@apple.com>2012-05-08 23:06:07 +0000
commit8499e1a4cb1b8d3c1229f51e0d604f03c0285037 (patch)
treeda9507b0b85898aaae3bd4e0cf330eb4dc317899 /lldb/source/API
parent3d6311d5f7e5078df992c5167b53a586cfb7213a (diff)
downloadbcm5719-llvm-8499e1a4cb1b8d3c1229f51e0d604f03c0285037.tar.gz
bcm5719-llvm-8499e1a4cb1b8d3c1229f51e0d604f03c0285037.zip
Print out a notification when the process of a target other than the currently selected target stops.
llvm-svn: 156433
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBDebugger.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index be5190d8932..ce85544dce4 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -678,6 +678,20 @@ SBDebugger::GetTargetAtIndex (uint32_t idx)
return sb_target;
}
+uint32_t
+SBDebugger::GetIndexOfTarget (lldb::SBTarget target)
+{
+
+ lldb::TargetSP target_sp = target.GetSP();
+ if (!target_sp)
+ return UINT32_MAX;
+
+ if (!m_opaque_sp)
+ return UINT32_MAX;
+
+ return m_opaque_sp->GetTargetList().GetIndexOfTarget (target.GetSP());
+}
+
SBTarget
SBDebugger::FindTargetWithProcessID (pid_t pid)
{
OpenPOWER on IntegriCloud