Index: lldb/bindings/interface/SBStream.i =================================================================== --- lldb/bindings/interface/SBStream.i +++ lldb/bindings/interface/SBStream.i @@ -62,14 +62,8 @@ size_t GetSize(); - // wrapping the variadic Printf() with a plain Print() - // because it is hard to support varargs in SWIG bridgings - %extend { - void Print (const char* str) - { - self->Printf("%s", str); - } - } + void + Print (const char* str); void RedirectToFile (const char *path, bool append); Index: lldb/include/lldb/API/SBStream.h =================================================================== --- lldb/include/lldb/API/SBStream.h +++ lldb/include/lldb/API/SBStream.h @@ -37,6 +37,8 @@ void Printf(const char *format, ...) __attribute__((format(printf, 2, 3))); + void Print(const char *str); + void RedirectToFile(const char *path, bool append); void RedirectToFile(lldb::SBFile file); Index: lldb/source/API/SBStream.cpp =================================================================== --- lldb/source/API/SBStream.cpp +++ lldb/source/API/SBStream.cpp @@ -60,6 +60,12 @@ return static_cast(m_opaque_up.get())->GetSize(); } +void SBStream::Print(const char *str) { + LLDB_RECORD_METHOD(void, SBStream, Print, (const char *), str); + + Printf("%s", str); +} + void SBStream::Printf(const char *format, ...) { if (!format) return; @@ -204,6 +210,7 @@ LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool)); LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileDescriptor, (int, bool)); LLDB_REGISTER_METHOD(void, SBStream, Clear, ()); + LLDB_REGISTER_METHOD(void, SBStream, Print, (const char *)); } }