Grab the address of the breakpoint site for the StopInfoBreakpoint so if
it gets deleted before GetDescription is called we still at least know
where it was.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143175 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StopInfo.cpp b/source/Target/StopInfo.cpp
index c422a1d..cfd340a 100644
--- a/source/Target/StopInfo.cpp
+++ b/source/Target/StopInfo.cpp
@@ -72,8 +72,14 @@
         m_description(),
         m_should_stop (false),
         m_should_stop_is_valid (false),
-        m_should_perform_action (true)
+        m_should_perform_action (true),
+        m_address (LLDB_INVALID_ADDRESS)
     {
+        BreakpointSiteSP bp_site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (m_value));
+        if (bp_site_sp)
+        {
+          m_address = bp_site_sp->GetLoadAddress();
+        }
     }
     
     StopInfoBreakpoint (Thread &thread, break_id_t break_id, bool should_stop) :
@@ -81,8 +87,14 @@
         m_description(),
         m_should_stop (should_stop),
         m_should_stop_is_valid (true),
-        m_should_perform_action (true)
+        m_should_perform_action (true),
+        m_address (LLDB_INVALID_ADDRESS)
     {
+        BreakpointSiteSP bp_site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (m_value));
+        if (bp_site_sp)
+        {
+          m_address = bp_site_sp->GetLoadAddress();
+        }
     }
 
     virtual ~StopInfoBreakpoint ()
@@ -300,7 +312,10 @@
             else
             {
                 StreamString strm;
-                strm.Printf("breakpoint site %lli", m_value);
+                if (m_address == LLDB_INVALID_ADDRESS)
+                    strm.Printf("breakpoint site %lli which has been deleted - unknown address", m_value);
+                else
+                    strm.Printf("breakpoint site %lli which has been deleted - was at 0x%llx", m_value, m_address);
                 m_description.swap (strm.GetString());
             }
         }
@@ -313,6 +328,9 @@
     bool m_should_stop_is_valid;
     bool m_should_perform_action; // Since we are trying to preserve the "state" of the system even if we run functions
                                   // etc. behind the users backs, we need to make sure we only REALLY perform the action once.
+    lldb::addr_t m_address;       // We use this to capture the breakpoint site address when we create the StopInfo,
+                                  // in case somebody deletes it between the time the StopInfo is made and the
+                                  // description is asked for.
 };