Add "target.process.stop-on-shared-library-events" setting, and make it work.
Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint
print that in the brief description if set.  Also print the kind - if set - in the breakpoint
listing.
Give kinds to a bunch of the internal breakpoints.
We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was
a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it.  Fixed that.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index a6bbdcf..699063f 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -100,6 +100,7 @@
     { "ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, breakpoints will be ignored during expression evaluation." },
     { "unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, errors in expression evaluation will unwind the stack back to the state before the call." },
     { "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, NULL, NULL, "A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class." },
+    { "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, stop when a shared library is loaded or unloaded." },
     {  NULL                  , OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL  }
 };
 
@@ -108,7 +109,8 @@
     ePropertyExtraStartCommand,
     ePropertyIgnoreBreakpointsInExpressions,
     ePropertyUnwindOnErrorInExpressions,
-    ePropertyPythonOSPluginPath
+    ePropertyPythonOSPluginPath,
+    ePropertyStopOnSharedLibraryEvents
 };
 
 ProcessProperties::ProcessProperties (bool is_global) :
@@ -119,7 +121,7 @@
         m_collection_sp.reset (new ProcessOptionValueProperties(ConstString("process")));
         m_collection_sp->Initialize(g_properties);
         m_collection_sp->AppendProperty(ConstString("thread"),
-                                        ConstString("Settings specify to threads."),
+                                        ConstString("Settings specific to threads."),
                                         true,
                                         Thread::GetGlobalProperties()->GetValueProperties());
     }
@@ -197,6 +199,20 @@
     m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, ignore);
 }
 
+bool
+ProcessProperties::GetStopOnSharedLibraryEvents () const
+{
+    const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(NULL, idx, g_properties[idx].default_uint_value != 0);
+}
+    
+void
+ProcessProperties::SetStopOnSharedLibraryEvents (bool stop)
+{
+    const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
+    m_collection_sp->SetPropertyAtIndexAsBoolean(NULL, idx, stop);
+}
+
 void
 ProcessInstanceInfo::Dump (Stream &s, Platform *platform) const
 {