Add an accessor on SBBreakpointLocation to get its location ID.
authorJim Ingham <jingham@apple.com>
Wed, 16 May 2012 00:51:15 +0000 (00:51 +0000)
committerJim Ingham <jingham@apple.com>
Wed, 16 May 2012 00:51:15 +0000 (00:51 +0000)
llvm-svn: 156891

lldb/include/lldb/API/SBBreakpointLocation.h
lldb/source/API/SBBreakpointLocation.cpp

index 3a67552..3b2ca2c 100644 (file)
@@ -28,6 +28,9 @@ public:
     const lldb::SBBreakpointLocation &
     operator = (const lldb::SBBreakpointLocation &rhs);
 
+    break_id_t
+    GetID ();
+    
     bool
     IsValid() const;
 
index d7fc1dc..a966df9 100644 (file)
@@ -281,6 +281,18 @@ SBBreakpointLocation::GetDescription (SBStream &description, DescriptionLevel le
     return true;
 }
 
+break_id_t
+SBBreakpointLocation::GetID ()
+{
+    if (m_opaque_sp)
+    {
+        Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex());
+        return m_opaque_sp->GetID ();
+    }
+    else
+        return LLDB_INVALID_BREAK_ID;
+}
+
 SBBreakpoint
 SBBreakpointLocation::GetBreakpoint ()
 {