Add API to get the process plugin name & short name.
authorJim Ingham <jingham@apple.com>
Fri, 26 Oct 2012 19:18:04 +0000 (19:18 +0000)
committerJim Ingham <jingham@apple.com>
Fri, 26 Oct 2012 19:18:04 +0000 (19:18 +0000)
llvm-svn: 166799

lldb/include/lldb/API/SBProcess.h
lldb/scripts/Python/interface/SBProcess.i
lldb/source/API/SBProcess.cpp

index c696091..fdd65e4 100644 (file)
@@ -47,6 +47,12 @@ public:
     static const char *
     GetBroadcasterClassName ();
     
+    const char *
+    GetPluginName ();
+    
+    const char *
+    GetShortPluginName ();
+    
     void
     Clear ();
 
index c62caa3..2c48692 100644 (file)
@@ -55,6 +55,12 @@ public:
     static const char *
     GetBroadcasterClassName ();
 
+    const char *
+    GetPluginName ();
+    
+    const char *
+    GetShortPluginName ();
+    
     void
     Clear ();
 
index e107874..933117a 100644 (file)
@@ -81,6 +81,29 @@ SBProcess::GetBroadcasterClassName ()
     return Process::GetStaticBroadcasterClass().AsCString();
 }
 
+const char *
+SBProcess::GetPluginName ()
+{
+    ProcessSP process_sp(GetSP());
+    if (process_sp)
+    {
+        return process_sp->GetPluginName();
+    }
+    return "<Unknown>";
+}
+
+const char *
+SBProcess::GetShortPluginName ()
+{
+    ProcessSP process_sp(GetSP());
+    if (process_sp)
+    {
+        return process_sp->GetShortPluginName();
+    }
+    return "<Unknown>";
+}
+
+
 lldb::ProcessSP
 SBProcess::GetSP() const
 {