-
%extend lldb::SBAddress {
%nothreadallow;
PyObject *lldb::SBAddress::__str__ (){
}
%extend lldb::SBTarget {
- %nothreadallow;
- PyObject *lldb::SBTarget::__str__ (){
- lldb::SBStream description;
- $self->GetDescription (description, lldb::eDescriptionLevelBrief);
- const char *desc = description.GetData();
- size_t desc_len = description.GetSize();
- if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
- --desc_len;
- return PythonString(llvm::StringRef(desc, desc_len)).release();
- }
- %clearnothreadallow;
-
%pythoncode %{
def __eq__(self, rhs):
if not isinstance(rhs, type(self)):
namespace lldb {
-
%feature("docstring",
"Represents the target program running under the debugger.
lldb::SBValue
EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options);
+ %extend {
+ %nothreadallow;
+ std::string lldb::SBTarget::__str__(){
+ lldb::SBStream stream;
+ $self->GetDescription (stream, lldb::eDescriptionLevelBrief);
+
+ const char *desc = stream.GetData();
+ size_t desc_len = stream.GetSize();
+ if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
+ --desc_len;
+
+ return std::string(desc, desc_len);
+ }
+ %clearnothreadallow;
+ }
+
#ifdef SWIGPYTHON
%pythoncode %{
class modules_access(object):
yield elem(i)
%}
+%include <std_string.i>
%include "./Python/python-typemaps.swig"
%include "./headers.swig"
%module lldb
+%include <std_string.i>
%include "./headers.swig"
%{