[Reproducers] Add SBReproducer macros
This patch adds the SBReproducer macros needed to capture and reply the
corresponding calls. This patch was generated by running the lldb-instr
tool on the API source files.
Differential revision: https://reviews.llvm.org/D57475
llvm-svn: 355459
diff --git a/lldb/source/API/SBSourceManager.cpp b/lldb/source/API/SBSourceManager.cpp
index 85eba4f..78817d1 100644
--- a/lldb/source/API/SBSourceManager.cpp
+++ b/lldb/source/API/SBSourceManager.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSourceManager.h"
+#include "SBReproducerPrivate.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBTarget.h"
@@ -71,14 +72,22 @@
using namespace lldb_private;
SBSourceManager::SBSourceManager(const SBDebugger &debugger) {
+ LLDB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBDebugger &),
+ debugger);
+
m_opaque_up.reset(new SourceManagerImpl(debugger.get_sp()));
}
SBSourceManager::SBSourceManager(const SBTarget &target) {
+ LLDB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBTarget &), target);
+
m_opaque_up.reset(new SourceManagerImpl(target.GetSP()));
}
SBSourceManager::SBSourceManager(const SBSourceManager &rhs) {
+ LLDB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBSourceManager &),
+ rhs);
+
if (&rhs == this)
return;
@@ -87,6 +96,10 @@
const lldb::SBSourceManager &SBSourceManager::
operator=(const lldb::SBSourceManager &rhs) {
+ LLDB_RECORD_METHOD(const lldb::SBSourceManager &,
+ SBSourceManager, operator=,(const lldb::SBSourceManager &),
+ rhs);
+
m_opaque_up.reset(new SourceManagerImpl(*(rhs.m_opaque_up.get())));
return *this;
}
@@ -96,6 +109,12 @@
size_t SBSourceManager::DisplaySourceLinesWithLineNumbers(
const SBFileSpec &file, uint32_t line, uint32_t context_before,
uint32_t context_after, const char *current_line_cstr, SBStream &s) {
+ LLDB_RECORD_METHOD(size_t, SBSourceManager, DisplaySourceLinesWithLineNumbers,
+ (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t,
+ const char *, lldb::SBStream &),
+ file, line, context_before, context_after,
+ current_line_cstr, s);
+
const uint32_t column = 0;
return DisplaySourceLinesWithLineNumbersAndColumn(
file.ref(), line, column, context_before, context_after,
@@ -106,6 +125,12 @@
const SBFileSpec &file, uint32_t line, uint32_t column,
uint32_t context_before, uint32_t context_after,
const char *current_line_cstr, SBStream &s) {
+ LLDB_RECORD_METHOD(
+ size_t, SBSourceManager, DisplaySourceLinesWithLineNumbersAndColumn,
+ (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t, uint32_t,
+ const char *, lldb::SBStream &),
+ file, line, column, context_before, context_after, current_line_cstr, s);
+
if (m_opaque_up == NULL)
return 0;