[lldb/Reproducers] Make SBStream::Print an API instead of a SWIG extension

This makes it possible to instrument the call for the reproducers. This
fixes TestStructuredDataAPI.py with reproducer replay.

Differential revision: https://reviews.llvm.org/D80312
This commit is contained in:
Jonas Devlieghere committed 2020-05-20 10:37:18 -07:00
1 parent b8cbff51d3
commit bfb2783726
3 files changed
+11 -8

No files matched your search

+7
View File
@@ -60,6 +60,12 @@ size_t SBStream::GetSize() {
return static_cast<StreamString *>(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 @@ void RegisterMethods<SBStream>(Registry &R) {
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 *));
}
}