[Lldb-commits] [lldb] r166799 - in /lldb/trunk: include/lldb/API/SBProcess.h scripts/Python/interface/SBProcess.i source/API/SBProcess.cpp
Jim Ingham
jingham at apple.com
Fri Oct 26 12:18:04 PDT 2012
Author: jingham
Date: Fri Oct 26 14:18:04 2012
New Revision: 166799
URL: http://llvm.org/viewvc/llvm-project?rev=166799&view=rev
Log:
Add API to get the process plugin name & short name.
Modified:
lldb/trunk/include/lldb/API/SBProcess.h
lldb/trunk/scripts/Python/interface/SBProcess.i
lldb/trunk/source/API/SBProcess.cpp
Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=166799&r1=166798&r2=166799&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Fri Oct 26 14:18:04 2012
@@ -47,6 +47,12 @@
static const char *
GetBroadcasterClassName ();
+ const char *
+ GetPluginName ();
+
+ const char *
+ GetShortPluginName ();
+
void
Clear ();
Modified: lldb/trunk/scripts/Python/interface/SBProcess.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBProcess.i?rev=166799&r1=166798&r2=166799&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBProcess.i (original)
+++ lldb/trunk/scripts/Python/interface/SBProcess.i Fri Oct 26 14:18:04 2012
@@ -55,6 +55,12 @@
static const char *
GetBroadcasterClassName ();
+ const char *
+ GetPluginName ();
+
+ const char *
+ GetShortPluginName ();
+
void
Clear ();
Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=166799&r1=166798&r2=166799&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Fri Oct 26 14:18:04 2012
@@ -81,6 +81,29 @@
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
{
More information about the lldb-commits
mailing list