summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/TargetList.cpp
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/Target/TargetList.cpp
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/Target/TargetList.cpp')
-rw-r--r--lldb/source/Target/TargetList.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp
index 3ec4b08c190..3aaa77925e2 100644
--- a/lldb/source/Target/TargetList.cpp
+++ b/lldb/source/Target/TargetList.cpp
@@ -421,6 +421,19 @@ TargetList::GetTargetAtIndex (uint32_t idx) const
}
uint32_t
+TargetList::GetIndexOfTarget (lldb::TargetSP target_sp) const
+{
+ Mutex::Locker locker (m_target_list_mutex);
+ size_t num_targets = m_target_list.size();
+ for (size_t idx = 0; idx < num_targets; idx++)
+ {
+ if (target_sp == m_target_list[idx])
+ return idx;
+ }
+ return UINT32_MAX;
+}
+
+uint32_t
TargetList::SetSelectedTarget (Target* target)
{
Mutex::Locker locker (m_target_list_mutex);
OpenPOWER on IntegriCloud