aboutsummaryrefslogtreecommitdiff
path: root/source/API/SBFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/API/SBFunction.cpp')
-rw-r--r--source/API/SBFunction.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/API/SBFunction.cpp b/source/API/SBFunction.cpp
index c4beff1a1..210340ef2 100644
--- a/source/API/SBFunction.cpp
+++ b/source/API/SBFunction.cpp
@@ -9,6 +9,7 @@
#include "lldb/API/SBFunction.h"
#include "lldb/API/SBProcess.h"
+#include "lldb/API/SBStream.h"
#include "lldb/Symbol/Function.h"
using namespace lldb;
@@ -62,3 +63,25 @@ SBFunction::operator != (const SBFunction &rhs) const
{
return m_opaque_ptr != rhs.m_opaque_ptr;
}
+
+bool
+SBFunction::GetDescription (SBStream &description)
+{
+ if (m_opaque_ptr)
+ {
+ m_opaque_ptr->Dump (description.get(), false);
+ }
+ else
+ description.Printf ("No value");
+
+ return true;
+}
+
+PyObject *
+SBFunction::__repr__ ()
+{
+ SBStream description;
+ description.ref();
+ GetDescription (description);
+ return PyString_FromString (description.GetData());
+}