[Lldb-commits] [lldb] d51402a - [lldb] Remove reproducer instrumentation
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Sun Jan 9 21:41:00 PST 2022
Author: Jonas Devlieghere
Date: 2022-01-09T21:40:55-08:00
New Revision: d51402ac6b802dbc17402135067d302853b34252
URL: https://github.com/llvm/llvm-project/commit/d51402ac6b802dbc17402135067d302853b34252
DIFF: https://github.com/llvm/llvm-project/commit/d51402ac6b802dbc17402135067d302853b34252.diff
LOG: [lldb] Remove reproducer instrumentation
This patch removes most of the reproducer instrumentation. It keeps
around the LLDB_RECORD_* macros for logging. See [1] for more details.
[1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
Differential revision: https://reviews.llvm.org/D116847
Added:
Modified:
lldb/include/lldb/Utility/ReproducerInstrumentation.h
lldb/source/API/SBAddress.cpp
lldb/source/API/SBAttachInfo.cpp
lldb/source/API/SBBlock.cpp
lldb/source/API/SBBreakpoint.cpp
lldb/source/API/SBBreakpointLocation.cpp
lldb/source/API/SBBreakpointName.cpp
lldb/source/API/SBBroadcaster.cpp
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/API/SBCommandInterpreterRunOptions.cpp
lldb/source/API/SBCommandReturnObject.cpp
lldb/source/API/SBCommunication.cpp
lldb/source/API/SBCompileUnit.cpp
lldb/source/API/SBData.cpp
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBDeclaration.cpp
lldb/source/API/SBEnvironment.cpp
lldb/source/API/SBError.cpp
lldb/source/API/SBEvent.cpp
lldb/source/API/SBExecutionContext.cpp
lldb/source/API/SBExpressionOptions.cpp
lldb/source/API/SBFile.cpp
lldb/source/API/SBFileSpec.cpp
lldb/source/API/SBFileSpecList.cpp
lldb/source/API/SBFrame.cpp
lldb/source/API/SBFunction.cpp
lldb/source/API/SBHostOS.cpp
lldb/source/API/SBInstruction.cpp
lldb/source/API/SBInstructionList.cpp
lldb/source/API/SBLanguageRuntime.cpp
lldb/source/API/SBLaunchInfo.cpp
lldb/source/API/SBLineEntry.cpp
lldb/source/API/SBListener.cpp
lldb/source/API/SBMemoryRegionInfo.cpp
lldb/source/API/SBMemoryRegionInfoList.cpp
lldb/source/API/SBModule.cpp
lldb/source/API/SBModuleSpec.cpp
lldb/source/API/SBPlatform.cpp
lldb/source/API/SBProcess.cpp
lldb/source/API/SBProcessInfo.cpp
lldb/source/API/SBQueue.cpp
lldb/source/API/SBQueueItem.cpp
lldb/source/API/SBReproducer.cpp
lldb/source/API/SBSection.cpp
lldb/source/API/SBSourceManager.cpp
lldb/source/API/SBStream.cpp
lldb/source/API/SBStringList.cpp
lldb/source/API/SBStructuredData.cpp
lldb/source/API/SBSymbol.cpp
lldb/source/API/SBSymbolContext.cpp
lldb/source/API/SBSymbolContextList.cpp
lldb/source/API/SBTarget.cpp
lldb/source/API/SBThread.cpp
lldb/source/API/SBThreadCollection.cpp
lldb/source/API/SBThreadPlan.cpp
lldb/source/API/SBTrace.cpp
lldb/source/API/SBType.cpp
lldb/source/API/SBTypeCategory.cpp
lldb/source/API/SBTypeEnumMember.cpp
lldb/source/API/SBTypeFilter.cpp
lldb/source/API/SBTypeFormat.cpp
lldb/source/API/SBTypeNameSpecifier.cpp
lldb/source/API/SBTypeSummary.cpp
lldb/source/API/SBTypeSynthetic.cpp
lldb/source/API/SBUnixSignals.cpp
lldb/source/API/SBValue.cpp
lldb/source/API/SBValueList.cpp
lldb/source/API/SBVariablesOptions.cpp
lldb/source/API/SBWatchpoint.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Utility/ReproducerInstrumentation.cpp
lldb/unittests/Utility/CMakeLists.txt
Removed:
lldb/source/API/SBReproducerPrivate.h
lldb/unittests/Utility/ReproducerInstrumentationTest.cpp
################################################################################
diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index 6c5d27879d362..e6046bc688fb1 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -74,61 +74,8 @@ template <typename... Ts> inline std::string stringify_args(const Ts &... ts) {
return ss.str();
}
-// Define LLDB_REPRO_INSTR_TRACE to trace to stderr instead of LLDB's log
-// infrastructure. This is useful when you need to see traces before the logger
-// is initialized or enabled.
-// #define LLDB_REPRO_INSTR_TRACE
-
-#ifdef LLDB_REPRO_INSTR_TRACE
-inline llvm::raw_ostream &this_thread_id() {
- size_t tid = std::hash<std::thread::id>{}(std::this_thread::get_id());
- return llvm::errs().write_hex(tid) << " :: ";
-}
-#endif
-
-#define LLDB_REGISTER_CONSTRUCTOR(Class, Signature) \
- R.Register<Class * Signature>(&construct<Class Signature>::record, "", \
- #Class, #Class, #Signature)
-
-#define LLDB_REGISTER_METHOD(Result, Class, Method, Signature) \
- R.Register( \
- &invoke<Result(Class::*) Signature>::method<(&Class::Method)>::record, \
- #Result, #Class, #Method, #Signature)
-
-#define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature) \
- R.Register(&invoke<Result(Class::*) \
- Signature const>::method<(&Class::Method)>::record, \
- #Result, #Class, #Method, #Signature)
-
-#define LLDB_REGISTER_STATIC_METHOD(Result, Class, Method, Signature) \
- R.Register(&invoke<Result(*) Signature>::method<(&Class::Method)>::record, \
- #Result, #Class, #Method, #Signature)
-
-#define LLDB_REGISTER_CHAR_PTR_METHOD_STATIC(Result, Class, Method) \
- R.Register( \
- &invoke<Result (*)(char *, size_t)>::method<(&Class::Method)>::record, \
- &invoke_char_ptr<Result (*)(char *, \
- size_t)>::method<(&Class::Method)>::record, \
- #Result, #Class, #Method, "(char*, size_t");
-
-#define LLDB_REGISTER_CHAR_PTR_METHOD(Result, Class, Method) \
- R.Register(&invoke<Result (Class::*)(char *, size_t)>::method<( \
- &Class::Method)>::record, \
- &invoke_char_ptr<Result (Class::*)(char *, size_t)>::method<( \
- &Class::Method)>::record, \
- #Result, #Class, #Method, "(char*, size_t");
-
-#define LLDB_REGISTER_CHAR_PTR_METHOD_CONST(Result, Class, Method) \
- R.Register(&invoke<Result (Class::*)(char *, size_t) \
- const>::method<(&Class::Method)>::record, \
- &invoke_char_ptr<Result (Class::*)(char *, size_t) \
- const>::method<(&Class::Method)>::record, \
- #Result, #Class, #Method, "(char*, size_t");
-
#define LLDB_CONSTRUCT_(T, Class, ...) \
- lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION); \
- lldb_private::repro::construct<T>::handle(LLDB_GET_INSTRUMENTATION_DATA(), \
- _recorder, Class, __VA_ARGS__);
+ lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION);
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...) \
LLDB_CONSTRUCT_(Class Signature, this, __VA_ARGS__)
@@ -138,22 +85,7 @@ inline llvm::raw_ostream &this_thread_id() {
#define LLDB_RECORD_(T1, T2, ...) \
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
- stringify_args(__VA_ARGS__)); \
- if (lldb_private::repro::InstrumentationData _data = \
- LLDB_GET_INSTRUMENTATION_DATA()) { \
- if (lldb_private::repro::Serializer *_serializer = \
- _data.GetSerializer()) { \
- _recorder.Record(*_serializer, _data.GetRegistry(), \
- &lldb_private::repro::invoke<T1>::method<T2>::record, \
- __VA_ARGS__); \
- } else if (lldb_private::repro::Deserializer *_deserializer = \
- _data.GetDeserializer()) { \
- if (_recorder.ShouldCapture()) { \
- return lldb_private::repro::invoke<T1>::method<T2>::replay( \
- _recorder, *_deserializer, _data.GetRegistry()); \
- } \
- } \
- }
+ stringify_args(__VA_ARGS__));
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature, ...) \
LLDB_RECORD_(Result(Class::*) Signature, (&Class::Method), this, __VA_ARGS__)
@@ -176,22 +108,7 @@ inline llvm::raw_ostream &this_thread_id() {
#define LLDB_RECORD_CHAR_PTR_(T1, T2, StrOut, ...) \
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
- stringify_args(__VA_ARGS__)); \
- if (lldb_private::repro::InstrumentationData _data = \
- LLDB_GET_INSTRUMENTATION_DATA()) { \
- if (lldb_private::repro::Serializer *_serializer = \
- _data.GetSerializer()) { \
- _recorder.Record(*_serializer, _data.GetRegistry(), \
- &lldb_private::repro::invoke<T1>::method<(T2)>::record, \
- __VA_ARGS__); \
- } else if (lldb_private::repro::Deserializer *_deserializer = \
- _data.GetDeserializer()) { \
- if (_recorder.ShouldCapture()) { \
- return lldb_private::repro::invoke_char_ptr<T1>::method<T2>::replay( \
- _recorder, *_deserializer, _data.GetRegistry(), StrOut); \
- } \
- } \
- }
+ stringify_args(__VA_ARGS__));
#define LLDB_RECORD_CHAR_PTR_METHOD(Result, Class, Method, Signature, StrOut, \
...) \
@@ -208,7 +125,7 @@ inline llvm::raw_ostream &this_thread_id() {
LLDB_RECORD_CHAR_PTR_(Result(*) Signature, (&Class::Method), StrOut, \
__VA_ARGS__)
-#define LLDB_RECORD_RESULT(Result) _recorder.RecordResult(Result, true);
+#define LLDB_RECORD_RESULT(Result) Result;
/// The LLDB_RECORD_DUMMY macro is special because it doesn't actually record
/// anything. It's used to track API boundaries when we cannot record for
@@ -222,514 +139,6 @@ inline llvm::raw_ostream &this_thread_id() {
namespace lldb_private {
namespace repro {
-template <class T>
-struct is_trivially_serializable
- : std::integral_constant<bool, std::is_fundamental<T>::value ||
- std::is_enum<T>::value> {};
-
-/// Mapping between serialized indices and their corresponding objects.
-///
-/// This class is used during replay to map indices back to in-memory objects.
-///
-/// When objects are constructed, they are added to this mapping using
-/// AddObjectForIndex.
-///
-/// When an object is passed to a function, its index is deserialized and
-/// AddObjectForIndex returns the corresponding object. If there is no object
-/// for the given index, a nullptr is returend. The latter is valid when custom
-/// replay code is in place and the actual object is ignored.
-class IndexToObject {
-public:
- /// Returns an object as a pointer for the given index or nullptr if not
- /// present in the map.
- template <typename T> T *GetObjectForIndex(unsigned idx) {
- assert(idx != 0 && "Cannot get object for sentinel");
- void *object = GetObjectForIndexImpl(idx);
- return static_cast<T *>(object);
- }
-
- /// Adds a pointer to an object to the mapping for the given index.
- template <typename T> T *AddObjectForIndex(unsigned idx, T *object) {
- AddObjectForIndexImpl(
- idx, static_cast<void *>(
- const_cast<typename std::remove_const<T>::type *>(object)));
- return object;
- }
-
- /// Adds a reference to an object to the mapping for the given index.
- template <typename T> T &AddObjectForIndex(unsigned idx, T &object) {
- AddObjectForIndexImpl(
- idx, static_cast<void *>(
- const_cast<typename std::remove_const<T>::type *>(&object)));
- return object;
- }
-
- /// Get all objects sorted by their index.
- std::vector<void *> GetAllObjects() const;
-
-private:
- /// Helper method that does the actual lookup. The void* result is later cast
- /// by the caller.
- void *GetObjectForIndexImpl(unsigned idx);
-
- /// Helper method that does the actual insertion.
- void AddObjectForIndexImpl(unsigned idx, void *object);
-
- /// Keeps a mapping between indices and their corresponding object.
- llvm::DenseMap<unsigned, void *> m_mapping;
-};
-
-/// We need to
diff erentiate between pointers to fundamental and
-/// non-fundamental types. See the corresponding Deserializer::Read method
-/// for the reason why.
-struct PointerTag {};
-struct ReferenceTag {};
-struct ValueTag {};
-struct FundamentalPointerTag {};
-struct FundamentalReferenceTag {};
-
-/// Return the deserialization tag for the given type T.
-template <class T> struct serializer_tag {
- typedef typename std::conditional<std::is_trivially_copyable<T>::value,
- ValueTag, ReferenceTag>::type type;
-};
-template <class T> struct serializer_tag<T *> {
- typedef
- typename std::conditional<std::is_fundamental<T>::value,
- FundamentalPointerTag, PointerTag>::type type;
-};
-template <class T> struct serializer_tag<T &> {
- typedef typename std::conditional<std::is_fundamental<T>::value,
- FundamentalReferenceTag, ReferenceTag>::type
- type;
-};
-
-/// Deserializes data from a buffer. It is used to deserialize function indices
-/// to replay, their arguments and return values.
-///
-/// Fundamental types and strings are read by value. Objects are read by their
-/// index, which get translated by the IndexToObject mapping maintained in
-/// this class.
-///
-/// Additional bookkeeping with regards to the IndexToObject is required to
-/// deserialize objects. When a constructor is run or an object is returned by
-/// value, we need to capture the object and add it to the index together with
-/// its index. This is the job of HandleReplayResult(Void).
-class Deserializer {
-public:
- Deserializer(llvm::StringRef buffer) : m_buffer(buffer) {}
-
- /// Returns true when the buffer has unread data.
- bool HasData(unsigned size) { return size <= m_buffer.size(); }
-
- /// Deserialize and interpret value as T.
- template <typename T> T Deserialize() {
- T t = Read<T>(typename serializer_tag<T>::type());
-#ifdef LLDB_REPRO_INSTR_TRACE
- llvm::errs() << "Deserializing with " << LLVM_PRETTY_FUNCTION << " -> "
- << stringify_args(t) << "\n";
-#endif
- return t;
- }
-
- template <typename T> const T &HandleReplayResult(const T &t) {
- CheckSequence(Deserialize<unsigned>());
- unsigned result = Deserialize<unsigned>();
- if (is_trivially_serializable<T>::value)
- return t;
- // We need to make a copy as the original object might go out of scope.
- return *m_index_to_object.AddObjectForIndex(result, new T(t));
- }
-
- /// Store the returned value in the index-to-object mapping.
- template <typename T> T &HandleReplayResult(T &t) {
- CheckSequence(Deserialize<unsigned>());
- unsigned result = Deserialize<unsigned>();
- if (is_trivially_serializable<T>::value)
- return t;
- // We need to make a copy as the original object might go out of scope.
- return *m_index_to_object.AddObjectForIndex(result, new T(t));
- }
-
- /// Store the returned value in the index-to-object mapping.
- template <typename T> T *HandleReplayResult(T *t) {
- CheckSequence(Deserialize<unsigned>());
- unsigned result = Deserialize<unsigned>();
- if (is_trivially_serializable<T>::value)
- return t;
- return m_index_to_object.AddObjectForIndex(result, t);
- }
-
- /// All returned types are recorded, even when the function returns a void.
- /// The latter requires special handling.
- void HandleReplayResultVoid() {
- CheckSequence(Deserialize<unsigned>());
- unsigned result = Deserialize<unsigned>();
- assert(result == 0);
- (void)result;
- }
-
- std::vector<void *> GetAllObjects() const {
- return m_index_to_object.GetAllObjects();
- }
-
- void SetExpectedSequence(unsigned sequence) {
- m_expected_sequence = sequence;
- }
-
-private:
- template <typename T> T Read(ValueTag) {
- assert(HasData(sizeof(T)));
- T t;
- std::memcpy(reinterpret_cast<char *>(&t), m_buffer.data(), sizeof(T));
- m_buffer = m_buffer.drop_front(sizeof(T));
- return t;
- }
-
- template <typename T> T Read(PointerTag) {
- typedef typename std::remove_pointer<T>::type UnderlyingT;
- return m_index_to_object.template GetObjectForIndex<UnderlyingT>(
- Deserialize<unsigned>());
- }
-
- template <typename T> T Read(ReferenceTag) {
- typedef typename std::remove_reference<T>::type UnderlyingT;
- // If this is a reference to a fundamental type we just read its value.
- return *m_index_to_object.template GetObjectForIndex<UnderlyingT>(
- Deserialize<unsigned>());
- }
-
- /// This method is used to parse references to fundamental types. Because
- /// they're not recorded in the object table we have serialized their value.
- /// We read its value, allocate a copy on the heap, and return a pointer to
- /// the copy.
- template <typename T> T Read(FundamentalPointerTag) {
- typedef typename std::remove_pointer<T>::type UnderlyingT;
- return new UnderlyingT(Deserialize<UnderlyingT>());
- }
-
- /// This method is used to parse references to fundamental types. Because
- /// they're not recorded in the object table we have serialized their value.
- /// We read its value, allocate a copy on the heap, and return a reference to
- /// the copy.
- template <typename T> T Read(FundamentalReferenceTag) {
- // If this is a reference to a fundamental type we just read its value.
- typedef typename std::remove_reference<T>::type UnderlyingT;
- return *(new UnderlyingT(Deserialize<UnderlyingT>()));
- }
-
- /// Verify that the given sequence number matches what we expect.
- void CheckSequence(unsigned sequence);
-
- /// Mapping of indices to objects.
- IndexToObject m_index_to_object;
-
- /// Buffer containing the serialized data.
- llvm::StringRef m_buffer;
-
- /// The result's expected sequence number.
- llvm::Optional<unsigned> m_expected_sequence;
-};
-
-/// Partial specialization for C-style strings. We read the string value
-/// instead of treating it as pointer.
-template <> const char *Deserializer::Deserialize<const char *>();
-template <> const char **Deserializer::Deserialize<const char **>();
-template <> const uint8_t *Deserializer::Deserialize<const uint8_t *>();
-template <> const void *Deserializer::Deserialize<const void *>();
-template <> char *Deserializer::Deserialize<char *>();
-template <> void *Deserializer::Deserialize<void *>();
-
-/// Helpers to auto-synthesize function replay code. It deserializes the replay
-/// function's arguments one by one and finally calls the corresponding
-/// function.
-template <typename... Remaining> struct DeserializationHelper;
-
-template <typename Head, typename... Tail>
-struct DeserializationHelper<Head, Tail...> {
- template <typename Result, typename... Deserialized> struct deserialized {
- static Result doit(Deserializer &deserializer,
- Result (*f)(Deserialized..., Head, Tail...),
- Deserialized... d) {
- return DeserializationHelper<Tail...>::
- template deserialized<Result, Deserialized..., Head>::doit(
- deserializer, f, d..., deserializer.Deserialize<Head>());
- }
- };
-};
-
-template <> struct DeserializationHelper<> {
- template <typename Result, typename... Deserialized> struct deserialized {
- static Result doit(Deserializer &deserializer, Result (*f)(Deserialized...),
- Deserialized... d) {
- return f(d...);
- }
- };
-};
-
-/// The replayer interface.
-struct Replayer {
- virtual ~Replayer() = default;
- virtual void operator()(Deserializer &deserializer) const = 0;
-};
-
-/// The default replayer deserializes the arguments and calls the function.
-template <typename Signature> struct DefaultReplayer;
-template <typename Result, typename... Args>
-struct DefaultReplayer<Result(Args...)> : public Replayer {
- DefaultReplayer(Result (*f)(Args...)) : Replayer(), f(f) {}
-
- void operator()(Deserializer &deserializer) const override {
- Replay(deserializer);
- }
-
- Result Replay(Deserializer &deserializer) const {
- return deserializer.HandleReplayResult(
- DeserializationHelper<Args...>::template deserialized<Result>::doit(
- deserializer, f));
- }
-
- Result (*f)(Args...);
-};
-
-/// Partial specialization for function returning a void type. It ignores the
-/// (absent) return value.
-template <typename... Args>
-struct DefaultReplayer<void(Args...)> : public Replayer {
- DefaultReplayer(void (*f)(Args...)) : Replayer(), f(f) {}
-
- void operator()(Deserializer &deserializer) const override {
- Replay(deserializer);
- }
-
- void Replay(Deserializer &deserializer) const {
- DeserializationHelper<Args...>::template deserialized<void>::doit(
- deserializer, f);
- deserializer.HandleReplayResultVoid();
- }
-
- void (*f)(Args...);
-};
-
-/// The registry contains a unique mapping between functions and their ID. The
-/// IDs can be serialized and deserialized to replay a function. Functions need
-/// to be registered with the registry for this to work.
-class Registry {
-private:
- struct SignatureStr {
- SignatureStr(llvm::StringRef result = {}, llvm::StringRef scope = {},
- llvm::StringRef name = {}, llvm::StringRef args = {})
- : result(result), scope(scope), name(name), args(args) {}
-
- std::string ToString() const;
-
- llvm::StringRef result;
- llvm::StringRef scope;
- llvm::StringRef name;
- llvm::StringRef args;
- };
-
-public:
- Registry() = default;
- virtual ~Registry() = default;
-
- /// Register a default replayer for a function.
- template <typename Signature>
- void Register(Signature *f, llvm::StringRef result = {},
- llvm::StringRef scope = {}, llvm::StringRef name = {},
- llvm::StringRef args = {}) {
- DoRegister(uintptr_t(f), std::make_unique<DefaultReplayer<Signature>>(f),
- SignatureStr(result, scope, name, args));
- }
-
- /// Register a replayer that invokes a custom function with the same
- /// signature as the replayed function.
- template <typename Signature>
- void Register(Signature *f, Signature *g, llvm::StringRef result = {},
- llvm::StringRef scope = {}, llvm::StringRef name = {},
- llvm::StringRef args = {}) {
- DoRegister(uintptr_t(f), std::make_unique<DefaultReplayer<Signature>>(g),
- SignatureStr(result, scope, name, args));
- }
-
- /// Replay functions from a file.
- bool Replay(const FileSpec &file);
-
- /// Replay functions from a buffer.
- bool Replay(llvm::StringRef buffer);
-
- /// Replay functions from a deserializer.
- bool Replay(Deserializer &deserializer);
-
- /// Returns the ID for a given function address.
- unsigned GetID(uintptr_t addr);
-
- /// Get the replayer matching the given ID.
- Replayer *GetReplayer(unsigned id);
-
- std::string GetSignature(unsigned id);
-
- void CheckID(unsigned expected, unsigned actual);
-
-protected:
- /// Register the given replayer for a function (and the ID mapping).
- void DoRegister(uintptr_t RunID, std::unique_ptr<Replayer> replayer,
- SignatureStr signature);
-
-private:
- /// Mapping of function addresses to replayers and their ID.
- std::map<uintptr_t, std::pair<std::unique_ptr<Replayer>, unsigned>>
- m_replayers;
-
- /// Mapping of IDs to replayer instances.
- std::map<unsigned, std::pair<Replayer *, SignatureStr>> m_ids;
-};
-
-/// Maps an object to an index for serialization. Indices are unique and
-/// incremented for every new object.
-///
-/// Indices start at 1 in order to
diff erentiate with an invalid index (0) in
-/// the serialized buffer.
-class ObjectToIndex {
-public:
- template <typename T> unsigned GetIndexForObject(T *t) {
- return GetIndexForObjectImpl(static_cast<const void *>(t));
- }
-
-private:
- unsigned GetIndexForObjectImpl(const void *object);
-
- llvm::DenseMap<const void *, unsigned> m_mapping;
-};
-
-/// Serializes functions, their arguments and their return type to a stream.
-class Serializer {
-public:
- Serializer(llvm::raw_ostream &stream = llvm::outs()) : m_stream(stream) {}
-
- /// Recursively serialize all the given arguments.
- template <typename Head, typename... Tail>
- void SerializeAll(const Head &head, const Tail &... tail) {
- Serialize(head);
- SerializeAll(tail...);
- }
-
- void SerializeAll() { m_stream.flush(); }
-
-private:
- /// Serialize pointers. We need to
diff erentiate between pointers to
- /// fundamental types (in which case we serialize its value) and pointer to
- /// objects (in which case we serialize their index).
- template <typename T> void Serialize(T *t) {
-#ifdef LLDB_REPRO_INSTR_TRACE
- this_thread_id() << "Serializing with " << LLVM_PRETTY_FUNCTION << " -> "
- << stringify_args(t) << "\n";
-#endif
- if (std::is_fundamental<T>::value) {
- Serialize(*t);
- } else {
- unsigned idx = m_tracker.GetIndexForObject(t);
- Serialize(idx);
- }
- }
-
- /// Serialize references. We need to
diff erentiate between references to
- /// fundamental types (in which case we serialize its value) and references
- /// to objects (in which case we serialize their index).
- template <typename T> void Serialize(T &t) {
-#ifdef LLDB_REPRO_INSTR_TRACE
- this_thread_id() << "Serializing with " << LLVM_PRETTY_FUNCTION << " -> "
- << stringify_args(t) << "\n";
-#endif
- if (is_trivially_serializable<T>::value) {
- m_stream.write(reinterpret_cast<const char *>(&t), sizeof(T));
- } else {
- unsigned idx = m_tracker.GetIndexForObject(&t);
- Serialize(idx);
- }
- }
-
- void Serialize(const void *v) {
- // FIXME: Support void*
- }
-
- void Serialize(void *v) {
- // FIXME: Support void*
- }
-
- void Serialize(const char *t) {
-#ifdef LLDB_REPRO_INSTR_TRACE
- this_thread_id() << "Serializing with " << LLVM_PRETTY_FUNCTION << " -> "
- << stringify_args(t) << "\n";
-#endif
- const size_t size = t ? strlen(t) : std::numeric_limits<size_t>::max();
- Serialize(size);
- if (t) {
- m_stream << t;
- m_stream.write(0x0);
- }
- }
-
- void Serialize(const char **t) {
- size_t size = 0;
- if (!t) {
- Serialize(size);
- return;
- }
-
- // Compute the size of the array.
- const char *const *temp = t;
- while (*temp++)
- size++;
- Serialize(size);
-
- // Serialize the content of the array.
- while (*t)
- Serialize(*t++);
- }
-
- /// Serialization stream.
- llvm::raw_ostream &m_stream;
-
- /// Mapping of objects to indices.
- ObjectToIndex m_tracker;
-}; // namespace repro
-
-class InstrumentationData {
-public:
- Serializer *GetSerializer() { return m_serializer; }
- Deserializer *GetDeserializer() { return m_deserializer; }
- Registry &GetRegistry() { return *m_registry; }
-
- operator bool() {
- return (m_serializer != nullptr || m_deserializer != nullptr) &&
- m_registry != nullptr;
- }
-
- static void Initialize(Serializer &serializer, Registry ®istry);
- static void Initialize(Deserializer &serializer, Registry ®istry);
- static InstrumentationData &Instance();
-
-protected:
- friend llvm::optional_detail::OptionalStorage<InstrumentationData, true>;
- friend llvm::Optional<InstrumentationData>;
-
- InstrumentationData() = default;
- InstrumentationData(Serializer &serializer, Registry ®istry)
- : m_serializer(&serializer), m_deserializer(nullptr),
- m_registry(®istry) {}
- InstrumentationData(Deserializer &deserializer, Registry ®istry)
- : m_serializer(nullptr), m_deserializer(&deserializer),
- m_registry(®istry) {}
-
-private:
- static llvm::Optional<InstrumentationData> &InstanceImpl();
-
- Serializer *m_serializer = nullptr;
- Deserializer *m_deserializer = nullptr;
- Registry *m_registry = nullptr;
-};
-
struct EmptyArg {};
/// RAII object that records function invocations and their return value.
@@ -750,354 +159,12 @@ class Recorder {
Recorder(llvm::StringRef pretty_func, std::string &&pretty_args = {});
~Recorder();
- /// Records a single function call.
- template <typename Result, typename... FArgs, typename... RArgs>
- void Record(Serializer &serializer, Registry ®istry, Result (*f)(FArgs...),
- const RArgs &... args) {
- m_serializer = &serializer;
- if (!ShouldCapture())
- return;
-
- std::lock_guard<std::mutex> lock(g_mutex);
- unsigned sequence = GetSequenceNumber();
- unsigned id = registry.GetID(uintptr_t(f));
-
-#ifdef LLDB_REPRO_INSTR_TRACE
- Log(id);
-#endif
-
- serializer.SerializeAll(sequence);
- serializer.SerializeAll(id);
- serializer.SerializeAll(args...);
-
- if (std::is_class<typename std::remove_pointer<
- typename std::remove_reference<Result>::type>::type>::value) {
- m_result_recorded = false;
- } else {
- serializer.SerializeAll(sequence);
- serializer.SerializeAll(0);
- m_result_recorded = true;
- }
- }
-
- /// Records a single function call.
- template <typename... Args>
- void Record(Serializer &serializer, Registry ®istry, void (*f)(Args...),
- const Args &... args) {
- m_serializer = &serializer;
- if (!ShouldCapture())
- return;
-
- std::lock_guard<std::mutex> lock(g_mutex);
- unsigned sequence = GetSequenceNumber();
- unsigned id = registry.GetID(uintptr_t(f));
-
-#ifdef LLDB_REPRO_INSTR_TRACE
- Log(id);
-#endif
-
- serializer.SerializeAll(sequence);
- serializer.SerializeAll(id);
- serializer.SerializeAll(args...);
-
- // Record result.
- serializer.SerializeAll(sequence);
- serializer.SerializeAll(0);
- m_result_recorded = true;
- }
-
- /// Specializations for the no-argument methods. These are passed an empty
- /// dummy argument so the same variadic macro can be used. These methods
- /// strip the arguments before forwarding them.
- template <typename Result>
- void Record(Serializer &serializer, Registry ®istry, Result (*f)(),
- const EmptyArg &arg) {
- Record(serializer, registry, f);
- }
-
- /// Record the result of a function call.
- template <typename Result>
- Result RecordResult(Result &&r, bool update_boundary) {
- // When recording the result from the LLDB_RECORD_RESULT macro, we need to
- // update the boundary so we capture the copy constructor. However, when
- // called to record the this pointer of the (copy) constructor, the
- // boundary should not be toggled, because it is called from the
- // LLDB_RECORD_CONSTRUCTOR macro, which might be followed by other API
- // calls.
- if (update_boundary)
- UpdateBoundary();
- if (m_serializer && ShouldCapture()) {
- std::lock_guard<std::mutex> lock(g_mutex);
- assert(!m_result_recorded);
- m_serializer->SerializeAll(GetSequenceNumber());
- m_serializer->SerializeAll(r);
- m_result_recorded = true;
- }
- return std::forward<Result>(r);
- }
-
- template <typename Result, typename T>
- Result Replay(Deserializer &deserializer, Registry ®istry, uintptr_t addr,
- bool update_boundary) {
- deserializer.SetExpectedSequence(deserializer.Deserialize<unsigned>());
- unsigned actual_id = registry.GetID(addr);
- unsigned id = deserializer.Deserialize<unsigned>();
- registry.CheckID(id, actual_id);
- return ReplayResult<Result>(
- static_cast<DefaultReplayer<T> *>(registry.GetReplayer(id))
- ->Replay(deserializer),
- update_boundary);
- }
-
- void Replay(Deserializer &deserializer, Registry ®istry, uintptr_t addr) {
- deserializer.SetExpectedSequence(deserializer.Deserialize<unsigned>());
- unsigned actual_id = registry.GetID(addr);
- unsigned id = deserializer.Deserialize<unsigned>();
- registry.CheckID(id, actual_id);
- registry.GetReplayer(id)->operator()(deserializer);
- }
-
- template <typename Result>
- Result ReplayResult(Result &&r, bool update_boundary) {
- if (update_boundary)
- UpdateBoundary();
- return std::forward<Result>(r);
- }
-
- bool ShouldCapture() { return m_local_boundary; }
-
- /// Mark the current thread as a private thread and pretend that everything
- /// on this thread is behind happening behind the API boundary.
- static void PrivateThread();
-
private:
- static unsigned GetNextSequenceNumber() { return g_sequence++; }
- unsigned GetSequenceNumber() const;
-
- template <typename T> friend struct replay;
void UpdateBoundary();
-#ifdef LLDB_REPRO_INSTR_TRACE
- void Log(unsigned id) {
- this_thread_id() << "Recording " << id << ": " << m_pretty_func << " ("
- << m_pretty_args << ")\n";
- }
-#endif
-
- Serializer *m_serializer = nullptr;
-
- /// Pretty function for logging.
- llvm::StringRef m_pretty_func;
- std::string m_pretty_args;
-
/// Whether this function call was the one crossing the API boundary.
bool m_local_boundary = false;
-
- /// Whether the return value was recorded explicitly.
- bool m_result_recorded = true;
-
- /// The sequence number for this pair of function and result.
- unsigned m_sequence;
-
- /// Global mutex to protect concurrent access.
- static std::mutex g_mutex;
-
- /// Unique, monotonically increasing sequence number.
- static std::atomic<unsigned> g_sequence;
-};
-
-/// To be used as the "Runtime ID" of a constructor. It also invokes the
-/// constructor when called.
-template <typename Signature> struct construct;
-template <typename Class, typename... Args> struct construct<Class(Args...)> {
- static Class *handle(lldb_private::repro::InstrumentationData data,
- lldb_private::repro::Recorder &recorder, Class *c,
- const EmptyArg &) {
- return handle(data, recorder, c);
- }
-
- static Class *handle(lldb_private::repro::InstrumentationData data,
- lldb_private::repro::Recorder &recorder, Class *c,
- Args... args) {
- if (!data)
- return nullptr;
-
- if (Serializer *serializer = data.GetSerializer()) {
- recorder.Record(*serializer, data.GetRegistry(), &record, args...);
- recorder.RecordResult(c, false);
- } else if (Deserializer *deserializer = data.GetDeserializer()) {
- if (recorder.ShouldCapture()) {
- replay(recorder, *deserializer, data.GetRegistry());
- }
- }
-
- return nullptr;
- }
-
- static Class *record(Args... args) { return new Class(args...); }
-
- static Class *replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- return recorder.Replay<Class *, Class *(Args...)>(
- deserializer, registry, uintptr_t(&record), false);
- }
-};
-
-/// To be used as the "Runtime ID" of a member function. It also invokes the
-/// member function when called.
-template <typename Signature> struct invoke;
-template <typename Result, typename Class, typename... Args>
-struct invoke<Result (Class::*)(Args...)> {
- template <Result (Class::*m)(Args...)> struct method {
- static Result record(Class *c, Args... args) { return (c->*m)(args...); }
-
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- return recorder.Replay<Result, Result(Class *, Args...)>(
- deserializer, registry, uintptr_t(&record), true);
- }
- };
-};
-
-template <typename Class, typename... Args>
-struct invoke<void (Class::*)(Args...)> {
- template <void (Class::*m)(Args...)> struct method {
- static void record(Class *c, Args... args) { (c->*m)(args...); }
- static void replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- recorder.Replay(deserializer, registry, uintptr_t(&record));
- }
- };
-};
-
-template <typename Result, typename Class, typename... Args>
-struct invoke<Result (Class::*)(Args...) const> {
- template <Result (Class::*m)(Args...) const> struct method {
- static Result record(Class *c, Args... args) { return (c->*m)(args...); }
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- return recorder.Replay<Result, Result(Class *, Args...)>(
- deserializer, registry, uintptr_t(&record), true);
- }
- };
-};
-
-template <typename Class, typename... Args>
-struct invoke<void (Class::*)(Args...) const> {
- template <void (Class::*m)(Args...) const> struct method {
- static void record(Class *c, Args... args) { return (c->*m)(args...); }
- static void replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- recorder.Replay(deserializer, registry, uintptr_t(&record));
- }
- };
-};
-
-template <typename Signature> struct replay;
-
-template <typename Result, typename Class, typename... Args>
-struct replay<Result (Class::*)(Args...)> {
- template <Result (Class::*m)(Args...)> struct method {};
-};
-
-template <typename Result, typename... Args>
-struct invoke<Result (*)(Args...)> {
- template <Result (*m)(Args...)> struct method {
- static Result record(Args... args) { return (*m)(args...); }
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- return recorder.Replay<Result, Result(Args...)>(deserializer, registry,
- uintptr_t(&record), true);
- }
- };
-};
-
-template <typename... Args> struct invoke<void (*)(Args...)> {
- template <void (*m)(Args...)> struct method {
- static void record(Args... args) { return (*m)(args...); }
- static void replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry) {
- recorder.Replay(deserializer, registry, uintptr_t(&record));
- }
- };
-};
-
-/// Special handling for functions returning strings as (char*, size_t).
-/// {
-
-/// For inline replay, we ignore the arguments and use the ones from the
-/// serializer instead. This doesn't work for methods that use a char* and a
-/// size to return a string. For one these functions have a custom replayer to
-/// prevent override the input buffer. Furthermore, the template-generated
-/// deserialization is not easy to hook into.
-///
-/// The specializations below hand-implement the serialization logic for the
-/// inline replay. Instead of using the function from the registry, it uses the
-/// one passed into the macro.
-template <typename Signature> struct invoke_char_ptr;
-template <typename Result, typename Class, typename... Args>
-struct invoke_char_ptr<Result (Class::*)(Args...) const> {
- template <Result (Class::*m)(Args...) const> struct method {
- static Result record(Class *c, char *s, size_t l) {
- char *buffer = reinterpret_cast<char *>(calloc(l, sizeof(char)));
- return (c->*m)(buffer, l);
- }
-
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry, char *str) {
- deserializer.SetExpectedSequence(deserializer.Deserialize<unsigned>());
- deserializer.Deserialize<unsigned>();
- Class *c = deserializer.Deserialize<Class *>();
- deserializer.Deserialize<const char *>();
- size_t l = deserializer.Deserialize<size_t>();
- return recorder.ReplayResult(
- std::move(deserializer.HandleReplayResult((c->*m)(str, l))), true);
- }
- };
-};
-
-template <typename Signature> struct invoke_char_ptr;
-template <typename Result, typename Class, typename... Args>
-struct invoke_char_ptr<Result (Class::*)(Args...)> {
- template <Result (Class::*m)(Args...)> struct method {
- static Result record(Class *c, char *s, size_t l) {
- char *buffer = reinterpret_cast<char *>(calloc(l, sizeof(char)));
- return (c->*m)(buffer, l);
- }
-
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry, char *str) {
- deserializer.SetExpectedSequence(deserializer.Deserialize<unsigned>());
- deserializer.Deserialize<unsigned>();
- Class *c = deserializer.Deserialize<Class *>();
- deserializer.Deserialize<const char *>();
- size_t l = deserializer.Deserialize<size_t>();
- return recorder.ReplayResult(
- std::move(deserializer.HandleReplayResult((c->*m)(str, l))), true);
- }
- };
-};
-
-template <typename Result, typename... Args>
-struct invoke_char_ptr<Result (*)(Args...)> {
- template <Result (*m)(Args...)> struct method {
- static Result record(char *s, size_t l) {
- char *buffer = reinterpret_cast<char *>(calloc(l, sizeof(char)));
- return (*m)(buffer, l);
- }
-
- static Result replay(Recorder &recorder, Deserializer &deserializer,
- Registry ®istry, char *str) {
- deserializer.SetExpectedSequence(deserializer.Deserialize<unsigned>());
- deserializer.Deserialize<unsigned>();
- deserializer.Deserialize<const char *>();
- size_t l = deserializer.Deserialize<size_t>();
- return recorder.ReplayResult(
- std::move(deserializer.HandleReplayResult((*m)(str, l))), true);
- }
- };
};
-/// }
} // namespace repro
} // namespace lldb_private
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 7c102270a87c8..910e000d2ddde 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBAddress.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBSection.h"
@@ -275,43 +275,3 @@ SBLineEntry SBAddress::GetLineEntry() {
}
return LLDB_RECORD_RESULT(sb_line_entry);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBAddress>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBAddress, ());
- LLDB_REGISTER_CONSTRUCTOR(SBAddress, (const lldb::SBAddress &));
- LLDB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::SBSection, lldb::addr_t));
- LLDB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::addr_t, lldb::SBTarget &));
- LLDB_REGISTER_METHOD(const lldb::SBAddress &,
- SBAddress, operator=,(const lldb::SBAddress &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBAddress, operator!=,(const lldb::SBAddress &));
- LLDB_REGISTER_METHOD_CONST(bool, SBAddress, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBAddress, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBAddress, Clear, ());
- LLDB_REGISTER_METHOD(void, SBAddress, SetAddress,
- (lldb::SBSection, lldb::addr_t));
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetFileAddress, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress,
- (const lldb::SBTarget &));
- LLDB_REGISTER_METHOD(void, SBAddress, SetLoadAddress,
- (lldb::addr_t, lldb::SBTarget &));
- LLDB_REGISTER_METHOD(bool, SBAddress, OffsetAddress, (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBSection, SBAddress, GetSection, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBAddress, GetOffset, ());
- LLDB_REGISTER_METHOD(bool, SBAddress, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBModule, SBAddress, GetModule, ());
- LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBAddress, GetSymbolContext,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBCompileUnit, SBAddress, GetCompileUnit, ());
- LLDB_REGISTER_METHOD(lldb::SBFunction, SBAddress, GetFunction, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBAddress, GetBlock, ());
- LLDB_REGISTER_METHOD(lldb::SBSymbol, SBAddress, GetSymbol, ());
- LLDB_REGISTER_METHOD(lldb::SBLineEntry, SBAddress, GetLineEntry, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBAttachInfo.cpp b/lldb/source/API/SBAttachInfo.cpp
index b21589cf27081..820f9918a994e 100644
--- a/lldb/source/API/SBAttachInfo.cpp
+++ b/lldb/source/API/SBAttachInfo.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBAttachInfo.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBListener.h"
@@ -258,51 +258,3 @@ void SBAttachInfo::SetListener(SBListener &listener) {
m_opaque_sp->SetListener(listener.GetSP());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBAttachInfo>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, ());
- LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (lldb::pid_t));
- LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const char *, bool));
- LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const char *, bool, bool));
- LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const lldb::SBAttachInfo &));
- LLDB_REGISTER_METHOD(lldb::SBAttachInfo &,
- SBAttachInfo, operator=,(const lldb::SBAttachInfo &));
- LLDB_REGISTER_METHOD(lldb::pid_t, SBAttachInfo, GetProcessID, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetProcessID, (lldb::pid_t));
- LLDB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetResumeCount, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetResumeCount, (uint32_t));
- LLDB_REGISTER_METHOD(const char *, SBAttachInfo, GetProcessPluginName, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetProcessPluginName,
- (const char *));
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetExecutable, (const char *));
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetExecutable, (lldb::SBFileSpec));
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, GetWaitForLaunch, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool));
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool, bool));
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, GetIgnoreExisting, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetIgnoreExisting, (bool));
- LLDB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetUserID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetGroupID, ());
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, UserIDIsValid, ());
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, GroupIDIsValid, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetUserID, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetGroupID, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetEffectiveUserID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetEffectiveGroupID, ());
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, EffectiveUserIDIsValid, ());
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, EffectiveGroupIDIsValid, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetEffectiveUserID, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetEffectiveGroupID, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::pid_t, SBAttachInfo, GetParentProcessID, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetParentProcessID, (lldb::pid_t));
- LLDB_REGISTER_METHOD(bool, SBAttachInfo, ParentProcessIDIsValid, ());
- LLDB_REGISTER_METHOD(lldb::SBListener, SBAttachInfo, GetListener, ());
- LLDB_REGISTER_METHOD(void, SBAttachInfo, SetListener, (lldb::SBListener &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index 5c49053dd972e..b0865207d766d 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBBlock.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBFrame.h"
@@ -343,42 +343,3 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments,
}
return LLDB_RECORD_RESULT(value_list);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBBlock>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBlock, ());
- LLDB_REGISTER_CONSTRUCTOR(SBBlock, (const lldb::SBBlock &));
- LLDB_REGISTER_METHOD(const lldb::SBBlock &,
- SBBlock, operator=,(const lldb::SBBlock &));
- LLDB_REGISTER_METHOD_CONST(bool, SBBlock, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBlock, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBlock, IsInlined, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBBlock, GetInlinedName, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBBlock,
- GetInlinedCallSiteFile, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBlock, GetInlinedCallSiteLine, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBlock, GetInlinedCallSiteColumn, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetParent, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetContainingInlinedBlock, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetSibling, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetFirstChild, ());
- LLDB_REGISTER_METHOD(bool, SBBlock, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(uint32_t, SBBlock, GetNumRanges, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBBlock, GetRangeStartAddress,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBBlock, GetRangeEndAddress,
- (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBBlock, GetRangeIndexForBlockAddress,
- (lldb::SBAddress));
- LLDB_REGISTER_METHOD(
- lldb::SBValueList, SBBlock, GetVariables,
- (lldb::SBFrame &, bool, bool, bool, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBBlock, GetVariables,
- (lldb::SBTarget &, bool, bool, bool));
-}
-
-}
-}
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 031ad7b627886..4fc88e13ed681 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBBreakpoint.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBBreakpointLocation.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBEvent.h"
@@ -982,114 +982,3 @@ void SBBreakpointList::CopyToBreakpointIDList(
if (m_opaque_sp)
m_opaque_sp->CopyToBreakpointIDList(bp_id_list);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBBreakpoint>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, ());
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::SBBreakpoint &));
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::BreakpointSP &));
- LLDB_REGISTER_METHOD(const lldb::SBBreakpoint &,
- SBBreakpoint, operator=,(const lldb::SBBreakpoint &));
- LLDB_REGISTER_METHOD(bool,
- SBBreakpoint, operator==,(const lldb::SBBreakpoint &));
- LLDB_REGISTER_METHOD(bool,
- SBBreakpoint, operator!=,(const lldb::SBBreakpoint &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBTarget, SBBreakpoint, GetTarget, ());
- LLDB_REGISTER_METHOD_CONST(lldb::break_id_t, SBBreakpoint, GetID, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, ClearAllBreakpointSites, ());
- LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
- FindLocationByAddress, (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::break_id_t, SBBreakpoint,
- FindLocationIDByAddress, (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
- FindLocationByID, (lldb::break_id_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
- GetLocationAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetEnabled, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, IsEnabled, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetOneShot, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsOneShot, ());
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, IsInternal, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetCondition, (const char *));
- LLDB_REGISTER_METHOD(const char *, SBBreakpoint, GetCondition, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetAutoContinue, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetAutoContinue, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetHitCount, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetIgnoreCount, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadID, (lldb::tid_t));
- LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpoint, GetThreadID, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetThreadIndex, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadName, (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetThreadName, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetQueueName, (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetQueueName, ());
- LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumResolvedLocations,
- ());
- LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumLocations, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription,
- (lldb::SBStream &, bool));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, AddLocation,
- (lldb::SBAddress &));
- LLDB_REGISTER_METHOD(lldb::SBStructuredData, SBBreakpoint,
- SerializeToStructuredData, ());
- LLDB_REGISTER_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackFunction,
- (const char *, SBStructuredData &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, AddName, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, AddNameWithErrorHandling,
- (const char *));
- LLDB_REGISTER_METHOD(void, SBBreakpoint, RemoveName, (const char *));
- LLDB_REGISTER_METHOD(bool, SBBreakpoint, MatchesName, (const char *));
- LLDB_REGISTER_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBBreakpoint, EventIsBreakpointEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::BreakpointEventType, SBBreakpoint,
- GetBreakpointEventTypeFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBBreakpoint, SBBreakpoint,
- GetBreakpointFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
- GetBreakpointLocationAtIndexFromEvent,
- (const lldb::SBEvent &, uint32_t));
- LLDB_REGISTER_STATIC_METHOD(uint32_t, SBBreakpoint,
- GetNumBreakpointLocationsFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsHardware, ());
-}
-
-template <>
-void RegisterMethods<SBBreakpointList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointList, (lldb::SBTarget &));
- LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpointList, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList,
- GetBreakpointAtIndex, (size_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList,
- FindBreakpointByID, (lldb::break_id_t));
- LLDB_REGISTER_METHOD(void, SBBreakpointList, Append,
- (const lldb::SBBreakpoint &));
- LLDB_REGISTER_METHOD(void, SBBreakpointList, AppendByID,
- (lldb::break_id_t));
- LLDB_REGISTER_METHOD(bool, SBBreakpointList, AppendIfUnique,
- (const lldb::SBBreakpoint &));
- LLDB_REGISTER_METHOD(void, SBBreakpointList, Clear, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp
index 1751204299258..ec7a6ac86eeb5 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBBreakpointLocation.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBDefines.h"
@@ -467,68 +467,3 @@ SBBreakpoint SBBreakpointLocation::GetBreakpoint() {
return LLDB_RECORD_RESULT(sb_bp);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBBreakpointLocation>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, ());
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation,
- (const lldb::BreakpointLocationSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation,
- (const lldb::SBBreakpointLocation &));
- LLDB_REGISTER_METHOD(
- const lldb::SBBreakpointLocation &,
- SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBBreakpointLocation, GetAddress, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBBreakpointLocation, GetLoadAddress,
- ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetEnabled, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, IsEnabled, ());
- LLDB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetHitCount, ());
- LLDB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetIgnoreCount, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetIgnoreCount,
- (uint32_t));
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetCondition,
- (const char *));
- LLDB_REGISTER_METHOD(const char *, SBBreakpointLocation, GetCondition, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetAutoContinue, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetAutoContinue, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
- (const char *));
- LLDB_REGISTER_METHOD(SBError, SBBreakpointLocation, SetScriptCallbackFunction,
- (const char *, SBStructuredData &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointLocation,
- SetScriptCallbackBody, (const char *));
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadID,
- (lldb::tid_t));
- LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpointLocation, GetThreadID, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointLocation, GetThreadIndex,
- ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadName,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation,
- GetThreadName, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetQueueName,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation, GetQueueName,
- ());
- LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, IsResolved, ());
- LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(lldb::break_id_t, SBBreakpointLocation, GetID, ());
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointLocation,
- GetBreakpoint, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp
index b5c700c78bbb6..599be07853752 100644
--- a/lldb/source/API/SBBreakpointName.cpp
+++ b/lldb/source/API/SBBreakpointName.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBBreakpointName.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBStream.h"
@@ -692,72 +692,3 @@ lldb_private::BreakpointName *SBBreakpointName::GetBreakpointName() const
return nullptr;
return m_impl_up->GetBreakpointName();
}
-
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBBreakpointName>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, ());
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
- (lldb::SBTarget &, const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
- (lldb::SBBreakpoint &, const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
- (const lldb::SBBreakpointName &));
- LLDB_REGISTER_METHOD(
- const lldb::SBBreakpointName &,
- SBBreakpointName, operator=,(const lldb::SBBreakpointName &));
- LLDB_REGISTER_METHOD(
- bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &));
- LLDB_REGISTER_METHOD(
- bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetName, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetEnabled, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, IsEnabled, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetOneShot, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsOneShot, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetIgnoreCount, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCondition, (const char *));
- LLDB_REGISTER_METHOD(const char *, SBBreakpointName, GetCondition, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAutoContinue, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAutoContinue, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t));
- LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpointName, GetThreadID, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetThreadIndex, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadName, (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetThreadName,
- ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetQueueName, (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetQueueName,
- ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetCommandLineCommands,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetHelpString,
- ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetHelpString, (const char *));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
- (const char *));
- LLDB_REGISTER_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
- (const char *, SBStructuredData &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, GetAllowList, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowList, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDelete, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDelete, (bool));
- LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDisable, ());
- LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDisable, (bool));
-}
-
-}
-}
diff --git a/lldb/source/API/SBBroadcaster.cpp b/lldb/source/API/SBBroadcaster.cpp
index 46558480aa1ad..daf42f986079c 100644
--- a/lldb/source/API/SBBroadcaster.cpp
+++ b/lldb/source/API/SBBroadcaster.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Utility/Broadcaster.h"
#include "lldb/API/SBBroadcaster.h"
@@ -173,41 +173,3 @@ bool SBBroadcaster::operator<(const SBBroadcaster &rhs) const {
return m_opaque_ptr < rhs.m_opaque_ptr;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBBroadcaster>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBBroadcaster, ());
- LLDB_REGISTER_CONSTRUCTOR(SBBroadcaster, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBBroadcaster, (const lldb::SBBroadcaster &));
- LLDB_REGISTER_METHOD(
- const lldb::SBBroadcaster &,
- SBBroadcaster, operator=,(const lldb::SBBroadcaster &));
- LLDB_REGISTER_METHOD(void, SBBroadcaster, BroadcastEventByType,
- (uint32_t, bool));
- LLDB_REGISTER_METHOD(void, SBBroadcaster, BroadcastEvent,
- (const lldb::SBEvent &, bool));
- LLDB_REGISTER_METHOD(void, SBBroadcaster, AddInitialEventsToListener,
- (const lldb::SBListener &, uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBBroadcaster, AddListener,
- (const lldb::SBListener &, uint32_t));
- LLDB_REGISTER_METHOD_CONST(const char *, SBBroadcaster, GetName, ());
- LLDB_REGISTER_METHOD(bool, SBBroadcaster, EventTypeHasListeners,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBBroadcaster, RemoveListener,
- (const lldb::SBListener &, uint32_t));
- LLDB_REGISTER_METHOD_CONST(bool, SBBroadcaster, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBBroadcaster, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBBroadcaster, Clear, ());
- LLDB_REGISTER_METHOD_CONST(
- bool, SBBroadcaster, operator==,(const lldb::SBBroadcaster &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBBroadcaster, operator!=,(const lldb::SBBroadcaster &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBBroadcaster, operator<,(const lldb::SBBroadcaster &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 3830f6ed80baf..ee7ad61da7d23 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -8,7 +8,7 @@
#include "lldb/lldb-types.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
#include "lldb/Interpreter/CommandReturnObject.h"
@@ -747,121 +747,3 @@ void SBCommand::SetFlags(uint32_t flags) {
if (IsValid())
m_opaque_sp->GetFlags().Set(flags);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBCommandInterpreter>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreter,
- (lldb_private::CommandInterpreter *));
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreter,
- (const lldb::SBCommandInterpreter &));
- LLDB_REGISTER_METHOD(
- const lldb::SBCommandInterpreter &,
- SBCommandInterpreter, operator=,(const lldb::SBCommandInterpreter &));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, CommandExists,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, AliasExists,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, IsActive, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, WasInterrupted, ());
- LLDB_REGISTER_METHOD(const char *, SBCommandInterpreter,
- GetIOHandlerControlSequence, (char));
- LLDB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandInterpreter,
- HandleCommand,
- (const char *, lldb::SBCommandReturnObject &, bool));
- LLDB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandInterpreter,
- HandleCommand,
- (const char *, lldb::SBExecutionContext &,
- lldb::SBCommandReturnObject &, bool));
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter, HandleCommandsFromFile,
- (lldb::SBFileSpec &, lldb::SBExecutionContext &,
- lldb::SBCommandInterpreterRunOptions &,
- lldb::SBCommandReturnObject));
- LLDB_REGISTER_METHOD(int, SBCommandInterpreter, HandleCompletion,
- (const char *, const char *, const char *, int, int,
- lldb::SBStringList &));
- LLDB_REGISTER_METHOD(int, SBCommandInterpreter,
- HandleCompletionWithDescriptions,
- (const char *, const char *, const char *, int, int,
- lldb::SBStringList &, lldb::SBStringList &));
- LLDB_REGISTER_METHOD(int, SBCommandInterpreter,
- HandleCompletionWithDescriptions,
- (const char *, uint32_t, int, int,
- lldb::SBStringList &, lldb::SBStringList &));
- LLDB_REGISTER_METHOD(
- int, SBCommandInterpreter, HandleCompletion,
- (const char *, uint32_t, int, int, lldb::SBStringList &));
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, HasCommands, ());
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, HasAliases, ());
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, HasAliasOptions, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBCommandInterpreter, GetProcess, ());
- LLDB_REGISTER_METHOD(lldb::SBDebugger, SBCommandInterpreter, GetDebugger,
- ());
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, GetPromptOnQuit, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter, SetPromptOnQuit, (bool));
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter, AllowExitCodeOnQuit,
- (bool));
- LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, HasCustomQuitExitCode, ());
- LLDB_REGISTER_METHOD(int, SBCommandInterpreter, GetQuitStatus, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter, ResolveCommand,
- (const char *, lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter,
- SourceInitFileInHomeDirectory,
- (lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter,
- SourceInitFileInHomeDirectory,
- (lldb::SBCommandReturnObject &, bool));
- LLDB_REGISTER_METHOD(void, SBCommandInterpreter,
- SourceInitFileInCurrentWorkingDirectory,
- (lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD(lldb::SBBroadcaster, SBCommandInterpreter,
- GetBroadcaster, ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter,
- GetBroadcasterClass, ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter,
- GetArgumentTypeAsCString,
- (const lldb::CommandArgumentType));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter,
- GetArgumentDescriptionAsCString,
- (const lldb::CommandArgumentType));
- LLDB_REGISTER_STATIC_METHOD(bool, SBCommandInterpreter,
- EventIsCommandInterpreterEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommandInterpreter,
- AddMultiwordCommand, (const char *, const char *));
- LLDB_REGISTER_METHOD(
- lldb::SBCommand, SBCommandInterpreter, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommandInterpreter, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *,
- const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommandInterpreter, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *,
- const char *, const char *, const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBCommand, ());
- LLDB_REGISTER_METHOD(bool, SBCommand, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommand, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBCommand, GetName, ());
- LLDB_REGISTER_METHOD(const char *, SBCommand, GetHelp, ());
- LLDB_REGISTER_METHOD(const char *, SBCommand, GetHelpLong, ());
- LLDB_REGISTER_METHOD(void, SBCommand, SetHelp, (const char *));
- LLDB_REGISTER_METHOD(void, SBCommand, SetHelpLong, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommand, AddMultiwordCommand,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(
- lldb::SBCommand, SBCommand, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommand, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *,
- const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBCommand, SBCommand, AddCommand,
- (const char *, lldb::SBCommandPluginInterface *,
- const char *, const char *, const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBCommand, GetFlags, ());
- LLDB_REGISTER_METHOD(void, SBCommand, SetFlags, (uint32_t));
-}
-}
-}
diff --git a/lldb/source/API/SBCommandInterpreterRunOptions.cpp b/lldb/source/API/SBCommandInterpreterRunOptions.cpp
index 4d72926137cf9..d70091b3573af 100644
--- a/lldb/source/API/SBCommandInterpreterRunOptions.cpp
+++ b/lldb/source/API/SBCommandInterpreterRunOptions.cpp
@@ -8,7 +8,7 @@
#include "lldb/lldb-types.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBCommandInterpreterRunOptions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
@@ -246,68 +246,3 @@ SBCommandInterpreterRunResult::GetResult() const {
return m_opaque_up->GetResult();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBCommandInterpreterRunOptions>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunOptions, ());
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunOptions,
- (const lldb::SBCommandInterpreterRunOptions &));
- LLDB_REGISTER_METHOD(lldb::SBCommandInterpreterRunOptions &,
- SBCommandInterpreterRunOptions, operator=,
- (const lldb::SBCommandInterpreterRunOptions &));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetStopOnContinue, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnContinue,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetStopOnError, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnError,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetStopOnCrash, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnCrash,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetEchoCommands, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetEchoCommands,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetEchoCommentCommands, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions,
- SetEchoCommentCommands, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetPrintResults, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetPrintResults,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetPrintErrors, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetPrintErrors,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetAddToHistory, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetAddToHistory,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetAutoHandleEvents, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions,
- SetAutoHandleEvents, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
- GetSpawnThread, ());
- LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetSpawnThread,
- (bool));
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunResult, ());
- LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunResult,
- (const lldb::SBCommandInterpreterRunResult &));
- LLDB_REGISTER_METHOD(lldb::SBCommandInterpreterRunResult &,
- SBCommandInterpreterRunResult, operator=,
- (const lldb::SBCommandInterpreterRunResult &));
- LLDB_REGISTER_METHOD_CONST(int, SBCommandInterpreterRunResult,
- GetNumberOfErrors, ());
- LLDB_REGISTER_METHOD_CONST(lldb::CommandInterpreterResult,
- SBCommandInterpreterRunResult, GetResult, ());
-}
-
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index d66580f33ad64..687a50f0db637 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBCommandReturnObject.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBFile.h"
@@ -364,70 +364,3 @@ void SBCommandReturnObject::SetError(const char *error_cstr) {
if (error_cstr)
ref().AppendError(error_cstr);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBCommandReturnObject>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject, ());
- LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject,
- (lldb_private::CommandReturnObject &));
- LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject,
- (const lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD(
- lldb::SBCommandReturnObject &,
- SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetOutput, ());
- LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetError, ());
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetOutputSize, ());
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetErrorSize, ());
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *));
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *));
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (SBFile));
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (SBFile));
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (FileSP));
- LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (FileSP));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, Clear, ());
- LLDB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandReturnObject, GetStatus,
- ());
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetStatus,
- (lldb::ReturnStatus));
- LLDB_REGISTER_METHOD(bool, SBCommandReturnObject, Succeeded, ());
- LLDB_REGISTER_METHOD(bool, SBCommandReturnObject, HasResult, ());
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, AppendMessage,
- (const char *));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, AppendWarning,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBCommandReturnObject, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
- (FILE *));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
- (FILE *));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
- (SBFile));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
- (SBFile));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
- (FileSP));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
- (FileSP));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
- (FILE *, bool));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
- (FILE *, bool));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, PutCString,
- (const char *, int));
- LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetOutput,
- (bool));
- LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetError, (bool));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetError,
- (lldb::SBError &, const char *));
- LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetError, (const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 9a2ab89d5e4ed..843db695a8f53 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBCommunication.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBBroadcaster.h"
#include "lldb/Core/Communication.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
@@ -184,33 +184,3 @@ const char *SBCommunication::GetBroadcasterClass() {
return Communication::GetStaticBroadcasterClass().AsCString();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBCommunication>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBCommunication, ());
- LLDB_REGISTER_CONSTRUCTOR(SBCommunication, (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBCommunication, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommunication, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBCommunication, GetCloseOnEOF, ());
- LLDB_REGISTER_METHOD(void, SBCommunication, SetCloseOnEOF, (bool));
- LLDB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, Connect,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication,
- AdoptFileDesriptor, (int, bool));
- LLDB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, Disconnect,
- ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCommunication, IsConnected, ());
- LLDB_REGISTER_METHOD(bool, SBCommunication, ReadThreadStart, ());
- LLDB_REGISTER_METHOD(bool, SBCommunication, ReadThreadStop, ());
- LLDB_REGISTER_METHOD(bool, SBCommunication, ReadThreadIsRunning, ());
- LLDB_REGISTER_METHOD(lldb::SBBroadcaster, SBCommunication, GetBroadcaster,
- ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBCommunication,
- GetBroadcasterClass, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index a44d3b8971100..87bbbbed1bdcc 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBCompileUnit.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBLineEntry.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Module.h"
@@ -237,42 +237,3 @@ bool SBCompileUnit::GetDescription(SBStream &description) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBCompileUnit>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBCompileUnit, ());
- LLDB_REGISTER_CONSTRUCTOR(SBCompileUnit, (const lldb::SBCompileUnit &));
- LLDB_REGISTER_METHOD(
- const lldb::SBCompileUnit &,
- SBCompileUnit, operator=,(const lldb::SBCompileUnit &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit, GetFileSpec,
- ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, GetNumLineEntries, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBLineEntry, SBCompileUnit,
- GetLineEntryAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex,
- (uint32_t, uint32_t, lldb::SBFileSpec *));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex,
- (uint32_t, uint32_t, lldb::SBFileSpec *, bool));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, GetNumSupportFiles, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeList, SBCompileUnit, GetTypes, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit,
- GetSupportFileAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBCompileUnit, FindSupportFileIndex,
- (uint32_t, const lldb::SBFileSpec &, bool));
- LLDB_REGISTER_METHOD(lldb::LanguageType, SBCompileUnit, GetLanguage, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCompileUnit, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBCompileUnit, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(
- bool, SBCompileUnit, operator==,(const lldb::SBCompileUnit &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBCompileUnit, operator!=,(const lldb::SBCompileUnit &));
- LLDB_REGISTER_METHOD(bool, SBCompileUnit, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp
index 9fc590578bceb..5022724f303a1 100644
--- a/lldb/source/API/SBData.cpp
+++ b/lldb/source/API/SBData.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBData.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBStream.h"
@@ -665,79 +665,3 @@ bool SBData::SetDataFromDoubleArray(double *array, size_t array_len) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBData>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBData, ());
- LLDB_REGISTER_CONSTRUCTOR(SBData, (const lldb::SBData &));
- LLDB_REGISTER_METHOD(const lldb::SBData &,
- SBData, operator=,(const lldb::SBData &));
- LLDB_REGISTER_METHOD(bool, SBData, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBData, operator bool, ());
- LLDB_REGISTER_METHOD(uint8_t, SBData, GetAddressByteSize, ());
- LLDB_REGISTER_METHOD(void, SBData, SetAddressByteSize, (uint8_t));
- LLDB_REGISTER_METHOD(void, SBData, Clear, ());
- LLDB_REGISTER_METHOD(size_t, SBData, GetByteSize, ());
- LLDB_REGISTER_METHOD(lldb::ByteOrder, SBData, GetByteOrder, ());
- LLDB_REGISTER_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder));
- LLDB_REGISTER_METHOD(float, SBData, GetFloat,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(double, SBData, GetDouble,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(long double, SBData, GetLongDouble,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBData, GetAddress,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(uint8_t, SBData, GetUnsignedInt8,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(uint16_t, SBData, GetUnsignedInt16,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(uint32_t, SBData, GetUnsignedInt32,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(uint64_t, SBData, GetUnsignedInt64,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(int8_t, SBData, GetSignedInt8,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(int16_t, SBData, GetSignedInt16,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(int32_t, SBData, GetSignedInt32,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(int64_t, SBData, GetSignedInt64,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(const char *, SBData, GetString,
- (lldb::SBError &, lldb::offset_t));
- LLDB_REGISTER_METHOD(bool, SBData, GetDescription,
- (lldb::SBStream &, lldb::addr_t));
- LLDB_REGISTER_METHOD(bool, SBData, Append, (const lldb::SBData &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromCString,
- (lldb::ByteOrder, uint32_t, const char *));
- LLDB_REGISTER_STATIC_METHOD(
- lldb::SBData, SBData, CreateDataFromUInt64Array,
- (lldb::ByteOrder, uint32_t, uint64_t *, size_t));
- LLDB_REGISTER_STATIC_METHOD(
- lldb::SBData, SBData, CreateDataFromUInt32Array,
- (lldb::ByteOrder, uint32_t, uint32_t *, size_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt64Array,
- (lldb::ByteOrder, uint32_t, int64_t *, size_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt32Array,
- (lldb::ByteOrder, uint32_t, int32_t *, size_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromDoubleArray,
- (lldb::ByteOrder, uint32_t, double *, size_t));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromCString, (const char *));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromUInt64Array,
- (uint64_t *, size_t));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromUInt32Array,
- (uint32_t *, size_t));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromSInt64Array,
- (int64_t *, size_t));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromSInt32Array,
- (int32_t *, size_t));
- LLDB_REGISTER_METHOD(bool, SBData, SetDataFromDoubleArray,
- (double *, size_t));
-}
-
-}
-}
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index c8522b79ad89e..6c9b647023af9 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "SystemInitializerFull.h"
#include "lldb/API/SBDebugger.h"
@@ -1713,220 +1713,3 @@ void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback,
return m_opaque_sp->SetLoggingCallback(log_callback, baton);
}
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBInputReader>(Registry &R) {
- LLDB_REGISTER_METHOD(void, SBInputReader, SetIsDone, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBInputReader, IsActive, ());
-}
-
-static void SetFileHandleRedirect(SBDebugger *, FILE *, bool) {
- // Do nothing.
-}
-
-static SBError SetFileRedirect(SBDebugger *, SBFile file) { return SBError(); }
-
-static SBError SetFileRedirect(SBDebugger *, FileSP file) { return SBError(); }
-
-template <> void RegisterMethods<SBDebugger>(Registry &R) {
- // Custom implementation.
- R.Register(&invoke<void (SBDebugger::*)(FILE *, bool)>::method<
- &SBDebugger::SetErrorFileHandle>::record,
- &SetFileHandleRedirect);
- R.Register(&invoke<void (SBDebugger::*)(FILE *, bool)>::method<
- &SBDebugger::SetOutputFileHandle>::record,
- &SetFileHandleRedirect);
-
- R.Register(&invoke<SBError (SBDebugger::*)(
- SBFile)>::method<&SBDebugger::SetInputFile>::record,
- &SetFileRedirect);
- R.Register(&invoke<SBError (SBDebugger::*)(
- SBFile)>::method<&SBDebugger::SetOutputFile>::record,
- &SetFileRedirect);
- R.Register(&invoke<SBError (SBDebugger::*)(
- SBFile)>::method<&SBDebugger::SetErrorFile>::record,
- &SetFileRedirect);
-
- R.Register(&invoke<SBError (SBDebugger::*)(
- FileSP)>::method<&SBDebugger::SetInputFile>::record,
- &SetFileRedirect);
- R.Register(&invoke<SBError (SBDebugger::*)(
- FileSP)>::method<&SBDebugger::SetOutputFile>::record,
- &SetFileRedirect);
- R.Register(&invoke<SBError (SBDebugger::*)(
- FileSP)>::method<&SBDebugger::SetErrorFile>::record,
- &SetFileRedirect);
-
- LLDB_REGISTER_CHAR_PTR_METHOD_STATIC(bool, SBDebugger,
- GetDefaultArchitecture);
-
- LLDB_REGISTER_CONSTRUCTOR(SBDebugger, ());
- LLDB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::DebuggerSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::SBDebugger &));
- LLDB_REGISTER_METHOD(lldb::SBDebugger &,
- SBDebugger, operator=,(const lldb::SBDebugger &));
- LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, Initialize, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBError, SBDebugger,
- InitializeWithErrorHandling, ());
- LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, Terminate, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, Clear, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, (bool));
- LLDB_REGISTER_STATIC_METHOD(
- const char *, SBDebugger, GetProgressFromEvent,
- (const lldb::SBEvent &, uint64_t &, uint64_t &, uint64_t &, bool &));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBDebugger, GetBroadcasterClass,
- ());
- LLDB_REGISTER_METHOD(SBBroadcaster, SBDebugger, GetBroadcaster, ());
- LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &));
- LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, MemoryPressureDetected, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, operator bool,());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetAsync, (bool));
- LLDB_REGISTER_METHOD(bool, SBDebugger, GetAsync, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SkipLLDBInitFiles, (bool));
- LLDB_REGISTER_METHOD(void, SBDebugger, SkipAppInitFiles, (bool));
- LLDB_REGISTER_METHOD(SBError, SBDebugger, SetInputString, (const char *));
- LLDB_REGISTER_METHOD(void, SBDebugger, SetInputFileHandle, (FILE *, bool));
- LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetInputFileHandle, ());
- LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetOutputFileHandle, ());
- LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetErrorFileHandle, ());
- LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetInputFile, ());
- LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetOutputFile, ());
- LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetErrorFile, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SaveInputTerminalState, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, RestoreInputTerminalState, ());
- LLDB_REGISTER_METHOD(lldb::SBCommandInterpreter, SBDebugger,
- GetCommandInterpreter, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, HandleCommand, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBListener, SBDebugger, GetListener, ());
- LLDB_REGISTER_METHOD(
- void, SBDebugger, HandleProcessEvent,
- (const lldb::SBProcess &, const lldb::SBEvent &, FILE *, FILE *));
- LLDB_REGISTER_METHOD(
- void, SBDebugger, HandleProcessEvent,
- (const lldb::SBProcess &, const lldb::SBEvent &, SBFile, SBFile));
- LLDB_REGISTER_METHOD(
- void, SBDebugger, HandleProcessEvent,
- (const lldb::SBProcess &, const lldb::SBEvent &, FileSP, FileSP));
- LLDB_REGISTER_METHOD(lldb::SBSourceManager, SBDebugger, GetSourceManager, ());
- LLDB_REGISTER_STATIC_METHOD(bool, SBDebugger, SetDefaultArchitecture,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::ScriptLanguage, SBDebugger, GetScriptingLanguage,
- (const char *));
- LLDB_REGISTER_METHOD(SBStructuredData, SBDebugger, GetScriptInterpreterInfo,
- (lldb::ScriptLanguage));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBDebugger, GetVersionString, ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBDebugger, StateAsCString,
- (lldb::StateType));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBStructuredData, SBDebugger,
- GetBuildConfiguration, ());
- LLDB_REGISTER_STATIC_METHOD(bool, SBDebugger, StateIsRunningState,
- (lldb::StateType));
- LLDB_REGISTER_STATIC_METHOD(bool, SBDebugger, StateIsStoppedState,
- (lldb::StateType));
- LLDB_REGISTER_METHOD(
- lldb::SBTarget, SBDebugger, CreateTarget,
- (const char *, const char *, const char *, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger,
- CreateTargetWithFileAndTargetTriple,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTargetWithFileAndArch,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTarget,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetDummyTarget, ());
- LLDB_REGISTER_METHOD(bool, SBDebugger, DeleteTarget, (lldb::SBTarget &));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetTargetAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetIndexOfTarget,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithProcessID,
- (lldb::pid_t));
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithFileAndArch,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumTargets, ());
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetSelectedTarget, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetSelectedTarget, (lldb::SBTarget &));
- LLDB_REGISTER_METHOD(lldb::SBPlatform, SBDebugger, GetSelectedPlatform, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetSelectedPlatform,
- (lldb::SBPlatform &));
- LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumPlatforms, ());
- LLDB_REGISTER_METHOD(lldb::SBPlatform, SBDebugger, GetPlatformAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumAvailablePlatforms, ());
- LLDB_REGISTER_METHOD(lldb::SBStructuredData, SBDebugger,
- GetAvailablePlatformInfoAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBDebugger, DispatchInputInterrupt, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, DispatchInputEndOfFile, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, PushInputReader,
- (lldb::SBInputReader &));
- LLDB_REGISTER_METHOD(void, SBDebugger, RunCommandInterpreter, (bool, bool));
- LLDB_REGISTER_METHOD(void, SBDebugger, RunCommandInterpreter,
- (bool, bool, lldb::SBCommandInterpreterRunOptions &,
- int &, bool &, bool &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBDebugger, RunREPL,
- (lldb::LanguageType, const char *));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, FindDebuggerWithID,
- (int));
- LLDB_REGISTER_METHOD(const char *, SBDebugger, GetInstanceName, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBError, SBDebugger, SetInternalVariable,
- (const char *, const char *, const char *));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBStringList, SBDebugger,
- GetInternalVariableValue,
- (const char *, const char *));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBDebugger, GetTerminalWidth, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(const char *, SBDebugger, GetPrompt, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetPrompt, (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBDebugger, GetReproducerPath, ());
- LLDB_REGISTER_METHOD_CONST(lldb::ScriptLanguage, SBDebugger,
- GetScriptLanguage, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetScriptLanguage,
- (lldb::ScriptLanguage));
- LLDB_REGISTER_METHOD_CONST(lldb::LanguageType, SBDebugger, GetREPLLanguage,
- ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetREPLLanguage, (lldb::LanguageType));
- LLDB_REGISTER_METHOD(bool, SBDebugger, SetUseExternalEditor, (bool));
- LLDB_REGISTER_METHOD(bool, SBDebugger, GetUseExternalEditor, ());
- LLDB_REGISTER_METHOD(bool, SBDebugger, SetUseColor, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, GetUseColor, ());
- LLDB_REGISTER_METHOD(bool, SBDebugger, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::user_id_t, SBDebugger, GetID, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBDebugger, SetCurrentPlatform,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBDebugger, SetCurrentPlatformSDKRoot,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, GetCloseInputOnEOF, ());
- LLDB_REGISTER_METHOD(void, SBDebugger, SetCloseInputOnEOF, (bool));
- LLDB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory,
- (lldb::LanguageType));
- LLDB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, CreateCategory,
- (const char *));
- LLDB_REGISTER_METHOD(bool, SBDebugger, DeleteCategory, (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumCategories, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategoryAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetDefaultCategory,
- ());
- LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBDebugger, GetFormatForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBDebugger, GetSummaryForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBDebugger, GetSyntheticForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(bool, SBDebugger, EnableLog,
- (const char *, const char **));
- LLDB_REGISTER_METHOD(lldb::SBCommandInterpreterRunResult, SBDebugger,
- RunCommandInterpreter,
- (const lldb::SBCommandInterpreterRunOptions &));
-}
-
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp
index f44e55af331ab..de9daa0baca98 100644
--- a/lldb/source/API/SBDeclaration.cpp
+++ b/lldb/source/API/SBDeclaration.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBDeclaration.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Declaration.h"
@@ -174,33 +174,3 @@ bool SBDeclaration::GetDescription(SBStream &description) {
}
lldb_private::Declaration *SBDeclaration::get() { return m_opaque_up.get(); }
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBDeclaration>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBDeclaration, ());
- LLDB_REGISTER_CONSTRUCTOR(SBDeclaration, (const lldb::SBDeclaration &));
- LLDB_REGISTER_METHOD(
- const lldb::SBDeclaration &,
- SBDeclaration, operator=,(const lldb::SBDeclaration &));
- LLDB_REGISTER_METHOD_CONST(bool, SBDeclaration, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBDeclaration, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBDeclaration, GetFileSpec,
- ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBDeclaration, GetLine, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBDeclaration, GetColumn, ());
- LLDB_REGISTER_METHOD(void, SBDeclaration, SetFileSpec, (lldb::SBFileSpec));
- LLDB_REGISTER_METHOD(void, SBDeclaration, SetLine, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBDeclaration, SetColumn, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBDeclaration, operator==,(const lldb::SBDeclaration &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBDeclaration, operator!=,(const lldb::SBDeclaration &));
- LLDB_REGISTER_METHOD(bool, SBDeclaration, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBEnvironment.cpp b/lldb/source/API/SBEnvironment.cpp
index d4de89c325675..88bb04ae4a05a 100644
--- a/lldb/source/API/SBEnvironment.cpp
+++ b/lldb/source/API/SBEnvironment.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBEnvironment.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStringList.h"
#include "lldb/Utility/ConstString.h"
@@ -130,26 +130,3 @@ void SBEnvironment::Clear() {
}
Environment &SBEnvironment::ref() const { return *m_opaque_up; }
-
-namespace lldb_private {
-namespace repro {
-template <> void RegisterMethods<SBEnvironment>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBEnvironment, ());
- LLDB_REGISTER_CONSTRUCTOR(SBEnvironment, (const lldb::SBEnvironment &));
- LLDB_REGISTER_METHOD(const lldb::SBEnvironment &,
- SBEnvironment, operator=,(const lldb::SBEnvironment &));
- LLDB_REGISTER_METHOD(size_t, SBEnvironment, GetNumValues, ());
- LLDB_REGISTER_METHOD(const char *, SBEnvironment, Get, (const char *));
- LLDB_REGISTER_METHOD(const char *, SBEnvironment, GetNameAtIndex, (size_t));
- LLDB_REGISTER_METHOD(const char *, SBEnvironment, GetValueAtIndex, (size_t));
- LLDB_REGISTER_METHOD(bool, SBEnvironment, Set,
- (const char *, const char *, bool));
- LLDB_REGISTER_METHOD(bool, SBEnvironment, Unset, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBStringList, SBEnvironment, GetEntries, ());
- LLDB_REGISTER_METHOD(void, SBEnvironment, PutEntry, (const char *));
- LLDB_REGISTER_METHOD(void, SBEnvironment, SetEntries,
- (const lldb::SBStringList &, bool));
- LLDB_REGISTER_METHOD(void, SBEnvironment, Clear, ());
-}
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBError.cpp b/lldb/source/API/SBError.cpp
index d80183c4200af..a65a2b626c4de 100644
--- a/lldb/source/API/SBError.cpp
+++ b/lldb/source/API/SBError.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBError.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Utility/Status.h"
@@ -183,30 +183,3 @@ bool SBError::GetDescription(SBStream &description) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBError>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBError, ());
- LLDB_REGISTER_CONSTRUCTOR(SBError, (const lldb::SBError &));
- LLDB_REGISTER_METHOD(const lldb::SBError &,
- SBError, operator=,(const lldb::SBError &));
- LLDB_REGISTER_METHOD_CONST(const char *, SBError, GetCString, ());
- LLDB_REGISTER_METHOD(void, SBError, Clear, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBError, Fail, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBError, Success, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBError, GetError, ());
- LLDB_REGISTER_METHOD_CONST(lldb::ErrorType, SBError, GetType, ());
- LLDB_REGISTER_METHOD(void, SBError, SetError, (uint32_t, lldb::ErrorType));
- LLDB_REGISTER_METHOD(void, SBError, SetErrorToErrno, ());
- LLDB_REGISTER_METHOD(void, SBError, SetErrorToGenericError, ());
- LLDB_REGISTER_METHOD(void, SBError, SetErrorString, (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBError, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBError, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBError, GetDescription, (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp
index f34dd17d6c9e8..c541176f937ac 100644
--- a/lldb/source/API/SBEvent.cpp
+++ b/lldb/source/API/SBEvent.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBEvent.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBStream.h"
@@ -204,37 +204,3 @@ bool SBEvent::GetDescription(SBStream &description) const {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBEvent>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBEvent, ());
- LLDB_REGISTER_CONSTRUCTOR(SBEvent, (uint32_t, const char *, uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBEvent, (lldb::EventSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBEvent, (lldb_private::Event *));
- LLDB_REGISTER_CONSTRUCTOR(SBEvent, (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD(const lldb::SBEvent &,
- SBEvent, operator=,(const lldb::SBEvent &));
- LLDB_REGISTER_METHOD(const char *, SBEvent, GetDataFlavor, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBEvent, GetType, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBEvent, GetBroadcaster,
- ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBEvent, GetBroadcasterClass, ());
- LLDB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesPtr,
- (const lldb::SBBroadcaster *));
- LLDB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesRef,
- (const lldb::SBBroadcaster &));
- LLDB_REGISTER_METHOD(void, SBEvent, Clear, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBEvent, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBEvent, operator bool, ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBEvent, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(bool, SBEvent, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBExecutionContext.cpp b/lldb/source/API/SBExecutionContext.cpp
index 8ebb152b7063a..2869bef729e86 100644
--- a/lldb/source/API/SBExecutionContext.cpp
+++ b/lldb/source/API/SBExecutionContext.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBExecutionContext.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBFrame.h"
#include "lldb/API/SBProcess.h"
@@ -131,32 +131,3 @@ SBFrame SBExecutionContext::GetFrame() const {
}
return LLDB_RECORD_RESULT(sb_frame);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBExecutionContext>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext, ());
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext,
- (const lldb::SBExecutionContext &));
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext,
- (lldb::ExecutionContextRefSP));
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBTarget &));
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBProcess &));
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext, (lldb::SBThread));
- LLDB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBFrame &));
- LLDB_REGISTER_METHOD(
- const lldb::SBExecutionContext &,
- SBExecutionContext, operator=,(const lldb::SBExecutionContext &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBTarget, SBExecutionContext, GetTarget,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBProcess, SBExecutionContext, GetProcess,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBExecutionContext, GetThread,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFrame, SBExecutionContext, GetFrame, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index 2c966b2ca4869..8bcc9cec258f8 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBExpressionOptions.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Target/Target.h"
@@ -283,69 +283,3 @@ EvaluateExpressionOptions *SBExpressionOptions::get() const {
EvaluateExpressionOptions &SBExpressionOptions::ref() const {
return *(m_opaque_up.get());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBExpressionOptions>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBExpressionOptions, ());
- LLDB_REGISTER_CONSTRUCTOR(SBExpressionOptions,
- (const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD(
- const lldb::SBExpressionOptions &,
- SBExpressionOptions, operator=,(const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetCoerceResultToId,
- ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetCoerceResultToId,
- (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetUnwindOnError, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetUnwindOnError, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetIgnoreBreakpoints,
- ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetIgnoreBreakpoints,
- (bool));
- LLDB_REGISTER_METHOD_CONST(lldb::DynamicValueType, SBExpressionOptions,
- GetFetchDynamicValue, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetFetchDynamicValue,
- (lldb::DynamicValueType));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions,
- GetTimeoutInMicroSeconds, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTimeoutInMicroSeconds,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions,
- GetOneThreadTimeoutInMicroSeconds, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions,
- SetOneThreadTimeoutInMicroSeconds, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTryAllThreads, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTryAllThreads, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetStopOthers, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetStopOthers, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTrapExceptions,
- ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTrapExceptions, (bool));
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetLanguage,
- (lldb::LanguageType));
- LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetGenerateDebugInfo, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetGenerateDebugInfo,
- (bool));
- LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetSuppressPersistentResult,
- ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetSuppressPersistentResult,
- (bool));
- LLDB_REGISTER_METHOD_CONST(const char *, SBExpressionOptions, GetPrefix,
- ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetPrefix, (const char *));
- LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetAutoApplyFixIts, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetAutoApplyFixIts, (bool));
- LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetTopLevel, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTopLevel, (bool));
- LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetAllowJIT, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetAllowJIT, (bool));
- LLDB_REGISTER_METHOD(uint64_t, SBExpressionOptions, GetRetriesWithFixIts, ());
- LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetRetriesWithFixIts,
- (uint64_t));
-}
-
-}
-}
diff --git a/lldb/source/API/SBFile.cpp b/lldb/source/API/SBFile.cpp
index 41ccdbe76b91a..a6249dddd9a6b 100644
--- a/lldb/source/API/SBFile.cpp
+++ b/lldb/source/API/SBFile.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBFile.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBError.h"
#include "lldb/Host/File.h"
@@ -132,27 +132,3 @@ FileSP SBFile::GetFile() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(FileSP, SBFile, GetFile);
return LLDB_RECORD_RESULT(m_opaque_sp);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBFile>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFile, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFile, (FileSP));
- LLDB_REGISTER_CONSTRUCTOR(SBFile, (const SBFile&));
- LLDB_REGISTER_CONSTRUCTOR(SBFile, (FILE *, bool));
- LLDB_REGISTER_CONSTRUCTOR(SBFile, (int, const char *, bool));
- LLDB_REGISTER_METHOD(SBFile&, SBFile, operator=,(const SBFile&));
- LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Flush, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Read,
- (uint8_t *, size_t, size_t *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Write,
- (const uint8_t *, size_t, size_t *));
- LLDB_REGISTER_METHOD_CONST(bool, SBFile, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator bool,());
- LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator!,());
- LLDB_REGISTER_METHOD_CONST(FileSP, SBFile, GetFile, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Close, ());
-}
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index 2b9e2d002eddd..b435db0cd3632 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBFileSpec.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Host/FileSystem.h"
@@ -187,37 +187,3 @@ void SBFileSpec::AppendPathComponent(const char *fn) {
m_opaque_up->AppendPathComponent(fn);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBFileSpec>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const lldb::SBFileSpec &));
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *, bool));
- LLDB_REGISTER_METHOD(const lldb::SBFileSpec &,
- SBFileSpec, operator=,(const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFileSpec, operator==,(const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFileSpec, operator!=,(const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, Exists, ());
- LLDB_REGISTER_METHOD(bool, SBFileSpec, ResolveExecutableLocation, ());
- LLDB_REGISTER_STATIC_METHOD(int, SBFileSpec, ResolvePath,
- (const char *, char *, size_t));
- LLDB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetFilename, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetDirectory, ());
- LLDB_REGISTER_METHOD(void, SBFileSpec, SetFilename, (const char *));
- LLDB_REGISTER_METHOD(void, SBFileSpec, SetDirectory, (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBFileSpec, AppendPathComponent, (const char *));
- LLDB_REGISTER_CHAR_PTR_METHOD_CONST(uint32_t, SBFileSpec, GetPath);
-}
-
-}
-}
diff --git a/lldb/source/API/SBFileSpecList.cpp b/lldb/source/API/SBFileSpecList.cpp
index 8f20aed7e8510..44c0dcace91d1 100644
--- a/lldb/source/API/SBFileSpecList.cpp
+++ b/lldb/source/API/SBFileSpecList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBFileSpecList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBStream.h"
@@ -122,30 +122,3 @@ bool SBFileSpecList::GetDescription(SBStream &description) const {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBFileSpecList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpecList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFileSpecList, (const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(
- const lldb::SBFileSpecList &,
- SBFileSpecList, operator=,(const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBFileSpecList, GetSize, ());
- LLDB_REGISTER_METHOD(void, SBFileSpecList, Append,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(bool, SBFileSpecList, AppendIfUnique,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(void, SBFileSpecList, Clear, ());
- LLDB_REGISTER_METHOD(uint32_t, SBFileSpecList, FindFileIndex,
- (uint32_t, const lldb::SBFileSpec &, bool));
- LLDB_REGISTER_METHOD_CONST(const lldb::SBFileSpec, SBFileSpecList,
- GetFileSpecAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(bool, SBFileSpecList, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index ba9b268be83f4..32a563e3ae869 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -14,7 +14,7 @@
#include "lldb/lldb-types.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/StreamFile.h"
@@ -1269,82 +1269,3 @@ const char *SBFrame::GetDisplayFunctionName() {
}
return name;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBFrame>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::SBFrame &));
- LLDB_REGISTER_METHOD(const lldb::SBFrame &,
- SBFrame, operator=,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBModule, SBFrame, GetModule, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBCompileUnit, SBFrame, GetCompileUnit,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFunction, SBFrame, GetFunction, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBSymbol, SBFrame, GetSymbol, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetBlock, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetFrameBlock, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBLineEntry, SBFrame, GetLineEntry, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBFrame, GetFrameID, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetCFA, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetPC, ());
- LLDB_REGISTER_METHOD(bool, SBFrame, SetPC, (lldb::addr_t));
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetSP, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetFP, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBFrame, GetPCAddress, ());
- LLDB_REGISTER_METHOD(void, SBFrame, Clear, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType));
- LLDB_REGISTER_METHOD(
- lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsEqual, (const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFrame, operator==,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFrame, operator!=,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBFrame, GetThread, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFrame, Disassemble, ());
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (const lldb::SBVariablesOptions &));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetRegisters, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *));
- LLDB_REGISTER_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType, bool));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD(bool, SBFrame, IsInlined, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsInlined, ());
- LLDB_REGISTER_METHOD(bool, SBFrame, IsArtificial, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsArtificial, ());
- LLDB_REGISTER_METHOD(const char *, SBFrame, GetFunctionName, ());
- LLDB_REGISTER_METHOD_CONST(lldb::LanguageType, SBFrame, GuessLanguage, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFrame, GetFunctionName, ());
- LLDB_REGISTER_METHOD(const char *, SBFrame, GetDisplayFunctionName, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index 2d0cb239de756..a682cdce491a5 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBFunction.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Disassembler.h"
@@ -235,39 +235,3 @@ bool SBFunction::GetIsOptimized() {
}
return false;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBFunction>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFunction, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFunction, (const lldb::SBFunction &));
- LLDB_REGISTER_METHOD(const lldb::SBFunction &,
- SBFunction, operator=,(const lldb::SBFunction &));
- LLDB_REGISTER_METHOD_CONST(bool, SBFunction, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFunction, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetName, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetDisplayName, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetMangledName, ());
- LLDB_REGISTER_METHOD_CONST(
- bool, SBFunction, operator==,(const lldb::SBFunction &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBFunction, operator!=,(const lldb::SBFunction &));
- LLDB_REGISTER_METHOD(bool, SBFunction, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions,
- (lldb::SBTarget, const char *));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBFunction, GetStartAddress, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBFunction, GetEndAddress, ());
- LLDB_REGISTER_METHOD(const char *, SBFunction, GetArgumentName, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBFunction, GetPrologueByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBFunction, GetType, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBFunction, GetBlock, ());
- LLDB_REGISTER_METHOD(lldb::LanguageType, SBFunction, GetLanguage, ());
- LLDB_REGISTER_METHOD(bool, SBFunction, GetIsOptimized, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index deca4ac81a1af..d77b50f19236a 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBHostOS.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBError.h"
#include "lldb/Host/Config.h"
#include "lldb/Host/FileSystem.h"
@@ -173,22 +173,3 @@ bool SBHostOS::ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result,
host_thread.Release();
return error.Success();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBHostOS>(Registry &R) {
- LLDB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetProgramFileSpec,
- ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetLLDBPythonPath,
- ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetLLDBPath,
- (lldb::PathType));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS,
- GetUserHomeDirectory, ());
- LLDB_REGISTER_STATIC_METHOD(void, SBHostOS, ThreadCreated, (const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index b845d3c50c440..789780643cd05 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBInstruction.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFrame.h"
@@ -341,43 +341,3 @@ bool SBInstruction::TestEmulation(lldb::SBStream &output_stream,
return inst_sp->TestEmulation(output_stream.get(), test_file);
return false;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBInstruction>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBInstruction, ());
- LLDB_REGISTER_CONSTRUCTOR(SBInstruction, (const lldb::SBInstruction &));
- LLDB_REGISTER_METHOD(
- const lldb::SBInstruction &,
- SBInstruction, operator=,(const lldb::SBInstruction &));
- LLDB_REGISTER_METHOD(bool, SBInstruction, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBInstruction, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBInstruction, GetAddress, ());
- LLDB_REGISTER_METHOD(const char *, SBInstruction, GetMnemonic,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(const char *, SBInstruction, GetOperands,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(const char *, SBInstruction, GetComment,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(size_t, SBInstruction, GetByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SBData, SBInstruction, GetData,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(bool, SBInstruction, DoesBranch, ());
- LLDB_REGISTER_METHOD(bool, SBInstruction, HasDelaySlot, ());
- LLDB_REGISTER_METHOD(bool, SBInstruction, CanSetBreakpoint, ());
- LLDB_REGISTER_METHOD(bool, SBInstruction, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBInstruction, Print, (FILE *));
- LLDB_REGISTER_METHOD(void, SBInstruction, Print, (SBFile));
- LLDB_REGISTER_METHOD(void, SBInstruction, Print, (FileSP));
- LLDB_REGISTER_METHOD(bool, SBInstruction, EmulateWithFrame,
- (lldb::SBFrame &, uint32_t));
- LLDB_REGISTER_METHOD(bool, SBInstruction, DumpEmulation, (const char *));
- LLDB_REGISTER_METHOD(bool, SBInstruction, TestEmulation,
- (lldb::SBStream &, const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index 859f5212c355c..6138f0cf69d09 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBInstructionList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBInstruction.h"
#include "lldb/API/SBStream.h"
@@ -198,37 +198,3 @@ bool SBInstructionList::DumpEmulationForAllInstructions(const char *triple) {
}
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBInstructionList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBInstructionList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBInstructionList,
- (const lldb::SBInstructionList &));
- LLDB_REGISTER_METHOD(
- const lldb::SBInstructionList &,
- SBInstructionList, operator=,(const lldb::SBInstructionList &));
- LLDB_REGISTER_METHOD_CONST(bool, SBInstructionList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBInstructionList, operator bool, ());
- LLDB_REGISTER_METHOD(size_t, SBInstructionList, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBInstruction, SBInstructionList,
- GetInstructionAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(
- size_t, SBInstructionList, GetInstructionsCount,
- (const lldb::SBAddress &, const lldb::SBAddress &, bool));
- LLDB_REGISTER_METHOD(void, SBInstructionList, Clear, ());
- LLDB_REGISTER_METHOD(void, SBInstructionList, AppendInstruction,
- (lldb::SBInstruction));
- LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (FILE *));
- LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (SBFile));
- LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (FileSP));
- LLDB_REGISTER_METHOD(bool, SBInstructionList, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(bool, SBInstructionList,
- DumpEmulationForAllInstructions, (const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBLanguageRuntime.cpp b/lldb/source/API/SBLanguageRuntime.cpp
index e65b58270517d..781c985fc042b 100644
--- a/lldb/source/API/SBLanguageRuntime.cpp
+++ b/lldb/source/API/SBLanguageRuntime.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBLanguageRuntime.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Target/Language.h"
using namespace lldb;
@@ -29,17 +29,3 @@ SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language) {
return Language::GetNameForLanguageType(language);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBLanguageRuntime>(Registry &R) {
- LLDB_REGISTER_STATIC_METHOD(lldb::LanguageType, SBLanguageRuntime,
- GetLanguageTypeFromString, (const char *));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBLanguageRuntime,
- GetNameForLanguageType, (lldb::LanguageType));
-}
-
-}
-}
diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp
index 95d9a1d935cc8..a44e9bbdbb5de 100644
--- a/lldb/source/API/SBLaunchInfo.cpp
+++ b/lldb/source/API/SBLaunchInfo.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBLaunchInfo.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBEnvironment.h"
#include "lldb/API/SBError.h"
@@ -394,79 +394,3 @@ void SBLaunchInfo::SetScriptedProcessDictionary(lldb::SBStructuredData dict) {
m_opaque_sp->SetScriptedProcessDictionarySP(dict_sp);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBLaunchInfo>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBLaunchInfo, (const char **));
- LLDB_REGISTER_CONSTRUCTOR(SBLaunchInfo, (const lldb::SBLaunchInfo &));
- LLDB_REGISTER_METHOD(SBLaunchInfo &,
- SBLaunchInfo, operator=,(const lldb::SBLaunchInfo &));
- LLDB_REGISTER_METHOD(lldb::pid_t, SBLaunchInfo, GetProcessID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetUserID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetGroupID, ());
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, UserIDIsValid, ());
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, GroupIDIsValid, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetUserID, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetGroupID, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBLaunchInfo, GetExecutableFile, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetExecutableFile,
- (lldb::SBFileSpec, bool));
- LLDB_REGISTER_METHOD(lldb::SBListener, SBLaunchInfo, GetListener, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetListener, (lldb::SBListener &));
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetNumArguments, ());
- LLDB_REGISTER_METHOD(const char *, SBLaunchInfo, GetArgumentAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetArguments,
- (const char **, bool));
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetNumEnvironmentEntries, ());
- LLDB_REGISTER_METHOD(const char *, SBLaunchInfo, GetEnvironmentEntryAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetEnvironmentEntries,
- (const char **, bool));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, Clear, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBLaunchInfo, GetWorkingDirectory,
- ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetWorkingDirectory,
- (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetLaunchFlags, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetLaunchFlags, (uint32_t));
- LLDB_REGISTER_METHOD(const char *, SBLaunchInfo, GetProcessPluginName, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetProcessPluginName,
- (const char *));
- LLDB_REGISTER_METHOD(const char *, SBLaunchInfo, GetShell, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetShell, (const char *));
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, GetShellExpandArguments, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetShellExpandArguments, (bool));
- LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetResumeCount, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetResumeCount, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, AddCloseFileAction, (int));
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, AddDuplicateFileAction,
- (int, int));
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, AddOpenFileAction,
- (int, const char *, bool, bool));
- LLDB_REGISTER_METHOD(bool, SBLaunchInfo, AddSuppressFileAction,
- (int, bool, bool));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetLaunchEventData,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(const char *, SBLaunchInfo, GetLaunchEventData,
- ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetDetachOnError, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBLaunchInfo, GetDetachOnError, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBLaunchInfo,
- GetScriptedProcessClassName, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetScriptedProcessClassName,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(lldb::SBStructuredData, SBLaunchInfo,
- GetScriptedProcessDictionary, ());
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetScriptedProcessDictionary,
- (lldb::SBStructuredData));
- LLDB_REGISTER_METHOD(void, SBLaunchInfo, SetEnvironment,
- (const lldb::SBEnvironment &, bool));
- LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBLaunchInfo, GetEnvironment, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 0221b19f5bdfa..0776d74bc5328 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBLineEntry.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Host/PosixApi.h"
@@ -185,33 +185,3 @@ bool SBLineEntry::GetDescription(SBStream &description) {
}
lldb_private::LineEntry *SBLineEntry::get() { return m_opaque_up.get(); }
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBLineEntry>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBLineEntry, ());
- LLDB_REGISTER_CONSTRUCTOR(SBLineEntry, (const lldb::SBLineEntry &));
- LLDB_REGISTER_METHOD(const lldb::SBLineEntry &,
- SBLineEntry, operator=,(const lldb::SBLineEntry &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBLineEntry, GetStartAddress,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBLineEntry, GetEndAddress, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBLineEntry, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBLineEntry, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBLineEntry, GetFileSpec, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetLine, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetColumn, ());
- LLDB_REGISTER_METHOD(void, SBLineEntry, SetFileSpec, (lldb::SBFileSpec));
- LLDB_REGISTER_METHOD(void, SBLineEntry, SetLine, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBLineEntry, SetColumn, (uint32_t));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBLineEntry, operator==,(const lldb::SBLineEntry &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBLineEntry, operator!=,(const lldb::SBLineEntry &));
- LLDB_REGISTER_METHOD(bool, SBLineEntry, GetDescription, (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp
index da5c010befcf2..34f9ae6a0231f 100644
--- a/lldb/source/API/SBListener.cpp
+++ b/lldb/source/API/SBListener.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBListener.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBEvent.h"
@@ -320,52 +320,3 @@ void SBListener::reset(ListenerSP listener_sp) {
m_opaque_sp = listener_sp;
m_unused_ptr = nullptr;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBListener>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBListener, ());
- LLDB_REGISTER_CONSTRUCTOR(SBListener, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBListener, (const lldb::SBListener &));
- LLDB_REGISTER_METHOD(const lldb::SBListener &,
- SBListener, operator=,(const lldb::SBListener &));
- LLDB_REGISTER_METHOD_CONST(bool, SBListener, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBListener, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBListener, AddEvent, (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD(void, SBListener, Clear, ());
- LLDB_REGISTER_METHOD(uint32_t, SBListener, StartListeningForEventClass,
- (lldb::SBDebugger &, const char *, uint32_t));
- LLDB_REGISTER_METHOD(bool, SBListener, StopListeningForEventClass,
- (lldb::SBDebugger &, const char *, uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBListener, StartListeningForEvents,
- (const lldb::SBBroadcaster &, uint32_t));
- LLDB_REGISTER_METHOD(bool, SBListener, StopListeningForEvents,
- (const lldb::SBBroadcaster &, uint32_t));
- LLDB_REGISTER_METHOD(bool, SBListener, WaitForEvent,
- (uint32_t, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(
- bool, SBListener, WaitForEventForBroadcaster,
- (uint32_t, const lldb::SBBroadcaster &, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(
- bool, SBListener, WaitForEventForBroadcasterWithType,
- (uint32_t, const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBListener, PeekAtNextEvent, (lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBListener, PeekAtNextEventForBroadcaster,
- (const lldb::SBBroadcaster &, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(
- bool, SBListener, PeekAtNextEventForBroadcasterWithType,
- (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBListener, GetNextEvent, (lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBListener, GetNextEventForBroadcaster,
- (const lldb::SBBroadcaster &, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(
- bool, SBListener, GetNextEventForBroadcasterWithType,
- (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &));
- LLDB_REGISTER_METHOD(bool, SBListener, HandleBroadcastEvent,
- (const lldb::SBEvent &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBMemoryRegionInfo.cpp b/lldb/source/API/SBMemoryRegionInfo.cpp
index 9a01faf3daa37..9dd1da72c801d 100644
--- a/lldb/source/API/SBMemoryRegionInfo.cpp
+++ b/lldb/source/API/SBMemoryRegionInfo.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBMemoryRegionInfo.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBError.h"
@@ -186,42 +186,3 @@ bool SBMemoryRegionInfo::GetDescription(SBStream &description) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBMemoryRegionInfo>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfo, ());
- LLDB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfo,
- (const lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_CONSTRUCTOR(
- SBMemoryRegionInfo,
- (const char *, lldb::addr_t, lldb::addr_t, uint32_t, bool, bool));
- LLDB_REGISTER_METHOD(
- const lldb::SBMemoryRegionInfo &,
- SBMemoryRegionInfo, operator=,(const lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(void, SBMemoryRegionInfo, Clear, ());
- LLDB_REGISTER_METHOD_CONST(
- bool,
- SBMemoryRegionInfo, operator==,(const lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD_CONST(
- bool,
- SBMemoryRegionInfo, operator!=,(const lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetRegionBase, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetRegionEnd, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsReadable, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsWritable, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsExecutable, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsMapped, ());
- LLDB_REGISTER_METHOD(const char *, SBMemoryRegionInfo, GetName, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, HasDirtyMemoryPageList, ());
- LLDB_REGISTER_METHOD(uint32_t, SBMemoryRegionInfo, GetNumDirtyPages, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetDirtyPageAddressAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(int, SBMemoryRegionInfo, GetPageSize, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBMemoryRegionInfoList.cpp b/lldb/source/API/SBMemoryRegionInfoList.cpp
index cd8fc00ffce06..241b40aefb69f 100644
--- a/lldb/source/API/SBMemoryRegionInfoList.cpp
+++ b/lldb/source/API/SBMemoryRegionInfoList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBMemoryRegionInfoList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBMemoryRegionInfo.h"
#include "lldb/API/SBStream.h"
#include "lldb/Target/MemoryRegionInfo.h"
@@ -159,31 +159,3 @@ const MemoryRegionInfoListImpl &SBMemoryRegionInfoList::operator*() const {
assert(m_opaque_up.get());
return *m_opaque_up;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBMemoryRegionInfoList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfoList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfoList,
- (const lldb::SBMemoryRegionInfoList &));
- LLDB_REGISTER_METHOD(
- const lldb::SBMemoryRegionInfoList &,
- SBMemoryRegionInfoList, operator=,(
- const lldb::SBMemoryRegionInfoList &));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBMemoryRegionInfoList, GetSize, ());
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfoList,
- GetMemoryRegionContainingAddress,
- (lldb::addr_t, lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfoList, GetMemoryRegionAtIndex,
- (uint32_t, lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Clear, ());
- LLDB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Append,
- (lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Append,
- (lldb::SBMemoryRegionInfoList &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index ed17e8fdc9c35..defb08f42250e 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBModule.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBModuleSpec.h"
@@ -695,79 +695,3 @@ void SBModule::GarbageCollectAllocatedModules() {
const bool mandatory = false;
ModuleList::RemoveOrphanSharedModules(mandatory);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBModule>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBModule, ());
- LLDB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModuleSpec &));
- LLDB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModule &));
- LLDB_REGISTER_CONSTRUCTOR(SBModule, (lldb::SBProcess &, lldb::addr_t));
- LLDB_REGISTER_METHOD(const lldb::SBModule &, SBModule, operator=,
- (const lldb::SBModule &));
- LLDB_REGISTER_METHOD_CONST(bool, SBModule, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBModule, Clear, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetFileSpec, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetPlatformFileSpec,
- ());
- LLDB_REGISTER_METHOD(bool, SBModule, SetPlatformFileSpec,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModule, GetRemoteInstallFileSpec,
- ());
- LLDB_REGISTER_METHOD(bool, SBModule, SetRemoteInstallFileSpec,
- (lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD_CONST(const char *, SBModule, GetUUIDString, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator==,
- (const lldb::SBModule &));
- LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator!=,
- (const lldb::SBModule &));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBModule, ResolveFileAddress,
- (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBModule,
- ResolveSymbolContextForAddress,
- (const lldb::SBAddress &, uint32_t));
- LLDB_REGISTER_METHOD(bool, SBModule, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(uint32_t, SBModule, GetNumCompileUnits, ());
- LLDB_REGISTER_METHOD(lldb::SBCompileUnit, SBModule, GetCompileUnitAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindCompileUnits,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(size_t, SBModule, GetNumSymbols, ());
- LLDB_REGISTER_METHOD(lldb::SBSymbol, SBModule, GetSymbolAtIndex, (size_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbol, SBModule, FindSymbol,
- (const char *, lldb::SymbolType));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindSymbols,
- (const char *, lldb::SymbolType));
- LLDB_REGISTER_METHOD(size_t, SBModule, GetNumSections, ());
- LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, GetSectionAtIndex, (size_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindFunctions,
- (const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBModule, FindGlobalVariables,
- (lldb::SBTarget &, const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBModule, FindFirstGlobalVariable,
- (lldb::SBTarget &, const char *));
- LLDB_REGISTER_METHOD(lldb::SBType, SBModule, FindFirstType, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetBasicType, (lldb::BasicType));
- LLDB_REGISTER_METHOD(lldb::SBTypeList, SBModule, FindTypes, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetTypeByID, (lldb::user_id_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeList, SBModule, GetTypes, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, FindSection, (const char *));
- LLDB_REGISTER_METHOD(lldb::ByteOrder, SBModule, GetByteOrder, ());
- LLDB_REGISTER_METHOD(const char *, SBModule, GetTriple, ());
- LLDB_REGISTER_METHOD(uint32_t, SBModule, GetAddressByteSize, ());
- LLDB_REGISTER_METHOD(uint32_t, SBModule, GetVersion, (uint32_t *, uint32_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetSymbolFileSpec, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule,
- GetObjectFileHeaderAddress, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule,
- GetObjectFileEntryPointAddress, ());
- LLDB_REGISTER_STATIC_METHOD(uint32_t, SBModule, GetNumberAllocatedModules,
- ());
- LLDB_REGISTER_STATIC_METHOD(void, SBModule, GarbageCollectAllocatedModules,
- ());
-}
-
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBModuleSpec.cpp b/lldb/source/API/SBModuleSpec.cpp
index d8154bea8a1ab..2aafc6b48faed 100644
--- a/lldb/source/API/SBModuleSpec.cpp
+++ b/lldb/source/API/SBModuleSpec.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBModuleSpec.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Module.h"
@@ -243,58 +243,3 @@ bool SBModuleSpecList::GetDescription(lldb::SBStream &description) {
m_opaque_up->Dump(description.ref());
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBModuleSpec>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBModuleSpec, ());
- LLDB_REGISTER_CONSTRUCTOR(SBModuleSpec, (const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD(const lldb::SBModuleSpec &,
- SBModuleSpec, operator=,(const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, Clear, ());
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetFileSpec, ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, SetFileSpec,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetPlatformFileSpec,
- ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, SetPlatformFileSpec,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetSymbolFileSpec, ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, SetSymbolFileSpec,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(const char *, SBModuleSpec, GetObjectName, ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, SetObjectName, (const char *));
- LLDB_REGISTER_METHOD(const char *, SBModuleSpec, GetTriple, ());
- LLDB_REGISTER_METHOD(void, SBModuleSpec, SetTriple, (const char *));
- LLDB_REGISTER_METHOD(size_t, SBModuleSpec, GetUUIDLength, ());
- LLDB_REGISTER_METHOD(bool, SBModuleSpec, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_CONSTRUCTOR(SBModuleSpecList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBModuleSpecList,
- (const lldb::SBModuleSpecList &));
- LLDB_REGISTER_METHOD(
- lldb::SBModuleSpecList &,
- SBModuleSpecList, operator=,(const lldb::SBModuleSpecList &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBModuleSpecList, SBModuleSpecList,
- GetModuleSpecifications, (const char *));
- LLDB_REGISTER_METHOD(void, SBModuleSpecList, Append,
- (const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD(void, SBModuleSpecList, Append,
- (const lldb::SBModuleSpecList &));
- LLDB_REGISTER_METHOD(size_t, SBModuleSpecList, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList, GetSpecAtIndex,
- (size_t));
- LLDB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList,
- FindFirstMatchingSpec, (const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD(lldb::SBModuleSpecList, SBModuleSpecList,
- FindMatchingSpecs, (const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD(bool, SBModuleSpecList, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp
index a6769428a2115..12aabcae4aea7 100644
--- a/lldb/source/API/SBPlatform.cpp
+++ b/lldb/source/API/SBPlatform.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBPlatform.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBEnvironment.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBFileSpec.h"
@@ -690,103 +690,3 @@ SBEnvironment SBPlatform::GetEnvironment() {
return LLDB_RECORD_RESULT(SBEnvironment());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBPlatformConnectOptions>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBPlatformConnectOptions, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBPlatformConnectOptions,
- (const lldb::SBPlatformConnectOptions &));
- LLDB_REGISTER_METHOD(
- SBPlatformConnectOptions &,
- SBPlatformConnectOptions, operator=,(
- const lldb::SBPlatformConnectOptions &));
- LLDB_REGISTER_METHOD(const char *, SBPlatformConnectOptions, GetURL, ());
- LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, SetURL, (const char *));
- LLDB_REGISTER_METHOD(bool, SBPlatformConnectOptions, GetRsyncEnabled, ());
- LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, EnableRsync,
- (const char *, const char *, bool));
- LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, DisableRsync, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatformConnectOptions,
- GetLocalCacheDirectory, ());
- LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, SetLocalCacheDirectory,
- (const char *));
-}
-
-template <> void RegisterMethods<SBPlatformShellCommand>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand,
- (const lldb::SBPlatformShellCommand &));
- LLDB_REGISTER_METHOD(
- SBPlatformShellCommand &,
- SBPlatformShellCommand, operator=,(const lldb::SBPlatformShellCommand &));
- LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, Clear, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetShell, ());
- LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetShell, (const char *));
- LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetCommand, ());
- LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetCommand,
- (const char *));
- LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand,
- GetWorkingDirectory, ());
- LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetWorkingDirectory,
- (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBPlatformShellCommand, GetTimeoutSeconds, ());
- LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetTimeoutSeconds,
- (uint32_t));
- LLDB_REGISTER_METHOD(int, SBPlatformShellCommand, GetSignal, ());
- LLDB_REGISTER_METHOD(int, SBPlatformShellCommand, GetStatus, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetOutput, ());
-}
-
-template <> void RegisterMethods<SBPlatform>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBPlatform, ());
- LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const lldb::SBPlatform &));
- LLDB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(SBPlatform &,
- SBPlatform, operator=,(const lldb::SBPlatform &));
- LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, operator bool,());
- LLDB_REGISTER_METHOD(void, SBPlatform, Clear, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetName, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetWorkingDirectory, ());
- LLDB_REGISTER_METHOD(bool, SBPlatform, SetWorkingDirectory, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, ConnectRemote,
- (lldb::SBPlatformConnectOptions &));
- LLDB_REGISTER_METHOD(void, SBPlatform, DisconnectRemote, ());
- LLDB_REGISTER_METHOD(bool, SBPlatform, IsConnected, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetTriple, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetOSBuild, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetOSDescription, ());
- LLDB_REGISTER_METHOD(const char *, SBPlatform, GetHostname, ());
- LLDB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSMajorVersion, ());
- LLDB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSMinorVersion, ());
- LLDB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSUpdateVersion, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Get,
- (lldb::SBFileSpec &, lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Put,
- (lldb::SBFileSpec &, lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Install,
- (lldb::SBFileSpec &, lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Run,
- (lldb::SBPlatformShellCommand &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Launch,
- (lldb::SBLaunchInfo &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, Kill, (const lldb::pid_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, MakeDirectory,
- (const char *, uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBPlatform, GetFilePermissions,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, SetFilePermissions,
- (const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBPlatform, GetEnvironment, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBUnixSignals, SBPlatform, GetUnixSignals,
- ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBPlatform, SBPlatform, GetHostPlatform,
- ());
-}
-
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 3da96d3466bf4..dc2e6d63ccd4f 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBProcess.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include <cinttypes>
@@ -1330,145 +1330,3 @@ lldb::SBError SBProcess::DeallocateMemory(lldb::addr_t ptr) {
}
return sb_error;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBProcess>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBProcess, ());
- LLDB_REGISTER_CONSTRUCTOR(SBProcess, (const lldb::SBProcess &));
- LLDB_REGISTER_CONSTRUCTOR(SBProcess, (const lldb::ProcessSP &));
- LLDB_REGISTER_METHOD(const lldb::SBProcess &,
- SBProcess, operator=,(const lldb::SBProcess &));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBProcess,
- GetBroadcasterClassName, ());
- LLDB_REGISTER_METHOD(const char *, SBProcess, GetPluginName, ());
- LLDB_REGISTER_METHOD(const char *, SBProcess, GetShortPluginName, ());
- LLDB_REGISTER_METHOD(void, SBProcess, Clear, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBProcess, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBProcess, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBProcess, RemoteLaunch,
- (const char **, const char **, const char *,
- const char *, const char *, const char *, uint32_t,
- bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(bool, SBProcess, RemoteAttachToProcessWithID,
- (lldb::pid_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, GetNumThreads, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBProcess, GetSelectedThread,
- ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBProcess, CreateOSPluginThread,
- (lldb::tid_t, lldb::addr_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBTarget, SBProcess, GetTarget, ());
- LLDB_REGISTER_METHOD(size_t, SBProcess, PutSTDIN, (const char *, size_t));
- LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
- (const lldb::SBEvent &, FILE *));
- LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
- (const lldb::SBEvent &, FileSP));
- LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
- (const lldb::SBEvent &, SBFile));
- LLDB_REGISTER_METHOD(
- void, SBProcess, AppendEventStateReport,
- (const lldb::SBEvent &, lldb::SBCommandReturnObject &));
- LLDB_REGISTER_METHOD(bool, SBProcess, SetSelectedThread,
- (const lldb::SBThread &));
- LLDB_REGISTER_METHOD(bool, SBProcess, SetSelectedThreadByID, (lldb::tid_t));
- LLDB_REGISTER_METHOD(bool, SBProcess, SetSelectedThreadByIndexID,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadAtIndex, (size_t));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, GetNumQueues, ());
- LLDB_REGISTER_METHOD(lldb::SBQueue, SBProcess, GetQueueAtIndex, (size_t));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, GetStopID, (bool));
- LLDB_REGISTER_METHOD(lldb::SBEvent, SBProcess, GetStopEventForStopID,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::StateType, SBProcess, GetState, ());
- LLDB_REGISTER_METHOD(int, SBProcess, GetExitStatus, ());
- LLDB_REGISTER_METHOD(const char *, SBProcess, GetExitDescription, ());
- LLDB_REGISTER_METHOD(lldb::pid_t, SBProcess, GetProcessID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, GetUniqueID, ());
- LLDB_REGISTER_METHOD_CONST(lldb::ByteOrder, SBProcess, GetByteOrder, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBProcess, GetAddressByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Continue, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Destroy, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Stop, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Kill, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Detach, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Detach, (bool));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, Signal, (int));
- LLDB_REGISTER_METHOD(lldb::SBUnixSignals, SBProcess, GetUnixSignals, ());
- LLDB_REGISTER_METHOD(void, SBProcess, SendAsyncInterrupt, ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadByID,
- (lldb::tid_t));
- LLDB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadByIndexID,
- (uint32_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::StateType, SBProcess, GetStateFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBProcess, GetRestartedFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(size_t, SBProcess,
- GetNumRestartedReasonsFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBProcess,
- GetRestartedReasonAtIndexFromEvent,
- (const lldb::SBEvent &, size_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBProcess, SBProcess, GetProcessFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBProcess, GetInterruptedFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBStructuredData, SBProcess,
- GetStructuredDataFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBProcess, EventIsProcessEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBProcess, EventIsStructuredDataEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBProcess, GetBroadcaster,
- ());
- LLDB_REGISTER_STATIC_METHOD(const char *, SBProcess, GetBroadcasterClass,
- ());
- LLDB_REGISTER_METHOD(uint64_t, SBProcess, ReadUnsignedFromMemory,
- (lldb::addr_t, uint32_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBProcess, ReadPointerFromMemory,
- (lldb::addr_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(bool, SBProcess, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBStructuredData, SBProcess,
- GetExtendedCrashInformation, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBProcess,
- GetNumSupportedHardwareWatchpoints,
- (lldb::SBError &));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, LoadImage,
- (lldb::SBFileSpec &, lldb::SBError &));
- LLDB_REGISTER_METHOD(
- uint32_t, SBProcess, LoadImage,
- (const lldb::SBFileSpec &, const lldb::SBFileSpec &, lldb::SBError &));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, LoadImageUsingPaths,
- (const lldb::SBFileSpec &, lldb::SBStringList &,
- lldb::SBFileSpec &, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, UnloadImage, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, SendEventData,
- (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBProcess, GetNumExtendedBacktraceTypes, ());
- LLDB_REGISTER_METHOD(const char *, SBProcess,
- GetExtendedBacktraceTypeAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBThreadCollection, SBProcess, GetHistoryThreads,
- (lldb::addr_t));
- LLDB_REGISTER_METHOD(bool, SBProcess, IsInstrumentationRuntimePresent,
- (lldb::InstrumentationRuntimeType));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, SaveCore, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, GetMemoryRegionInfo,
- (lldb::addr_t, lldb::SBMemoryRegionInfo &));
- LLDB_REGISTER_METHOD(lldb::SBMemoryRegionInfoList, SBProcess,
- GetMemoryRegions, ());
- LLDB_REGISTER_METHOD(lldb::SBProcessInfo, SBProcess, GetProcessInfo, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBProcess, AllocateMemory,
- (size_t, uint32_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBProcess, DeallocateMemory,
- (lldb::addr_t));
-
- LLDB_REGISTER_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetSTDOUT);
- LLDB_REGISTER_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetSTDERR);
- LLDB_REGISTER_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetAsyncProfileData);
-}
-
-}
-}
diff --git a/lldb/source/API/SBProcessInfo.cpp b/lldb/source/API/SBProcessInfo.cpp
index 10a149f90c34b..4ff82b37719dd 100644
--- a/lldb/source/API/SBProcessInfo.cpp
+++ b/lldb/source/API/SBProcessInfo.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBProcessInfo.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/Utility/ProcessInfo.h"
@@ -193,34 +193,3 @@ const char *SBProcessInfo::GetTriple() {
}
return triple;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBProcessInfo>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBProcessInfo, ());
- LLDB_REGISTER_CONSTRUCTOR(SBProcessInfo, (const lldb::SBProcessInfo &));
- LLDB_REGISTER_METHOD(
- lldb::SBProcessInfo &,
- SBProcessInfo, operator=,(const lldb::SBProcessInfo &));
- LLDB_REGISTER_METHOD_CONST(bool, SBProcessInfo, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBProcessInfo, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBProcessInfo, GetName, ());
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBProcessInfo, GetExecutableFile,
- ());
- LLDB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetProcessID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetUserID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetGroupID, ());
- LLDB_REGISTER_METHOD(bool, SBProcessInfo, UserIDIsValid, ());
- LLDB_REGISTER_METHOD(bool, SBProcessInfo, GroupIDIsValid, ());
- LLDB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetEffectiveUserID, ());
- LLDB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetEffectiveGroupID, ());
- LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveUserIDIsValid, ());
- LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveGroupIDIsValid, ());
- LLDB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetParentProcessID, ());
- LLDB_REGISTER_METHOD(const char *, SBProcessInfo, GetTriple, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBQueue.cpp b/lldb/source/API/SBQueue.cpp
index 7981d956061e0..71b2d32d5f27a 100644
--- a/lldb/source/API/SBQueue.cpp
+++ b/lldb/source/API/SBQueue.cpp
@@ -8,7 +8,7 @@
#include <cinttypes>
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBQueue.h"
#include "lldb/API/SBProcess.h"
@@ -326,32 +326,3 @@ lldb::QueueKind SBQueue::GetKind() {
return m_opaque_sp->GetKind();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBQueue>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBQueue, ());
- LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &));
- LLDB_REGISTER_METHOD(const lldb::SBQueue &,
- SBQueue, operator=,(const lldb::SBQueue &));
- LLDB_REGISTER_METHOD_CONST(bool, SBQueue, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBQueue, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBQueue, Clear, ());
- LLDB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBQueue, GetQueueID, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBQueue, GetIndexID, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBQueue, GetName, ());
- LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumThreads, ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumPendingItems, ());
- LLDB_REGISTER_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumRunningItems, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBQueue, GetProcess, ());
- LLDB_REGISTER_METHOD(lldb::QueueKind, SBQueue, GetKind, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBQueueItem.cpp b/lldb/source/API/SBQueueItem.cpp
index 94981e34e070c..2ff89c44c3d26 100644
--- a/lldb/source/API/SBQueueItem.cpp
+++ b/lldb/source/API/SBQueueItem.cpp
@@ -8,7 +8,7 @@
#include "lldb/lldb-forward.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBQueueItem.h"
#include "lldb/API/SBThread.h"
@@ -113,26 +113,3 @@ SBThread SBQueueItem::GetExtendedBacktraceThread(const char *type) {
}
return LLDB_RECORD_RESULT(result);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBQueueItem>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBQueueItem, ());
- LLDB_REGISTER_CONSTRUCTOR(SBQueueItem, (const lldb::QueueItemSP &));
- LLDB_REGISTER_METHOD_CONST(bool, SBQueueItem, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBQueueItem, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBQueueItem, Clear, ());
- LLDB_REGISTER_METHOD(void, SBQueueItem, SetQueueItem,
- (const lldb::QueueItemSP &));
- LLDB_REGISTER_METHOD_CONST(lldb::QueueItemKind, SBQueueItem, GetKind, ());
- LLDB_REGISTER_METHOD(void, SBQueueItem, SetKind, (lldb::QueueItemKind));
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBQueueItem, GetAddress, ());
- LLDB_REGISTER_METHOD(void, SBQueueItem, SetAddress, (lldb::SBAddress));
- LLDB_REGISTER_METHOD(lldb::SBThread, SBQueueItem,
- GetExtendedBacktraceThread, (const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBReproducer.cpp b/lldb/source/API/SBReproducer.cpp
index c9c9a03c694a9..ba564c911b725 100644
--- a/lldb/source/API/SBReproducer.cpp
+++ b/lldb/source/API/SBReproducer.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
#include "lldb/API/LLDB.h"
#include "lldb/API/SBAddress.h"
@@ -24,6 +23,9 @@
#include "lldb/API/SBReproducer.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Version/Version.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
+#include "lldb/Utility/Reproducer.h"
+#include "lldb/Utility/ReproducerProvider.h"
using namespace lldb;
using namespace lldb_private;
@@ -56,83 +58,6 @@ bool SBReplayOptions::GetCheckVersion() const {
return m_opaque_up->check_version;
}
-SBRegistry::SBRegistry() {
- Registry &R = *this;
-
- RegisterMethods<SBAddress>(R);
- RegisterMethods<SBAttachInfo>(R);
- RegisterMethods<SBBlock>(R);
- RegisterMethods<SBBreakpoint>(R);
- RegisterMethods<SBBreakpointList>(R);
- RegisterMethods<SBBreakpointLocation>(R);
- RegisterMethods<SBBreakpointName>(R);
- RegisterMethods<SBBroadcaster>(R);
- RegisterMethods<SBCommandInterpreter>(R);
- RegisterMethods<SBCommandInterpreterRunOptions>(R);
- RegisterMethods<SBCommandReturnObject>(R);
- RegisterMethods<SBCommunication>(R);
- RegisterMethods<SBCompileUnit>(R);
- RegisterMethods<SBData>(R);
- RegisterMethods<SBDebugger>(R);
- RegisterMethods<SBDeclaration>(R);
- RegisterMethods<SBEnvironment>(R);
- RegisterMethods<SBError>(R);
- RegisterMethods<SBEvent>(R);
- RegisterMethods<SBExecutionContext>(R);
- RegisterMethods<SBExpressionOptions>(R);
- RegisterMethods<SBFile>(R);
- RegisterMethods<SBFileSpec>(R);
- RegisterMethods<SBFileSpecList>(R);
- RegisterMethods<SBFrame>(R);
- RegisterMethods<SBFunction>(R);
- RegisterMethods<SBHostOS>(R);
- RegisterMethods<SBInputReader>(R);
- RegisterMethods<SBInstruction>(R);
- RegisterMethods<SBInstructionList>(R);
- RegisterMethods<SBLanguageRuntime>(R);
- RegisterMethods<SBLaunchInfo>(R);
- RegisterMethods<SBLineEntry>(R);
- RegisterMethods<SBListener>(R);
- RegisterMethods<SBMemoryRegionInfo>(R);
- RegisterMethods<SBMemoryRegionInfoList>(R);
- RegisterMethods<SBModule>(R);
- RegisterMethods<SBModuleSpec>(R);
- RegisterMethods<SBPlatform>(R);
- RegisterMethods<SBPlatformConnectOptions>(R);
- RegisterMethods<SBPlatformShellCommand>(R);
- RegisterMethods<SBProcess>(R);
- RegisterMethods<SBProcessInfo>(R);
- RegisterMethods<SBQueue>(R);
- RegisterMethods<SBQueueItem>(R);
- RegisterMethods<SBSection>(R);
- RegisterMethods<SBSourceManager>(R);
- RegisterMethods<SBStream>(R);
- RegisterMethods<SBStringList>(R);
- RegisterMethods<SBStructuredData>(R);
- RegisterMethods<SBSymbol>(R);
- RegisterMethods<SBSymbolContext>(R);
- RegisterMethods<SBSymbolContextList>(R);
- RegisterMethods<SBTarget>(R);
- RegisterMethods<SBThread>(R);
- RegisterMethods<SBThreadCollection>(R);
- RegisterMethods<SBThreadPlan>(R);
- RegisterMethods<SBTrace>(R);
- RegisterMethods<SBType>(R);
- RegisterMethods<SBTypeCategory>(R);
- RegisterMethods<SBTypeEnumMember>(R);
- RegisterMethods<SBTypeFilter>(R);
- RegisterMethods<SBTypeFormat>(R);
- RegisterMethods<SBTypeNameSpecifier>(R);
- RegisterMethods<SBTypeSummary>(R);
- RegisterMethods<SBTypeSummaryOptions>(R);
- RegisterMethods<SBTypeSynthetic>(R);
- RegisterMethods<SBUnixSignals>(R);
- RegisterMethods<SBValue>(R);
- RegisterMethods<SBValueList>(R);
- RegisterMethods<SBVariablesOptions>(R);
- RegisterMethods<SBWatchpoint>(R);
-}
-
const char *SBReproducer::Capture() {
static std::string error;
if (auto e = Reproducer::Initialize(ReproducerMode::Capture, llvm::None)) {
@@ -140,11 +65,6 @@ const char *SBReproducer::Capture() {
return error.c_str();
}
- if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) {
- auto &p = g->GetOrCreate<SBProvider>();
- InstrumentationData::Initialize(p.GetSerializer(), p.GetRegistry());
- }
-
return nullptr;
}
@@ -156,11 +76,6 @@ const char *SBReproducer::Capture(const char *path) {
return error.c_str();
}
- if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) {
- auto &p = g->GetOrCreate<SBProvider>();
- InstrumentationData::Initialize(p.GetSerializer(), p.GetRegistry());
- }
-
return nullptr;
}
@@ -232,7 +147,3 @@ void SBReproducer::SetWorkingDirectory(const char *path) {
fp.RecordInterestingDirectory(wp.GetDirectory());
}
}
-
-char lldb_private::repro::SBProvider::ID = 0;
-const char *SBProvider::Info::name = "sbapi";
-const char *SBProvider::Info::file = "sbapi.bin";
diff --git a/lldb/source/API/SBReproducerPrivate.h b/lldb/source/API/SBReproducerPrivate.h
deleted file mode 100644
index 7d51beec4e94c..0000000000000
--- a/lldb/source/API/SBReproducerPrivate.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//===-- SBReproducerPrivate.h -----------------------------------*- C++ -*-===//
-//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_SOURCE_API_SBREPRODUCERPRIVATE_H
-#define LLDB_SOURCE_API_SBREPRODUCERPRIVATE_H
-
-#include "lldb/API/SBReproducer.h"
-
-#include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Reproducer.h"
-#include "lldb/Utility/ReproducerInstrumentation.h"
-#include "lldb/Utility/ReproducerProvider.h"
-
-#include "llvm/ADT/DenseMap.h"
-
-#define LLDB_GET_INSTRUMENTATION_DATA() \
- lldb_private::repro::InstrumentationData::Instance()
-
-namespace lldb_private {
-namespace repro {
-
-class SBRegistry : public Registry {
-public:
- SBRegistry();
-};
-
-class SBProvider : public Provider<SBProvider> {
-public:
- struct Info {
- static const char *name;
- static const char *file;
- };
-
- SBProvider(const FileSpec &directory)
- : Provider(directory),
- m_stream(directory.CopyByAppendingPathComponent("sbapi.bin").GetPath(),
- m_ec, llvm::sys::fs::OpenFlags::OF_None),
- m_serializer(m_stream) {}
-
- Serializer &GetSerializer() { return m_serializer; }
- Registry &GetRegistry() { return m_registry; }
-
- static char ID;
-
-private:
- std::error_code m_ec;
- llvm::raw_fd_ostream m_stream;
- Serializer m_serializer;
- SBRegistry m_registry;
-};
-
-class ReplayData {
-public:
- ReplayData(std::unique_ptr<llvm::MemoryBuffer> memory_buffer)
- : m_memory_buffer(std::move(memory_buffer)),
- m_deserializer(m_memory_buffer->getBuffer()) {}
- Deserializer &GetDeserializer() { return m_deserializer; }
- Registry &GetRegistry() { return m_registry; }
-
-private:
- std::unique_ptr<llvm::MemoryBuffer> m_memory_buffer;
- SBRegistry m_registry;
- Deserializer m_deserializer;
-};
-
-template <typename T> void RegisterMethods(Registry &R);
-
-} // namespace repro
-} // namespace lldb_private
-
-#endif
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 71e80e04a0e23..c2c817407fd33 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSection.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBTarget.h"
#include "lldb/Core/Module.h"
@@ -285,41 +285,3 @@ bool SBSection::GetDescription(SBStream &description) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBSection>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBSection, ());
- LLDB_REGISTER_CONSTRUCTOR(SBSection, (const lldb::SBSection &));
- LLDB_REGISTER_METHOD(const lldb::SBSection &,
- SBSection, operator=,(const lldb::SBSection &));
- LLDB_REGISTER_METHOD_CONST(bool, SBSection, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBSection, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBSection, GetName, ());
- LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, GetParent, ());
- LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, FindSubSection,
- (const char *));
- LLDB_REGISTER_METHOD(size_t, SBSection, GetNumSubSections, ());
- LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex,
- (size_t));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetFileAddress, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetLoadAddress,
- (lldb::SBTarget &));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetByteSize, ());
- LLDB_REGISTER_METHOD(uint64_t, SBSection, GetFileOffset, ());
- LLDB_REGISTER_METHOD(uint64_t, SBSection, GetFileByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData, ());
- LLDB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData,
- (uint64_t, uint64_t));
- LLDB_REGISTER_METHOD(lldb::SectionType, SBSection, GetSectionType, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBSection, GetPermissions, ());
- LLDB_REGISTER_METHOD(uint32_t, SBSection, GetTargetByteSize, ());
- LLDB_REGISTER_METHOD(bool, SBSection, operator==,(const lldb::SBSection &));
- LLDB_REGISTER_METHOD(bool, SBSection, operator!=,(const lldb::SBSection &));
- LLDB_REGISTER_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBSourceManager.cpp b/lldb/source/API/SBSourceManager.cpp
index 5241d054e274c..612bb2d207e15 100644
--- a/lldb/source/API/SBSourceManager.cpp
+++ b/lldb/source/API/SBSourceManager.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSourceManager.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBTarget.h"
@@ -137,27 +137,3 @@ size_t SBSourceManager::DisplaySourceLinesWithLineNumbersAndColumn(
file.ref(), line, column, context_before, context_after,
current_line_cstr, s.get());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBSourceManager>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBDebugger &));
- LLDB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBTarget &));
- LLDB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBSourceManager &));
- LLDB_REGISTER_METHOD(
- const lldb::SBSourceManager &,
- SBSourceManager, operator=,(const lldb::SBSourceManager &));
- LLDB_REGISTER_METHOD(size_t, SBSourceManager,
- DisplaySourceLinesWithLineNumbers,
- (const lldb::SBFileSpec &, uint32_t, uint32_t,
- uint32_t, const char *, lldb::SBStream &));
- LLDB_REGISTER_METHOD(size_t, SBSourceManager,
- DisplaySourceLinesWithLineNumbersAndColumn,
- (const lldb::SBFileSpec &, uint32_t, uint32_t,
- uint32_t, uint32_t, const char *, lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBStream.cpp b/lldb/source/API/SBStream.cpp
index 190abd18df336..c3e344802148c 100644
--- a/lldb/source/API/SBStream.cpp
+++ b/lldb/source/API/SBStream.cpp
@@ -8,7 +8,7 @@
#include "lldb/API/SBStream.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBFile.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Host/FileSystem.h"
@@ -193,25 +193,3 @@ void SBStream::Clear() {
static_cast<StreamString *>(m_opaque_up.get())->Clear();
}
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBStream>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBStream, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBStream, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBStream, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBStream, GetData, ());
- LLDB_REGISTER_METHOD(size_t, SBStream, GetSize, ());
- LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (const char *, bool));
- LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (FileSP));
- LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (SBFile));
- 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 *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp
index a199957e1501d..16099c7ae0751 100644
--- a/lldb/source/API/SBStringList.cpp
+++ b/lldb/source/API/SBStringList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBStringList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/Utility/StringList.h"
@@ -132,29 +132,3 @@ void SBStringList::Clear() {
m_opaque_up->Clear();
}
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBStringList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBStringList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBStringList, (const lldb::SBStringList &));
- LLDB_REGISTER_METHOD(const lldb::SBStringList &,
- SBStringList, operator=,(const lldb::SBStringList &));
- LLDB_REGISTER_METHOD_CONST(bool, SBStringList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBStringList, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBStringList, AppendString, (const char *));
- LLDB_REGISTER_METHOD(void, SBStringList, AppendList, (const char **, int));
- LLDB_REGISTER_METHOD(void, SBStringList, AppendList,
- (const lldb::SBStringList &));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBStringList, GetSize, ());
- LLDB_REGISTER_METHOD(const char *, SBStringList, GetStringAtIndex,
- (size_t));
- LLDB_REGISTER_METHOD_CONST(const char *, SBStringList, GetStringAtIndex,
- (size_t));
- LLDB_REGISTER_METHOD(void, SBStringList, Clear, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBStructuredData.cpp b/lldb/source/API/SBStructuredData.cpp
index e99c6194c5164..0ae5f2b8c52bc 100644
--- a/lldb/source/API/SBStructuredData.cpp
+++ b/lldb/source/API/SBStructuredData.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBStructuredData.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBStringList.h"
@@ -201,45 +201,3 @@ size_t SBStructuredData::GetStringValue(char *dst, size_t dst_len) const {
return m_impl_up->GetStringValue(dst, dst_len);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <> void RegisterMethods<SBStructuredData>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBStructuredData, ());
- LLDB_REGISTER_CONSTRUCTOR(SBStructuredData, (const lldb::SBStructuredData &));
- LLDB_REGISTER_CONSTRUCTOR(SBStructuredData, (const lldb::EventSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBStructuredData,
- (const lldb_private::StructuredDataImpl &));
- LLDB_REGISTER_METHOD(
- lldb::SBStructuredData &,
- SBStructuredData, operator=,(const lldb::SBStructuredData &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBStructuredData, SetFromJSON,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBStructuredData, SetFromJSON,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBStructuredData, Clear, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBError, SBStructuredData, GetAsJSON,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBError, SBStructuredData, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(lldb::StructuredDataType, SBStructuredData,
- GetType, ());
- LLDB_REGISTER_METHOD_CONST(size_t, SBStructuredData, GetSize, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, GetKeys,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBStructuredData, SBStructuredData,
- GetValueForKey, (const char *));
- LLDB_REGISTER_METHOD_CONST(lldb::SBStructuredData, SBStructuredData,
- GetItemAtIndex, (size_t));
- LLDB_REGISTER_METHOD_CONST(uint64_t, SBStructuredData, GetIntegerValue,
- (uint64_t));
- LLDB_REGISTER_METHOD_CONST(double, SBStructuredData, GetFloatValue, (double));
- LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, GetBooleanValue, (bool));
- LLDB_REGISTER_CHAR_PTR_METHOD_CONST(size_t, SBStructuredData, GetStringValue);
-}
-
-} // namespace repro
-} // namespace lldb_private
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index d3abc13675f5b..b719184522913 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSymbol.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Disassembler.h"
#include "lldb/Core/Module.h"
@@ -199,37 +199,3 @@ bool SBSymbol::IsSynthetic() {
return m_opaque_ptr->IsSynthetic();
return false;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBSymbol>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBSymbol, ());
- LLDB_REGISTER_CONSTRUCTOR(SBSymbol, (const lldb::SBSymbol &));
- LLDB_REGISTER_METHOD(const lldb::SBSymbol &,
- SBSymbol, operator=,(const lldb::SBSymbol &));
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbol, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbol, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetName, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetDisplayName, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetMangledName, ());
- LLDB_REGISTER_METHOD_CONST(bool,
- SBSymbol, operator==,(const lldb::SBSymbol &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBSymbol, operator!=,(const lldb::SBSymbol &));
- LLDB_REGISTER_METHOD(bool, SBSymbol, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions,
- (lldb::SBTarget));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions,
- (lldb::SBTarget, const char *));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBSymbol, GetStartAddress, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBSymbol, GetEndAddress, ());
- LLDB_REGISTER_METHOD(uint32_t, SBSymbol, GetPrologueByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SymbolType, SBSymbol, GetType, ());
- LLDB_REGISTER_METHOD(bool, SBSymbol, IsExternal, ());
- LLDB_REGISTER_METHOD(bool, SBSymbol, IsSynthetic, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBSymbolContext.cpp b/lldb/source/API/SBSymbolContext.cpp
index 9b67d5fd3396b..dde7a1388aad7 100644
--- a/lldb/source/API/SBSymbolContext.cpp
+++ b/lldb/source/API/SBSymbolContext.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSymbolContext.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Module.h"
@@ -220,43 +220,3 @@ SBSymbolContext::GetParentOfInlinedScope(const SBAddress &curr_frame_pc,
}
return LLDB_RECORD_RESULT(SBSymbolContext());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBSymbolContext>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBSymbolContext, ());
- LLDB_REGISTER_CONSTRUCTOR(SBSymbolContext,
- (const lldb_private::SymbolContext &));
- LLDB_REGISTER_CONSTRUCTOR(SBSymbolContext, (const lldb::SBSymbolContext &));
- LLDB_REGISTER_METHOD(
- const lldb::SBSymbolContext &,
- SBSymbolContext, operator=,(const lldb::SBSymbolContext &));
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContext, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContext, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::SBModule, SBSymbolContext, GetModule, ());
- LLDB_REGISTER_METHOD(lldb::SBCompileUnit, SBSymbolContext, GetCompileUnit,
- ());
- LLDB_REGISTER_METHOD(lldb::SBFunction, SBSymbolContext, GetFunction, ());
- LLDB_REGISTER_METHOD(lldb::SBBlock, SBSymbolContext, GetBlock, ());
- LLDB_REGISTER_METHOD(lldb::SBLineEntry, SBSymbolContext, GetLineEntry, ());
- LLDB_REGISTER_METHOD(lldb::SBSymbol, SBSymbolContext, GetSymbol, ());
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetModule, (lldb::SBModule));
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetCompileUnit,
- (lldb::SBCompileUnit));
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetFunction,
- (lldb::SBFunction));
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetBlock, (lldb::SBBlock));
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetLineEntry,
- (lldb::SBLineEntry));
- LLDB_REGISTER_METHOD(void, SBSymbolContext, SetSymbol, (lldb::SBSymbol));
- LLDB_REGISTER_METHOD(bool, SBSymbolContext, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBSymbolContext,
- GetParentOfInlinedScope,
- (const lldb::SBAddress &, lldb::SBAddress &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBSymbolContextList.cpp b/lldb/source/API/SBSymbolContextList.cpp
index 3f36ba4569c35..13e039358f7c6 100644
--- a/lldb/source/API/SBSymbolContextList.cpp
+++ b/lldb/source/API/SBSymbolContextList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBSymbolContextList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Symbol/SymbolContext.h"
@@ -112,31 +112,3 @@ bool SBSymbolContextList::GetDescription(lldb::SBStream &description) {
m_opaque_up->GetDescription(&strm, lldb::eDescriptionLevelFull, nullptr);
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBSymbolContextList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBSymbolContextList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBSymbolContextList,
- (const lldb::SBSymbolContextList &));
- LLDB_REGISTER_METHOD(
- const lldb::SBSymbolContextList &,
- SBSymbolContextList, operator=,(const lldb::SBSymbolContextList &));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBSymbolContextList, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBSymbolContextList,
- GetContextAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBSymbolContextList, Clear, ());
- LLDB_REGISTER_METHOD(void, SBSymbolContextList, Append,
- (lldb::SBSymbolContext &));
- LLDB_REGISTER_METHOD(void, SBSymbolContextList, Append,
- (lldb::SBSymbolContextList &));
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContextList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContextList, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBSymbolContextList, GetDescription,
- (lldb::SBStream &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 7049c90b9fc15..70f17391be077 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTarget.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/lldb-public.h"
@@ -2487,272 +2487,3 @@ lldb::SBTrace SBTarget::CreateTrace(lldb::SBError &error) {
}
return LLDB_RECORD_RESULT(SBTrace());
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTarget>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTarget, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTarget, (const lldb::SBTarget &));
- LLDB_REGISTER_CONSTRUCTOR(SBTarget, (const lldb::TargetSP &));
- LLDB_REGISTER_METHOD(const lldb::SBTarget &,
- SBTarget, operator=,(const lldb::SBTarget &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBTarget, EventIsTargetEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTarget, SBTarget, GetTargetFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(uint32_t, SBTarget, GetNumModulesFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBModule, SBTarget,
- GetModuleAtIndexFromEvent,
- (const uint32_t, const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(const char *, SBTarget, GetBroadcasterClassName,
- ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTarget, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTarget, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, GetProcess, ());
- LLDB_REGISTER_METHOD(lldb::SBPlatform, SBTarget, GetPlatform, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBDebugger, SBTarget, GetDebugger, ());
- LLDB_REGISTER_METHOD(lldb::SBStructuredData, SBTarget, GetStatistics, ());
- LLDB_REGISTER_METHOD(void, SBTarget, SetCollectingStats, (bool));
- LLDB_REGISTER_METHOD(bool, SBTarget, GetCollectingStats, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LoadCore, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LoadCore,
- (const char *, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LaunchSimple,
- (const char **, const char **, const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, Install, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, Launch,
- (lldb::SBListener &, const char **, const char **,
- const char *, const char *, const char *,
- const char *, uint32_t, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, Launch,
- (lldb::SBLaunchInfo &, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, Attach,
- (lldb::SBAttachInfo &, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, AttachToProcessWithID,
- (lldb::SBListener &, lldb::pid_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(
- lldb::SBProcess, SBTarget, AttachToProcessWithName,
- (lldb::SBListener &, const char *, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(
- lldb::SBProcess, SBTarget, ConnectRemote,
- (lldb::SBListener &, const char *, const char *, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBTarget, GetExecutable, ());
- LLDB_REGISTER_METHOD_CONST(bool,
- SBTarget, operator==,(const lldb::SBTarget &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBTarget, operator!=,(const lldb::SBTarget &));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolveLoadAddress,
- (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolveFileAddress,
- (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolvePastLoadAddress,
- (uint32_t, lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBTarget,
- ResolveSymbolContextForAddress,
- (const lldb::SBAddress &, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByLocation, (const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByLocation,
- (const lldb::SBFileSpec &, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByLocation,
- (const lldb::SBFileSpec &, uint32_t, lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByLocation,
- (const lldb::SBFileSpec &, uint32_t, lldb::addr_t,
- lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByLocation,
- (const lldb::SBFileSpec &, uint32_t, uint32_t,
- lldb::addr_t, lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
- (const lldb::SBFileSpec &, uint32_t, uint32_t,
- lldb::addr_t, lldb::SBFileSpecList &, bool));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
- (const char *, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
- (const char *, uint32_t, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
- (const char *, uint32_t, lldb::LanguageType,
- const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames,
- (const char **, uint32_t, uint32_t,
- const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames,
- (const char **, uint32_t, uint32_t, lldb::LanguageType,
- const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames,
- (const char **, uint32_t, uint32_t, lldb::LanguageType,
- lldb::addr_t, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex,
- (const char *, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex,
- (const char *, lldb::LanguageType,
- const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateByAddress, (lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateBySBAddress, (lldb::SBAddress &));
- LLDB_REGISTER_METHOD(
- lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex,
- (const char *, const lldb::SBFileSpec &, const char *));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateBySourceRegex,
- (const char *, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &));
- LLDB_REGISTER_METHOD(
- lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex,
- (const char *, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &, const lldb::SBStringList &));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget,
- BreakpointCreateForException,
- (lldb::LanguageType, bool, bool));
- LLDB_REGISTER_METHOD(
- lldb::SBBreakpoint, SBTarget, BreakpointCreateFromScript,
- (const char *, lldb::SBStructuredData &, const lldb::SBFileSpecList &,
- const lldb::SBFileSpecList &, bool));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumBreakpoints, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBreakpoint, SBTarget,
- GetBreakpointAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTarget, BreakpointDelete, (lldb::break_id_t));
- LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, FindBreakpointByID,
- (lldb::break_id_t));
- LLDB_REGISTER_METHOD(bool, SBTarget, FindBreakpointsByName,
- (const char *, lldb::SBBreakpointList &));
- LLDB_REGISTER_METHOD(void, SBTarget, GetBreakpointNames,
- (lldb::SBStringList &));
- LLDB_REGISTER_METHOD(void, SBTarget, DeleteBreakpointName, (const char *));
- LLDB_REGISTER_METHOD(bool, SBTarget, EnableAllBreakpoints, ());
- LLDB_REGISTER_METHOD(bool, SBTarget, DisableAllBreakpoints, ());
- LLDB_REGISTER_METHOD(bool, SBTarget, DeleteAllBreakpoints, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsCreateFromFile,
- (lldb::SBFileSpec &, lldb::SBBreakpointList &));
- LLDB_REGISTER_METHOD(
- lldb::SBError, SBTarget, BreakpointsCreateFromFile,
- (lldb::SBFileSpec &, lldb::SBStringList &, lldb::SBBreakpointList &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile,
- (lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile,
- (lldb::SBFileSpec &, lldb::SBBreakpointList &, bool));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumWatchpoints, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBWatchpoint, SBTarget,
- GetWatchpointAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTarget, DeleteWatchpoint, (lldb::watch_id_t));
- LLDB_REGISTER_METHOD(lldb::SBWatchpoint, SBTarget, FindWatchpointByID,
- (lldb::watch_id_t));
- LLDB_REGISTER_METHOD(lldb::SBWatchpoint, SBTarget, WatchAddress,
- (lldb::addr_t, size_t, bool, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(bool, SBTarget, EnableAllWatchpoints, ());
- LLDB_REGISTER_METHOD(bool, SBTarget, DisableAllWatchpoints, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromAddress,
- (const char *, lldb::SBAddress, lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromData,
- (const char *, lldb::SBData, lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromExpression,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(bool, SBTarget, DeleteAllWatchpoints, ());
- LLDB_REGISTER_METHOD(void, SBTarget, AppendImageSearchPath,
- (const char *, const char *, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBModule, SBTarget, AddModule,
- (const char *, const char *, const char *));
- LLDB_REGISTER_METHOD(
- lldb::SBModule, SBTarget, AddModule,
- (const char *, const char *, const char *, const char *));
- LLDB_REGISTER_METHOD(lldb::SBModule, SBTarget, AddModule,
- (const lldb::SBModuleSpec &));
- LLDB_REGISTER_METHOD(bool, SBTarget, AddModule, (lldb::SBModule &));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumModules, ());
- LLDB_REGISTER_METHOD(void, SBTarget, Clear, ());
- LLDB_REGISTER_METHOD(lldb::SBModule, SBTarget, FindModule,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindCompileUnits,
- (const lldb::SBFileSpec &));
- LLDB_REGISTER_METHOD(lldb::ByteOrder, SBTarget, GetByteOrder, ());
- LLDB_REGISTER_METHOD(const char *, SBTarget, GetTriple, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetDataByteSize, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetCodeByteSize, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetMaximumNumberOfChildrenToDisplay,());
- LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetAddressByteSize, ());
- LLDB_REGISTER_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTarget, RemoveModule, (lldb::SBModule));
- LLDB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBTarget, GetBroadcaster,
- ());
- LLDB_REGISTER_METHOD(bool, SBTarget, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindFunctions,
- (const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget,
- FindGlobalFunctions,
- (const char *, uint32_t, lldb::MatchType));
- LLDB_REGISTER_METHOD(lldb::SBType, SBTarget, FindFirstType, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBType, SBTarget, GetBasicType,
- (lldb::BasicType));
- LLDB_REGISTER_METHOD(lldb::SBTypeList, SBTarget, FindTypes, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables,
- (const char *, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables,
- (const char *, uint32_t, lldb::MatchType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, FindFirstGlobalVariable,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBSourceManager, SBTarget, GetSourceManager, ());
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions,
- (lldb::SBAddress, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions,
- (lldb::SBAddress, uint32_t, const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, SetSectionLoadAddress,
- (lldb::SBSection, lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, ClearSectionLoadAddress,
- (lldb::SBSection));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, SetModuleLoadAddress,
- (lldb::SBModule, int64_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBTarget, ClearModuleLoadAddress,
- (lldb::SBModule));
- LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindSymbols,
- (const char *, lldb::SymbolType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, EvaluateExpression,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBTarget, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD(lldb::addr_t, SBTarget, GetStackRedZoneSize, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTarget, IsLoaded,
- (const lldb::SBModule &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBLaunchInfo, SBTarget, GetLaunchInfo, ());
- LLDB_REGISTER_METHOD(void, SBTarget, SetLaunchInfo,
- (const lldb::SBLaunchInfo &));
- LLDB_REGISTER_METHOD(
- size_t, SBTarget, ReadMemory,
- (const lldb::SBAddress, void *, size_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, GetInstructions,
- (lldb::SBAddress, const void *, size_t));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget,
- GetInstructionsWithFlavor,
- (lldb::SBAddress, const char *, const void *, size_t));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, GetInstructions,
- (lldb::addr_t, const void *, size_t));
- LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget,
- GetInstructionsWithFlavor,
- (lldb::addr_t, const char *, const void *, size_t));
- LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBTarget, GetEnvironment, ());
- LLDB_REGISTER_METHOD(lldb::SBTrace, SBTarget, GetTrace, ());
- LLDB_REGISTER_METHOD(lldb::SBTrace, SBTarget, CreateTrace, (lldb::SBError &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index f12826b31008d..7d3fe170a797a 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBThread.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBDebugger.h"
@@ -1363,110 +1363,3 @@ lldb_private::Thread *SBThread::operator->() {
lldb_private::Thread *SBThread::get() {
return m_opaque_sp->GetThreadSP().get();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBThread>(Registry &R) {
- LLDB_REGISTER_STATIC_METHOD(const char *, SBThread, GetBroadcasterClassName,
- ());
- LLDB_REGISTER_CONSTRUCTOR(SBThread, ());
- LLDB_REGISTER_CONSTRUCTOR(SBThread, (const lldb::ThreadSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBThread, (const lldb::SBThread &));
- LLDB_REGISTER_METHOD(const lldb::SBThread &,
- SBThread, operator=,(const lldb::SBThread &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBQueue, SBThread, GetQueue, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBThread, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBThread, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBThread, Clear, ());
- LLDB_REGISTER_METHOD(lldb::StopReason, SBThread, GetStopReason, ());
- LLDB_REGISTER_METHOD(size_t, SBThread, GetStopReasonDataCount, ());
- LLDB_REGISTER_METHOD(uint64_t, SBThread, GetStopReasonDataAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBThread, GetStopReasonExtendedInfoAsJSON,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBThreadCollection, SBThread,
- GetStopReasonExtendedBacktraces,
- (lldb::InstrumentationRuntimeType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBThread, GetStopReturnValue, ());
- LLDB_REGISTER_METHOD_CONST(lldb::tid_t, SBThread, GetThreadID, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBThread, GetIndexID, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBThread, GetName, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBThread, GetQueueName, ());
- LLDB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBThread, GetQueueID, ());
- LLDB_REGISTER_METHOD(bool, SBThread, GetInfoItemByPathAsString,
- (const char *, lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBThread, StepOver, (lldb::RunMode));
- LLDB_REGISTER_METHOD(void, SBThread, StepOver,
- (lldb::RunMode, lldb::SBError &));
- LLDB_REGISTER_METHOD(void, SBThread, StepInto, (lldb::RunMode));
- LLDB_REGISTER_METHOD(void, SBThread, StepInto,
- (const char *, lldb::RunMode));
- LLDB_REGISTER_METHOD(
- void, SBThread, StepInto,
- (const char *, uint32_t, lldb::SBError &, lldb::RunMode));
- LLDB_REGISTER_METHOD(void, SBThread, StepOut, ());
- LLDB_REGISTER_METHOD(void, SBThread, StepOut, (lldb::SBError &));
- LLDB_REGISTER_METHOD(void, SBThread, StepOutOfFrame, (lldb::SBFrame &));
- LLDB_REGISTER_METHOD(void, SBThread, StepOutOfFrame,
- (lldb::SBFrame &, lldb::SBError &));
- LLDB_REGISTER_METHOD(void, SBThread, StepInstruction, (bool));
- LLDB_REGISTER_METHOD(void, SBThread, StepInstruction,
- (bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(void, SBThread, RunToAddress, (lldb::addr_t));
- LLDB_REGISTER_METHOD(void, SBThread, RunToAddress,
- (lldb::addr_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepOverUntil,
- (lldb::SBFrame &, lldb::SBFileSpec &, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
- (const char *, bool));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
- (const char *, SBStructuredData &, bool));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, JumpToLine,
- (lldb::SBFileSpec &, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, ReturnFromFrame,
- (lldb::SBFrame &, lldb::SBValue &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBThread, UnwindInnermostExpression,
- ());
- LLDB_REGISTER_METHOD(bool, SBThread, Suspend, ());
- LLDB_REGISTER_METHOD(bool, SBThread, Suspend, (lldb::SBError &));
- LLDB_REGISTER_METHOD(bool, SBThread, Resume, ());
- LLDB_REGISTER_METHOD(bool, SBThread, Resume, (lldb::SBError &));
- LLDB_REGISTER_METHOD(bool, SBThread, IsSuspended, ());
- LLDB_REGISTER_METHOD(bool, SBThread, IsStopped, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBThread, GetProcess, ());
- LLDB_REGISTER_METHOD(uint32_t, SBThread, GetNumFrames, ());
- LLDB_REGISTER_METHOD(lldb::SBFrame, SBThread, GetFrameAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBFrame, SBThread, GetSelectedFrame, ());
- LLDB_REGISTER_METHOD(lldb::SBFrame, SBThread, SetSelectedFrame, (uint32_t));
- LLDB_REGISTER_STATIC_METHOD(bool, SBThread, EventIsThreadEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBFrame, SBThread, GetStackFrameFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBThread, SBThread, GetThreadFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBThread, operator==,(const lldb::SBThread &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBThread, operator!=,(const lldb::SBThread &));
- LLDB_REGISTER_METHOD_CONST(bool, SBThread, GetStatus, (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(bool, SBThread, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD_CONST(bool, SBThread, GetDescription,
- (lldb::SBStream &, bool));
- LLDB_REGISTER_METHOD(lldb::SBThread, SBThread, GetExtendedBacktraceThread,
- (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBThread,
- GetExtendedBacktraceOriginatingIndexID, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBThread, GetCurrentException, ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBThread, GetCurrentExceptionBacktrace,
- ());
- LLDB_REGISTER_METHOD(bool, SBThread, SafeToCallFunctions, ());
- LLDB_REGISTER_CHAR_PTR_METHOD(size_t, SBThread, GetStopDescription);
-}
-
-}
-}
diff --git a/lldb/source/API/SBThreadCollection.cpp b/lldb/source/API/SBThreadCollection.cpp
index cbcf20d9dd669..0850d01642f23 100644
--- a/lldb/source/API/SBThreadCollection.cpp
+++ b/lldb/source/API/SBThreadCollection.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBThreadCollection.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBThread.h"
#include "lldb/Target/ThreadList.h"
@@ -87,24 +87,3 @@ SBThread SBThreadCollection::GetThreadAtIndex(size_t idx) {
thread = m_opaque_sp->GetThreadAtIndex(idx);
return LLDB_RECORD_RESULT(thread);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBThreadCollection>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBThreadCollection, ());
- LLDB_REGISTER_CONSTRUCTOR(SBThreadCollection,
- (const lldb::SBThreadCollection &));
- LLDB_REGISTER_METHOD(
- const lldb::SBThreadCollection &,
- SBThreadCollection, operator=,(const lldb::SBThreadCollection &));
- LLDB_REGISTER_METHOD_CONST(bool, SBThreadCollection, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBThreadCollection, operator bool, ());
- LLDB_REGISTER_METHOD(size_t, SBThreadCollection, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBThreadCollection, GetThreadAtIndex,
- (size_t));
-}
-
-}
-}
diff --git a/lldb/source/API/SBThreadPlan.cpp b/lldb/source/API/SBThreadPlan.cpp
index 99ecb321595fb..64bfcdb434d90 100644
--- a/lldb/source/API/SBThreadPlan.cpp
+++ b/lldb/source/API/SBThreadPlan.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBThread.h"
#include "lldb/API/SBFileSpec.h"
@@ -452,68 +452,3 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
return LLDB_RECORD_RESULT(SBThreadPlan());
}
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBThreadPlan>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, ());
- LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &));
- LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *));
- LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *,
- lldb::SBStructuredData &));
- LLDB_REGISTER_METHOD(const lldb::SBThreadPlan &,
- SBThreadPlan, operator=,(const lldb::SBThreadPlan &));
- LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBThreadPlan, Clear, ());
- LLDB_REGISTER_METHOD(lldb::StopReason, SBThreadPlan, GetStopReason, ());
- LLDB_REGISTER_METHOD(size_t, SBThreadPlan, GetStopReasonDataCount, ());
- LLDB_REGISTER_METHOD(uint64_t, SBThreadPlan, GetStopReasonDataAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBThreadPlan, GetThread, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, GetDescription,
- (lldb::SBStream &));
- LLDB_REGISTER_METHOD(void, SBThreadPlan, SetPlanComplete, (bool));
- LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanComplete, ());
- LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanStale, ());
- LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsValid, ());
- LLDB_REGISTER_METHOD(void, SBThreadPlan, SetStopOthers, (bool));
- LLDB_REGISTER_METHOD(bool, SBThreadPlan, GetStopOthers, ());
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepOverRange,
- (lldb::SBAddress &, lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepOverRange,
- (lldb::SBAddress &, lldb::addr_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepInRange,
- (lldb::SBAddress &, lldb::addr_t));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepInRange,
- (lldb::SBAddress &, lldb::addr_t, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepOut, (uint32_t, bool));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepOut,
- (uint32_t, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForRunToAddress, (lldb::SBAddress));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForRunToAddress,
- (lldb::SBAddress, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepScripted, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepScripted,
- (const char *, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
- QueueThreadPlanForStepScripted,
- (const char *, lldb::SBStructuredData &,
- lldb::SBError &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTrace.cpp b/lldb/source/API/SBTrace.cpp
index 079c33a562c03..4daeab40f0a0c 100644
--- a/lldb/source/API/SBTrace.cpp
+++ b/lldb/source/API/SBTrace.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Target/Process.h"
#include "lldb/API/SBStructuredData.h"
@@ -92,23 +92,3 @@ SBTrace::operator bool() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTrace, operator bool);
return (bool)m_opaque_sp;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTrace>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTrace, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTrace, (const lldb::TraceSP &));
- LLDB_REGISTER_METHOD(SBError, SBTrace, Start, (const SBStructuredData &));
- LLDB_REGISTER_METHOD(SBError, SBTrace, Start,
- (const SBThread &, const SBStructuredData &));
- LLDB_REGISTER_METHOD(SBError, SBTrace, Stop, (const SBThread &));
- LLDB_REGISTER_METHOD(SBError, SBTrace, Stop, ());
- LLDB_REGISTER_METHOD(bool, SBTrace, IsValid, ());
- LLDB_REGISTER_METHOD(const char *, SBTrace, GetStartConfigurationHelp, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTrace, operator bool, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index b95edc62d56ba..f3789fafc8725 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBType.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBModule.h"
#include "lldb/API/SBStream.h"
@@ -920,120 +920,3 @@ TypeMemberFunctionImpl &SBTypeMemberFunction::ref() {
const TypeMemberFunctionImpl &SBTypeMemberFunction::ref() const {
return *m_opaque_sp.get();
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBType>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBType, ());
- LLDB_REGISTER_CONSTRUCTOR(SBType, (const lldb::SBType &));
- LLDB_REGISTER_METHOD(bool, SBType, operator==,(lldb::SBType &));
- LLDB_REGISTER_METHOD(bool, SBType, operator!=,(lldb::SBType &));
- LLDB_REGISTER_METHOD(lldb::SBType &,
- SBType, operator=,(const lldb::SBType &));
- LLDB_REGISTER_METHOD_CONST(bool, SBType, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBType, operator bool, ());
- LLDB_REGISTER_METHOD(uint64_t, SBType, GetByteSize, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsPointerType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsArrayType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsVectorType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsReferenceType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetPointerType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetPointeeType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetReferenceType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetTypedefedType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetDereferencedType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetArrayElementType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetArrayType, (uint64_t));
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetVectorElementType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsFunctionType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsPolymorphicClass, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsTypedefType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsAnonymousType, ());
- LLDB_REGISTER_METHOD(bool, SBType, IsScopedEnumerationType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetFunctionReturnType, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeList, SBType, GetFunctionArgumentTypes,
- ());
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfMemberFunctions, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeMemberFunction, SBType,
- GetMemberFunctionAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetUnqualifiedType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetCanonicalType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetEnumerationIntegerType, ());
- LLDB_REGISTER_METHOD(lldb::BasicType, SBType, GetBasicType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetBasicType, (lldb::BasicType));
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfDirectBaseClasses, ());
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfVirtualBaseClasses, ());
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfFields, ());
- LLDB_REGISTER_METHOD(bool, SBType, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetDirectBaseClassAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetVirtualBaseClassAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeEnumMemberList, SBType, GetEnumMembers,
- ());
- LLDB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetFieldAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBType, IsTypeComplete, ());
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetTypeFlags, ());
- LLDB_REGISTER_METHOD(lldb::SBModule, SBType, GetModule, ());
- LLDB_REGISTER_METHOD(const char *, SBType, GetName, ());
- LLDB_REGISTER_METHOD(const char *, SBType, GetDisplayTypeName, ());
- LLDB_REGISTER_METHOD(lldb::TypeClass, SBType, GetTypeClass, ());
- LLDB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfTemplateArguments, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBType, GetTemplateArgumentType,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::TemplateArgumentKind, SBType,
- GetTemplateArgumentKind, (uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeList, (const lldb::SBTypeList &));
- LLDB_REGISTER_METHOD(bool, SBTypeList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeList, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeList &,
- SBTypeList, operator=,(const lldb::SBTypeList &));
- LLDB_REGISTER_METHOD(void, SBTypeList, Append, (lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeList, GetTypeAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBTypeList, GetSize, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeMember, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeMember, (const lldb::SBTypeMember &));
- LLDB_REGISTER_METHOD(lldb::SBTypeMember &,
- SBTypeMember, operator=,(const lldb::SBTypeMember &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeMember, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeMember, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeMember, GetName, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeMember, GetType, ());
- LLDB_REGISTER_METHOD(uint64_t, SBTypeMember, GetOffsetInBytes, ());
- LLDB_REGISTER_METHOD(uint64_t, SBTypeMember, GetOffsetInBits, ());
- LLDB_REGISTER_METHOD(bool, SBTypeMember, IsBitfield, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeMember, GetBitfieldSizeInBits, ());
- LLDB_REGISTER_METHOD(bool, SBTypeMember, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeMemberFunction, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeMemberFunction,
- (const lldb::SBTypeMemberFunction &));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeMemberFunction &,
- SBTypeMemberFunction, operator=,(const lldb::SBTypeMemberFunction &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeMemberFunction, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeMemberFunction, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetName, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetDemangledName,
- ());
- LLDB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetMangledName,
- ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction, GetType, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction, GetReturnType, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeMemberFunction, GetNumberOfArguments,
- ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction,
- GetArgumentTypeAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::MemberFunctionKind, SBTypeMemberFunction,
- GetKind, ());
- LLDB_REGISTER_METHOD(bool, SBTypeMemberFunction, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeCategory.cpp b/lldb/source/API/SBTypeCategory.cpp
index 75acb5a14c505..e6461d47c6337 100644
--- a/lldb/source/API/SBTypeCategory.cpp
+++ b/lldb/source/API/SBTypeCategory.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeCategory.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBTypeFilter.h"
@@ -651,78 +651,3 @@ bool SBTypeCategory::IsDefaultCategory() {
return (strcmp(m_opaque_sp->GetName(), "default") == 0);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeCategory>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeCategory, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeCategory, (const lldb::SBTypeCategory &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeCategory, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeCategory, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, GetEnabled, ());
- LLDB_REGISTER_METHOD(void, SBTypeCategory, SetEnabled, (bool));
- LLDB_REGISTER_METHOD(const char *, SBTypeCategory, GetName, ());
- LLDB_REGISTER_METHOD(lldb::LanguageType, SBTypeCategory, GetLanguageAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumLanguages, ());
- LLDB_REGISTER_METHOD(void, SBTypeCategory, AddLanguage,
- (lldb::LanguageType));
- LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFormats, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSummaries, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFilters, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSynthetics, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForSyntheticAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
- GetSyntheticForType, (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
- GetSyntheticAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSummary,
- (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSynthetic,
- (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForFilterAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForFormatAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForSummaryAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFormat,
- (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFormat,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSummary,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFilter,
- (lldb::SBTypeNameSpecifier, lldb::SBTypeFilter));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFilter,
- (lldb::SBTypeNameSpecifier));
- LLDB_REGISTER_METHOD(bool, SBTypeCategory, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeCategory &,
- SBTypeCategory, operator=,(const lldb::SBTypeCategory &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeCategory, operator==,(lldb::SBTypeCategory &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeCategory, operator!=,(lldb::SBTypeCategory &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeEnumMember.cpp b/lldb/source/API/SBTypeEnumMember.cpp
index 036b3ce7d1de4..e04f51f39a912 100644
--- a/lldb/source/API/SBTypeEnumMember.cpp
+++ b/lldb/source/API/SBTypeEnumMember.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeEnumMember.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBStream.h"
@@ -195,40 +195,3 @@ bool SBTypeEnumMember::GetDescription(
}
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeEnumMember>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeEnumMember, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeEnumMember,
- (const lldb::SBTypeEnumMember &));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeEnumMember &,
- SBTypeEnumMember, operator=,(const lldb::SBTypeEnumMember &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMember, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMember, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeEnumMember, GetName, ());
- LLDB_REGISTER_METHOD(int64_t, SBTypeEnumMember, GetValueAsSigned, ());
- LLDB_REGISTER_METHOD(uint64_t, SBTypeEnumMember, GetValueAsUnsigned, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeEnumMember, GetType, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeEnumMemberList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeEnumMemberList,
- (const lldb::SBTypeEnumMemberList &));
- LLDB_REGISTER_METHOD(bool, SBTypeEnumMemberList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMemberList, operator bool, ());
- LLDB_REGISTER_METHOD(
- lldb::SBTypeEnumMemberList &,
- SBTypeEnumMemberList, operator=,(const lldb::SBTypeEnumMemberList &));
- LLDB_REGISTER_METHOD(void, SBTypeEnumMemberList, Append,
- (lldb::SBTypeEnumMember));
- LLDB_REGISTER_METHOD(lldb::SBTypeEnumMember, SBTypeEnumMemberList,
- GetTypeEnumMemberAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(uint32_t, SBTypeEnumMemberList, GetSize, ());
- LLDB_REGISTER_METHOD(bool, SBTypeEnumMember, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeFilter.cpp b/lldb/source/API/SBTypeFilter.cpp
index 8b7fa4bc5b388..389da2b2278c5 100644
--- a/lldb/source/API/SBTypeFilter.cpp
+++ b/lldb/source/API/SBTypeFilter.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeFilter.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
@@ -188,36 +188,3 @@ bool SBTypeFilter::CopyOnWrite_Impl() {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeFilter>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFilter, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFilter, (uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFilter, (const lldb::SBTypeFilter &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeFilter, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeFilter, operator bool, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeFilter, GetOptions, ());
- LLDB_REGISTER_METHOD(void, SBTypeFilter, SetOptions, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeFilter, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(void, SBTypeFilter, Clear, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeFilter, GetNumberOfExpressionPaths,
- ());
- LLDB_REGISTER_METHOD(const char *, SBTypeFilter, GetExpressionPathAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeFilter, ReplaceExpressionPathAtIndex,
- (uint32_t, const char *));
- LLDB_REGISTER_METHOD(void, SBTypeFilter, AppendExpressionPath,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBTypeFilter &,
- SBTypeFilter, operator=,(const lldb::SBTypeFilter &));
- LLDB_REGISTER_METHOD(bool, SBTypeFilter, operator==,(lldb::SBTypeFilter &));
- LLDB_REGISTER_METHOD(bool, SBTypeFilter, IsEqualTo, (lldb::SBTypeFilter &));
- LLDB_REGISTER_METHOD(bool, SBTypeFilter, operator!=,(lldb::SBTypeFilter &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeFormat.cpp b/lldb/source/API/SBTypeFormat.cpp
index eeb2cbb4465f3..4cc1daf201d0a 100644
--- a/lldb/source/API/SBTypeFormat.cpp
+++ b/lldb/source/API/SBTypeFormat.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeFormat.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
@@ -189,32 +189,3 @@ bool SBTypeFormat::CopyOnWrite_Impl(Type type) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeFormat>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, (lldb::Format, uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const char *, uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const lldb::SBTypeFormat &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeFormat, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeFormat, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::Format, SBTypeFormat, GetFormat, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeFormat, GetTypeName, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeFormat, GetOptions, ());
- LLDB_REGISTER_METHOD(void, SBTypeFormat, SetFormat, (lldb::Format));
- LLDB_REGISTER_METHOD(void, SBTypeFormat, SetTypeName, (const char *));
- LLDB_REGISTER_METHOD(void, SBTypeFormat, SetOptions, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeFormat, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(lldb::SBTypeFormat &,
- SBTypeFormat, operator=,(const lldb::SBTypeFormat &));
- LLDB_REGISTER_METHOD(bool, SBTypeFormat, operator==,(lldb::SBTypeFormat &));
- LLDB_REGISTER_METHOD(bool, SBTypeFormat, IsEqualTo, (lldb::SBTypeFormat &));
- LLDB_REGISTER_METHOD(bool, SBTypeFormat, operator!=,(lldb::SBTypeFormat &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeNameSpecifier.cpp b/lldb/source/API/SBTypeNameSpecifier.cpp
index b84c42eff9e34..3cb586c0641af 100644
--- a/lldb/source/API/SBTypeNameSpecifier.cpp
+++ b/lldb/source/API/SBTypeNameSpecifier.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeNameSpecifier.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBType.h"
@@ -155,34 +155,3 @@ void SBTypeNameSpecifier::SetSP(
SBTypeNameSpecifier::SBTypeNameSpecifier(
const lldb::TypeNameSpecifierImplSP &type_namespec_sp)
: m_opaque_sp(type_namespec_sp) {}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeNameSpecifier>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, (const char *, bool));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, (lldb::SBType));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier,
- (const lldb::SBTypeNameSpecifier &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeNameSpecifier, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeNameSpecifier, operator bool, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeNameSpecifier, GetName, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBTypeNameSpecifier, GetType, ());
- LLDB_REGISTER_METHOD(bool, SBTypeNameSpecifier, IsRegex, ());
- LLDB_REGISTER_METHOD(bool, SBTypeNameSpecifier, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeNameSpecifier &,
- SBTypeNameSpecifier, operator=,(const lldb::SBTypeNameSpecifier &));
- LLDB_REGISTER_METHOD(
- bool, SBTypeNameSpecifier, operator==,(lldb::SBTypeNameSpecifier &));
- LLDB_REGISTER_METHOD(bool, SBTypeNameSpecifier, IsEqualTo,
- (lldb::SBTypeNameSpecifier &));
- LLDB_REGISTER_METHOD(
- bool, SBTypeNameSpecifier, operator!=,(lldb::SBTypeNameSpecifier &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp
index 1072baf4fd9c2..72ae8438b0e46 100644
--- a/lldb/source/API/SBTypeSummary.cpp
+++ b/lldb/source/API/SBTypeSummary.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeSummary.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBValue.h"
@@ -463,65 +463,3 @@ bool SBTypeSummary::ChangeSummaryType(bool want_script) {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeSummaryOptions>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions, ());
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions,
- (const lldb::SBTypeSummaryOptions &));
- LLDB_REGISTER_METHOD(bool, SBTypeSummaryOptions, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummaryOptions, operator bool, ());
- LLDB_REGISTER_METHOD(lldb::LanguageType, SBTypeSummaryOptions, GetLanguage,
- ());
- LLDB_REGISTER_METHOD(lldb::TypeSummaryCapping, SBTypeSummaryOptions,
- GetCapping, ());
- LLDB_REGISTER_METHOD(void, SBTypeSummaryOptions, SetLanguage,
- (lldb::LanguageType));
- LLDB_REGISTER_METHOD(void, SBTypeSummaryOptions, SetCapping,
- (lldb::TypeSummaryCapping));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions,
- (const lldb_private::TypeSummaryOptions &));
-}
-
-template <>
-void RegisterMethods<SBTypeSummary>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSummary, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary,
- CreateWithSummaryString,
- (const char *, uint32_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary,
- CreateWithFunctionName,
- (const char *, uint32_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary,
- CreateWithScriptCode, (const char *, uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSummary, (const lldb::SBTypeSummary &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummary, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummary, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionCode, ());
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionName, ());
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsSummaryString, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeSummary, GetData, ());
- LLDB_REGISTER_METHOD(uint32_t, SBTypeSummary, GetOptions, ());
- LLDB_REGISTER_METHOD(void, SBTypeSummary, SetOptions, (uint32_t));
- LLDB_REGISTER_METHOD(void, SBTypeSummary, SetSummaryString, (const char *));
- LLDB_REGISTER_METHOD(void, SBTypeSummary, SetFunctionName, (const char *));
- LLDB_REGISTER_METHOD(void, SBTypeSummary, SetFunctionCode, (const char *));
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, DoesPrintValue, (lldb::SBValue));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeSummary &,
- SBTypeSummary, operator=,(const lldb::SBTypeSummary &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeSummary, operator==,(lldb::SBTypeSummary &));
- LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsEqualTo,
- (lldb::SBTypeSummary &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeSummary, operator!=,(lldb::SBTypeSummary &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBTypeSynthetic.cpp b/lldb/source/API/SBTypeSynthetic.cpp
index 502feb40120b2..0f03613e77a98 100644
--- a/lldb/source/API/SBTypeSynthetic.cpp
+++ b/lldb/source/API/SBTypeSynthetic.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBTypeSynthetic.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
@@ -209,39 +209,3 @@ bool SBTypeSynthetic::CopyOnWrite_Impl() {
return true;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBTypeSynthetic>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, ());
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic,
- CreateWithClassName, (const char *, uint32_t));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic,
- CreateWithScriptCode, (const char *, uint32_t));
- LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &));
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, operator bool, ());
- LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassCode, ());
- LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassName, ());
- LLDB_REGISTER_METHOD(const char *, SBTypeSynthetic, GetData, ());
- LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassName, (const char *));
- LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassCode, (const char *));
- LLDB_REGISTER_METHOD(uint32_t, SBTypeSynthetic, GetOptions, ());
- LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetOptions, (uint32_t));
- LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(
- lldb::SBTypeSynthetic &,
- SBTypeSynthetic, operator=,(const lldb::SBTypeSynthetic &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeSynthetic, operator==,(lldb::SBTypeSynthetic &));
- LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsEqualTo,
- (lldb::SBTypeSynthetic &));
- LLDB_REGISTER_METHOD(bool,
- SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &));
-}
-
-}
-}
diff --git a/lldb/source/API/SBUnixSignals.cpp b/lldb/source/API/SBUnixSignals.cpp
index a933f6d223336..ac920e08bf23f 100644
--- a/lldb/source/API/SBUnixSignals.cpp
+++ b/lldb/source/API/SBUnixSignals.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/UnixSignals.h"
@@ -170,36 +170,3 @@ int32_t SBUnixSignals::GetSignalAtIndex(int32_t index) const {
return LLDB_INVALID_SIGNAL_NUMBER;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBUnixSignals>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, ());
- LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &));
- LLDB_REGISTER_METHOD(
- const lldb::SBUnixSignals &,
- SBUnixSignals, operator=,(const lldb::SBUnixSignals &));
- LLDB_REGISTER_METHOD(void, SBUnixSignals, Clear, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBUnixSignals, GetSignalAsCString,
- (int32_t));
- LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalNumberFromName,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldSuppress,
- (int32_t));
- LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldSuppress,
- (int32_t, bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldStop, (int32_t));
- LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldStop, (int32_t, bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldNotify, (int32_t));
- LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldNotify, (int32_t, bool));
- LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetNumSignals, ());
- LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalAtIndex,
- (int32_t));
-}
-
-}
-}
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index d61f11bb807d6..1e3e2bd32b44f 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBValue.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBDeclaration.h"
#include "lldb/API/SBStream.h"
@@ -1554,130 +1554,3 @@ lldb::SBValue SBValue::Persist() {
}
return LLDB_RECORD_RESULT(persisted_sb);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBValue>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBValue, ());
- LLDB_REGISTER_CONSTRUCTOR(SBValue, (const lldb::ValueObjectSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBValue, (const lldb::SBValue &));
- LLDB_REGISTER_METHOD(lldb::SBValue &,
- SBValue, operator=,(const lldb::SBValue &));
- LLDB_REGISTER_METHOD(bool, SBValue, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBValue, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBValue, Clear, ());
- LLDB_REGISTER_METHOD(lldb::SBError, SBValue, GetError, ());
- LLDB_REGISTER_METHOD(lldb::user_id_t, SBValue, GetID, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetName, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetTypeName, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetDisplayTypeName, ());
- LLDB_REGISTER_METHOD(size_t, SBValue, GetByteSize, ());
- LLDB_REGISTER_METHOD(bool, SBValue, IsInScope, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetValue, ());
- LLDB_REGISTER_METHOD(lldb::ValueType, SBValue, GetValueType, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetObjectDescription, ());
- LLDB_REGISTER_METHOD(lldb::SBType, SBValue, GetType, ());
- LLDB_REGISTER_METHOD(bool, SBValue, GetValueDidChange, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetSummary, ());
- LLDB_REGISTER_METHOD(const char *, SBValue, GetSummary,
- (lldb::SBStream &, lldb::SBTypeSummaryOptions &));
- LLDB_REGISTER_METHOD(const char *, SBValue, GetLocation, ());
- LLDB_REGISTER_METHOD(bool, SBValue, SetValueFromCString, (const char *));
- LLDB_REGISTER_METHOD(bool, SBValue, SetValueFromCString,
- (const char *, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBValue, GetTypeFormat, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBValue, GetTypeSummary, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBValue, GetTypeFilter, ());
- LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBValue, GetTypeSynthetic, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateChildAtOffset,
- (const char *, uint32_t, lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, Cast, (lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromExpression,
- (const char *, const char *));
- LLDB_REGISTER_METHOD(
- lldb::SBValue, SBValue, CreateValueFromExpression,
- (const char *, const char *, lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromAddress,
- (const char *, lldb::addr_t, lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromData,
- (const char *, lldb::SBData, lldb::SBType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildAtIndex, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildAtIndex,
- (uint32_t, lldb::DynamicValueType, bool));
- LLDB_REGISTER_METHOD(uint32_t, SBValue, GetIndexOfChildWithName,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetDynamicValue,
- (lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetStaticValue, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetNonSyntheticValue, ());
- LLDB_REGISTER_METHOD(lldb::DynamicValueType, SBValue, GetPreferDynamicValue,
- ());
- LLDB_REGISTER_METHOD(void, SBValue, SetPreferDynamicValue,
- (lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(bool, SBValue, GetPreferSyntheticValue, ());
- LLDB_REGISTER_METHOD(void, SBValue, SetPreferSyntheticValue, (bool));
- LLDB_REGISTER_METHOD(bool, SBValue, IsDynamic, ());
- LLDB_REGISTER_METHOD(bool, SBValue, IsSynthetic, ());
- LLDB_REGISTER_METHOD(bool, SBValue, IsSyntheticChildrenGenerated, ());
- LLDB_REGISTER_METHOD(void, SBValue, SetSyntheticChildrenGenerated, (bool));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, GetValueForExpressionPath,
- (const char *));
- LLDB_REGISTER_METHOD(int64_t, SBValue, GetValueAsSigned,
- (lldb::SBError &, int64_t));
- LLDB_REGISTER_METHOD(uint64_t, SBValue, GetValueAsUnsigned,
- (lldb::SBError &, uint64_t));
- LLDB_REGISTER_METHOD(int64_t, SBValue, GetValueAsSigned, (int64_t));
- LLDB_REGISTER_METHOD(uint64_t, SBValue, GetValueAsUnsigned, (uint64_t));
- LLDB_REGISTER_METHOD(bool, SBValue, MightHaveChildren, ());
- LLDB_REGISTER_METHOD(bool, SBValue, IsRuntimeSupportValue, ());
- LLDB_REGISTER_METHOD(uint32_t, SBValue, GetNumChildren, ());
- LLDB_REGISTER_METHOD(uint32_t, SBValue, GetNumChildren, (uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, Dereference, ());
- LLDB_REGISTER_METHOD(bool, SBValue, TypeIsPointerType, ());
- LLDB_REGISTER_METHOD(void *, SBValue, GetOpaqueType, ());
- LLDB_REGISTER_METHOD(lldb::SBTarget, SBValue, GetTarget, ());
- LLDB_REGISTER_METHOD(lldb::SBProcess, SBValue, GetProcess, ());
- LLDB_REGISTER_METHOD(lldb::SBThread, SBValue, GetThread, ());
- LLDB_REGISTER_METHOD(lldb::SBFrame, SBValue, GetFrame, ());
- LLDB_REGISTER_METHOD_CONST(lldb::ValueObjectSP, SBValue, GetSP, ());
- LLDB_REGISTER_METHOD(bool, SBValue, GetExpressionPath, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(bool, SBValue, GetExpressionPath,
- (lldb::SBStream &, bool));
- LLDB_REGISTER_METHOD_CONST(lldb::SBValue, SBValue, EvaluateExpression,
- (const char *));
- LLDB_REGISTER_METHOD_CONST(
- lldb::SBValue, SBValue, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD_CONST(
- lldb::SBValue, SBValue, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &, const char *));
- LLDB_REGISTER_METHOD(bool, SBValue, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::Format, SBValue, GetFormat, ());
- LLDB_REGISTER_METHOD(void, SBValue, SetFormat, (lldb::Format));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, AddressOf, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBValue, GetLoadAddress, ());
- LLDB_REGISTER_METHOD(lldb::SBAddress, SBValue, GetAddress, ());
- LLDB_REGISTER_METHOD(lldb::SBData, SBValue, GetPointeeData,
- (uint32_t, uint32_t));
- LLDB_REGISTER_METHOD(lldb::SBData, SBValue, GetData, ());
- LLDB_REGISTER_METHOD(bool, SBValue, SetData,
- (lldb::SBData &, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, Clone, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBDeclaration, SBValue, GetDeclaration, ());
- LLDB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, Watch,
- (bool, bool, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, Watch,
- (bool, bool, bool));
- LLDB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, WatchPointee,
- (bool, bool, bool, lldb::SBError &));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, Persist, ());
-}
-
-}
-}
diff --git a/lldb/source/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp
index 7e797d2b7801f..db46da2f9ebf3 100644
--- a/lldb/source/API/SBValueList.cpp
+++ b/lldb/source/API/SBValueList.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBValueList.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBValue.h"
#include "lldb/Core/ValueObjectList.h"
@@ -200,30 +200,3 @@ ValueListImpl &SBValueList::ref() {
CreateIfNeeded();
return *m_opaque_up;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBValueList>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBValueList, ());
- LLDB_REGISTER_CONSTRUCTOR(SBValueList, (const lldb::SBValueList &));
- LLDB_REGISTER_METHOD_CONST(bool, SBValueList, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBValueList, operator bool, ());
- LLDB_REGISTER_METHOD(void, SBValueList, Clear, ());
- LLDB_REGISTER_METHOD(const lldb::SBValueList &,
- SBValueList, operator=,(const lldb::SBValueList &));
- LLDB_REGISTER_METHOD(void, SBValueList, Append, (const lldb::SBValue &));
- LLDB_REGISTER_METHOD(void, SBValueList, Append,
- (const lldb::SBValueList &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBValue, SBValueList, GetValueAtIndex,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBValueList, GetSize, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBValueList, FindValueObjectByUID,
- (lldb::user_id_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBValue, SBValueList, GetFirstValueByName,
- (const char *));
-}
-
-}
-}
diff --git a/lldb/source/API/SBVariablesOptions.cpp b/lldb/source/API/SBVariablesOptions.cpp
index 1af582a0c3d70..1b6d9605a50e3 100644
--- a/lldb/source/API/SBVariablesOptions.cpp
+++ b/lldb/source/API/SBVariablesOptions.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBVariablesOptions.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBTarget.h"
#include "lldb/Target/Target.h"
@@ -232,43 +232,3 @@ SBVariablesOptions::SBVariablesOptions(VariablesOptionsImpl *lldb_object_ptr)
void SBVariablesOptions::SetOptions(VariablesOptionsImpl *lldb_object_ptr) {
m_opaque_up.reset(std::move(lldb_object_ptr));
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBVariablesOptions>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBVariablesOptions, ());
- LLDB_REGISTER_CONSTRUCTOR(SBVariablesOptions,
- (const lldb::SBVariablesOptions &));
- LLDB_REGISTER_METHOD(
- lldb::SBVariablesOptions &,
- SBVariablesOptions, operator=,(const lldb::SBVariablesOptions &));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeArguments,
- ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeArguments, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions,
- GetIncludeRecognizedArguments,
- (const lldb::SBTarget &));
- LLDB_REGISTER_METHOD(void, SBVariablesOptions,
- SetIncludeRecognizedArguments, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeLocals, ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeLocals, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeStatics, ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeStatics, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetInScopeOnly, ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetInScopeOnly, (bool));
- LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions,
- GetIncludeRuntimeSupportValues, ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions,
- SetIncludeRuntimeSupportValues, (bool));
- LLDB_REGISTER_METHOD_CONST(lldb::DynamicValueType, SBVariablesOptions,
- GetUseDynamic, ());
- LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetUseDynamic,
- (lldb::DynamicValueType));
-}
-
-}
-}
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp
index eba75dea8f8dd..eb6b77558a140 100644
--- a/lldb/source/API/SBWatchpoint.cpp
+++ b/lldb/source/API/SBWatchpoint.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBWatchpoint.h"
-#include "SBReproducerPrivate.h"
+#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBDefines.h"
@@ -303,50 +303,3 @@ SBWatchpoint SBWatchpoint::GetWatchpointFromEvent(const lldb::SBEvent &event) {
Watchpoint::WatchpointEventData::GetWatchpointFromEvent(event.GetSP());
return LLDB_RECORD_RESULT(sb_watchpoint);
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBWatchpoint>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, ());
- LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::SBWatchpoint &));
- LLDB_REGISTER_METHOD(const lldb::SBWatchpoint &,
- SBWatchpoint, operator=,(const lldb::SBWatchpoint &));
- LLDB_REGISTER_METHOD(lldb::watch_id_t, SBWatchpoint, GetID, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(
- bool, SBWatchpoint, operator==,(const lldb::SBWatchpoint &));
- LLDB_REGISTER_METHOD_CONST(
- bool, SBWatchpoint, operator!=,(const lldb::SBWatchpoint &));
- LLDB_REGISTER_METHOD(lldb::SBError, SBWatchpoint, GetError, ());
- LLDB_REGISTER_METHOD(int32_t, SBWatchpoint, GetHardwareIndex, ());
- LLDB_REGISTER_METHOD(lldb::addr_t, SBWatchpoint, GetWatchAddress, ());
- LLDB_REGISTER_METHOD(size_t, SBWatchpoint, GetWatchSize, ());
- LLDB_REGISTER_METHOD(void, SBWatchpoint, SetEnabled, (bool));
- LLDB_REGISTER_METHOD(bool, SBWatchpoint, IsEnabled, ());
- LLDB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetHitCount, ());
- LLDB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetIgnoreCount, ());
- LLDB_REGISTER_METHOD(void, SBWatchpoint, SetIgnoreCount, (uint32_t));
- LLDB_REGISTER_METHOD(const char *, SBWatchpoint, GetCondition, ());
- LLDB_REGISTER_METHOD(void, SBWatchpoint, SetCondition, (const char *));
- LLDB_REGISTER_METHOD(bool, SBWatchpoint, GetDescription,
- (lldb::SBStream &, lldb::DescriptionLevel));
- LLDB_REGISTER_METHOD(void, SBWatchpoint, Clear, ());
- LLDB_REGISTER_METHOD_CONST(lldb::WatchpointSP, SBWatchpoint, GetSP, ());
- LLDB_REGISTER_METHOD(void, SBWatchpoint, SetSP,
- (const lldb::WatchpointSP &));
- LLDB_REGISTER_STATIC_METHOD(bool, SBWatchpoint, EventIsWatchpointEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::WatchpointEventType, SBWatchpoint,
- GetWatchpointEventTypeFromEvent,
- (const lldb::SBEvent &));
- LLDB_REGISTER_STATIC_METHOD(lldb::SBWatchpoint, SBWatchpoint,
- GetWatchpointFromEvent,
- (const lldb::SBEvent &));
-}
-
-}
-}
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 6afa4742698bd..37b28687d08bc 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -342,7 +342,6 @@ ScriptInterpreterPythonImpl::Locker::Locker(
: ScriptInterpreterLocker(),
m_teardown_session((on_leave & TearDownSession) == TearDownSession),
m_python_interpreter(py_interpreter) {
- repro::Recorder::PrivateThread();
DoAcquireLock();
if ((on_entry & InitSession) == InitSession) {
if (!DoInitSession(on_entry, in, out, err)) {
diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp
index b3285f4b3776a..8365701f8e3be 100644
--- a/lldb/source/Utility/ReproducerInstrumentation.cpp
+++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
@@ -19,244 +19,28 @@ using namespace lldb_private::repro;
// Whether we're currently across the API boundary.
static thread_local bool g_global_boundary = false;
-void *IndexToObject::GetObjectForIndexImpl(unsigned idx) {
- return m_mapping.lookup(idx);
-}
-
-void IndexToObject::AddObjectForIndexImpl(unsigned idx, void *object) {
- assert(idx != 0 && "Cannot add object for sentinel");
- m_mapping[idx] = object;
-}
-
-std::vector<void *> IndexToObject::GetAllObjects() const {
- std::vector<std::pair<unsigned, void *>> pairs;
- for (auto &e : m_mapping) {
- pairs.emplace_back(e.first, e.second);
- }
-
- // Sort based on index.
- std::sort(pairs.begin(), pairs.end(),
- [](auto &lhs, auto &rhs) { return lhs.first < rhs.first; });
-
- std::vector<void *> objects;
- objects.reserve(pairs.size());
- for (auto &p : pairs) {
- objects.push_back(p.second);
- }
-
- return objects;
-}
-
-template <> const uint8_t *Deserializer::Deserialize<const uint8_t *>() {
- return Deserialize<uint8_t *>();
-}
-
-template <> void *Deserializer::Deserialize<void *>() {
- return const_cast<void *>(Deserialize<const void *>());
-}
-
-template <> const void *Deserializer::Deserialize<const void *>() {
- return nullptr;
-}
-
-template <> char *Deserializer::Deserialize<char *>() {
- return const_cast<char *>(Deserialize<const char *>());
-}
-
-template <> const char *Deserializer::Deserialize<const char *>() {
- const size_t size = Deserialize<size_t>();
- if (size == std::numeric_limits<size_t>::max())
- return nullptr;
- assert(HasData(size + 1));
- const char *str = m_buffer.data();
- m_buffer = m_buffer.drop_front(size + 1);
-#ifdef LLDB_REPRO_INSTR_TRACE
- llvm::errs() << "Deserializing with " << LLVM_PRETTY_FUNCTION << " -> \""
- << str << "\"\n";
-#endif
- return str;
-}
-
-template <> const char **Deserializer::Deserialize<const char **>() {
- const size_t size = Deserialize<size_t>();
- if (size == 0)
- return nullptr;
- const char **r =
- reinterpret_cast<const char **>(calloc(size + 1, sizeof(char *)));
- for (size_t i = 0; i < size; ++i)
- r[i] = Deserialize<const char *>();
- return r;
-}
-
-void Deserializer::CheckSequence(unsigned sequence) {
- if (m_expected_sequence && *m_expected_sequence != sequence)
- llvm::report_fatal_error(
- "The result does not match the preceding "
- "function. This is probably the result of concurrent "
- "use of the SB API during capture, which is currently not "
- "supported.");
- m_expected_sequence.reset();
-}
-
-bool Registry::Replay(const FileSpec &file) {
- auto error_or_file = llvm::MemoryBuffer::getFile(file.GetPath());
- if (auto err = error_or_file.getError())
- return false;
-
- return Replay((*error_or_file)->getBuffer());
-}
-
-bool Registry::Replay(llvm::StringRef buffer) {
- Deserializer deserializer(buffer);
- return Replay(deserializer);
-}
-
-bool Registry::Replay(Deserializer &deserializer) {
-#ifndef LLDB_REPRO_INSTR_TRACE
- Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
-#endif
-
- // Disable buffering stdout so that we approximate the way things get flushed
- // during an interactive session.
- setvbuf(stdout, nullptr, _IONBF, 0);
-
- while (deserializer.HasData(1)) {
- unsigned sequence = deserializer.Deserialize<unsigned>();
- unsigned id = deserializer.Deserialize<unsigned>();
-
-#ifndef LLDB_REPRO_INSTR_TRACE
- LLDB_LOG(log, "Replaying {0}: {1}", id, GetSignature(id));
-#else
- llvm::errs() << "Replaying " << id << ": " << GetSignature(id) << "\n";
-#endif
-
- deserializer.SetExpectedSequence(sequence);
- GetReplayer(id)->operator()(deserializer);
- }
-
- // Add a small artificial delay to ensure that all asynchronous events have
- // completed before we exit.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
- return true;
-}
-
-void Registry::DoRegister(uintptr_t RunID, std::unique_ptr<Replayer> replayer,
- SignatureStr signature) {
- const unsigned id = m_replayers.size() + 1;
- assert(m_replayers.find(RunID) == m_replayers.end());
- m_replayers[RunID] = std::make_pair(std::move(replayer), id);
- m_ids[id] =
- std::make_pair(m_replayers[RunID].first.get(), std::move(signature));
-}
-
-unsigned Registry::GetID(uintptr_t addr) {
- unsigned id = m_replayers[addr].second;
- assert(id != 0 && "Forgot to add function to registry?");
- return id;
-}
-
-std::string Registry::GetSignature(unsigned id) {
- assert(m_ids.count(id) != 0 && "ID not in registry");
- return m_ids[id].second.ToString();
-}
-
-void Registry::CheckID(unsigned expected, unsigned actual) {
- if (expected != actual) {
- llvm::errs() << "Reproducer expected signature " << expected << ": '"
- << GetSignature(expected) << "'\n";
- llvm::errs() << "Reproducer actual signature " << actual << ": '"
- << GetSignature(actual) << "'\n";
- llvm::report_fatal_error(
- "Detected reproducer replay divergence. Refusing to continue.");
- }
-
-#ifdef LLDB_REPRO_INSTR_TRACE
- llvm::errs() << "Replaying " << actual << ": " << GetSignature(actual)
- << "\n";
-#endif
-}
-
-Replayer *Registry::GetReplayer(unsigned id) {
- assert(m_ids.count(id) != 0 && "ID not in registry");
- return m_ids[id].first;
-}
-
-std::string Registry::SignatureStr::ToString() const {
- return (result + (result.empty() ? "" : " ") + scope + "::" + name + args)
- .str();
-}
-
-unsigned ObjectToIndex::GetIndexForObjectImpl(const void *object) {
- unsigned index = m_mapping.size() + 1;
- auto it = m_mapping.find(object);
- if (it == m_mapping.end())
- m_mapping[object] = index;
- return m_mapping[object];
-}
-
-Recorder::Recorder()
- : m_pretty_func(), m_pretty_args(),
-
- m_sequence(std::numeric_limits<unsigned>::max()) {
+Recorder::Recorder() {
if (!g_global_boundary) {
g_global_boundary = true;
m_local_boundary = true;
- m_sequence = GetNextSequenceNumber();
}
}
Recorder::Recorder(llvm::StringRef pretty_func, std::string &&pretty_args)
- : m_serializer(nullptr), m_pretty_func(pretty_func),
- m_pretty_args(pretty_args), m_local_boundary(false),
- m_result_recorded(true),
- m_sequence(std::numeric_limits<unsigned>::max()) {
+ : m_local_boundary(false) {
if (!g_global_boundary) {
g_global_boundary = true;
m_local_boundary = true;
- m_sequence = GetNextSequenceNumber();
LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})",
- m_pretty_func, m_pretty_args);
+ pretty_func, pretty_args);
}
}
Recorder::~Recorder() {
- assert(m_result_recorded && "Did you forget LLDB_RECORD_RESULT?");
UpdateBoundary();
}
-unsigned Recorder::GetSequenceNumber() const {
- assert(m_sequence != std::numeric_limits<unsigned>::max());
- return m_sequence;
-}
-
-void Recorder::PrivateThread() { g_global_boundary = true; }
-
void Recorder::UpdateBoundary() {
if (m_local_boundary)
g_global_boundary = false;
}
-
-void InstrumentationData::Initialize(Serializer &serializer,
- Registry ®istry) {
- InstanceImpl().emplace(serializer, registry);
-}
-
-void InstrumentationData::Initialize(Deserializer &deserializer,
- Registry ®istry) {
- InstanceImpl().emplace(deserializer, registry);
-}
-
-InstrumentationData &InstrumentationData::Instance() {
- if (!InstanceImpl())
- InstanceImpl().emplace();
- return *InstanceImpl();
-}
-
-llvm::Optional<InstrumentationData> &InstrumentationData::InstanceImpl() {
- static llvm::Optional<InstrumentationData> g_instrumentation_data;
- return g_instrumentation_data;
-}
-
-std::atomic<unsigned> lldb_private::repro::Recorder::g_sequence;
-std::mutex lldb_private::repro::Recorder::g_mutex;
diff --git a/lldb/unittests/Utility/CMakeLists.txt b/lldb/unittests/Utility/CMakeLists.txt
index d7d84aa2cde3f..90e97f786a74b 100644
--- a/lldb/unittests/Utility/CMakeLists.txt
+++ b/lldb/unittests/Utility/CMakeLists.txt
@@ -22,7 +22,6 @@ add_lldb_unittest(UtilityTests
RangeTest.cpp
RegisterValueTest.cpp
RegularExpressionTest.cpp
- ReproducerInstrumentationTest.cpp
ReproducerTest.cpp
ScalarTest.cpp
SharedClusterTest.cpp
diff --git a/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp b/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp
deleted file mode 100644
index ce259c5969e09..0000000000000
--- a/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp
+++ /dev/null
@@ -1,1167 +0,0 @@
-//===-- ReproducerInstrumentationTest.cpp ---------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-#include <cmath>
-#include <limits>
-
-#include "lldb/Utility/ReproducerInstrumentation.h"
-
-using namespace lldb_private;
-using namespace lldb_private::repro;
-
-struct Foo {
- int m = 1;
-};
-struct Bar {
- double m = 2;
-};
-
-bool operator==(const Foo &LHS, const Foo &RHS) { return LHS.m == RHS.m; }
-bool operator==(const Bar &LHS, const Bar &RHS) { return LHS.m == RHS.m; }
-
-struct Pod {
- bool a = true;
- bool b = false;
- char c = 'a';
- float d = 1.1f;
- int e = 2;
- long long f = 3;
- long g = 4;
- short h = 5;
- unsigned char i = 'b';
- unsigned int j = 6;
- unsigned long long k = 7;
- unsigned long l = 8;
- unsigned short m = 9;
-
- Pod() {}
-};
-
-class TestingRegistry : public Registry {
-public:
- TestingRegistry();
-};
-
-static std::unique_ptr<TestingRegistry> g_registry;
-static llvm::Optional<Serializer> g_serializer;
-static llvm::Optional<Deserializer> g_deserializer;
-
-class TestInstrumentationData : public InstrumentationData {
-public:
- TestInstrumentationData() : InstrumentationData() {}
- TestInstrumentationData(Serializer &serializer, Registry ®istry)
- : InstrumentationData(serializer, registry) {}
- TestInstrumentationData(Deserializer &deserializer, Registry ®istry)
- : InstrumentationData(deserializer, registry) {}
-};
-
-inline TestInstrumentationData GetTestInstrumentationData() {
- assert(!(g_serializer && g_deserializer));
- if (g_serializer)
- return TestInstrumentationData(*g_serializer, *g_registry);
- if (g_deserializer)
- return TestInstrumentationData(*g_deserializer, *g_registry);
- return TestInstrumentationData();
-}
-
-class TestInstrumentationDataRAII {
-public:
- TestInstrumentationDataRAII(llvm::raw_string_ostream &os) {
- g_registry = std::make_unique<TestingRegistry>();
- g_serializer.emplace(os);
- g_deserializer.reset();
- }
-
- TestInstrumentationDataRAII(llvm::StringRef buffer) {
- g_registry = std::make_unique<TestingRegistry>();
- g_serializer.reset();
- g_deserializer.emplace(buffer);
- }
-
- ~TestInstrumentationDataRAII() { Reset(); }
-
- void Reset() {
- g_registry.reset();
- g_serializer.reset();
- g_deserializer.reset();
- }
-
- static std::unique_ptr<TestInstrumentationDataRAII>
- GetRecordingData(llvm::raw_string_ostream &os) {
- return std::make_unique<TestInstrumentationDataRAII>(os);
- }
-
- static std::unique_ptr<TestInstrumentationDataRAII>
- GetReplayData(llvm::StringRef buffer) {
- return std::make_unique<TestInstrumentationDataRAII>(buffer);
- }
-};
-
-#define LLDB_GET_INSTRUMENTATION_DATA() GetTestInstrumentationData()
-
-enum class Class {
- Foo,
- Bar,
-};
-
-class Instrumented {
-public:
- virtual ~Instrumented() = default;
- virtual void Validate() = 0;
- virtual bool IsA(Class c) = 0;
-};
-
-class InstrumentedFoo : public Instrumented {
-public:
- InstrumentedFoo() = default;
- /// Instrumented methods.
- /// {
- InstrumentedFoo(int i);
- InstrumentedFoo(const InstrumentedFoo &foo);
- InstrumentedFoo &operator=(const InstrumentedFoo &foo);
- void A(int a);
- int GetA();
- void B(int &b) const;
- int &GetB();
- int C(float *c);
- float GetC();
- int D(const char *d) const;
- size_t GetD(char *buffer, size_t length);
- static void E(double e);
- double GetE();
- static int F();
- bool GetF();
- void Validate() override;
- //// }
- virtual bool IsA(Class c) override { return c == Class::Foo; }
-
-private:
- int m_a = 0;
- mutable int m_b = 0;
- float m_c = 0;
- mutable std::string m_d = {};
- static double g_e;
- static bool g_f;
- mutable int m_called = 0;
-};
-
-class InstrumentedBar : public Instrumented {
-public:
- /// Instrumented methods.
- /// {
- InstrumentedBar();
- InstrumentedFoo GetInstrumentedFoo();
- InstrumentedFoo &GetInstrumentedFooRef();
- InstrumentedFoo *GetInstrumentedFooPtr();
- void SetInstrumentedFoo(InstrumentedFoo *foo);
- void SetInstrumentedFoo(InstrumentedFoo &foo);
- void Validate() override;
- /// }
- virtual bool IsA(Class c) override { return c == Class::Bar; }
-
-private:
- bool m_get_instrumend_foo_called = false;
- InstrumentedFoo *m_foo_set_by_ptr = nullptr;
- InstrumentedFoo *m_foo_set_by_ref = nullptr;
-};
-
-double InstrumentedFoo::g_e = 0;
-bool InstrumentedFoo::g_f = false;
-
-struct Validator {
- enum Validation { valid, invalid };
- Validator(Class clazz, Validation validation)
- : clazz(clazz), validation(validation) {}
- Class clazz;
- Validation validation;
-};
-
-void ValidateObjects(std::vector<void *> objects,
- std::vector<Validator> validators) {
- ASSERT_EQ(validators.size(), objects.size());
- for (size_t i = 0; i < validators.size(); ++i) {
- Validator &validator = validators[i];
- Instrumented *instrumented = static_cast<Instrumented *>(objects[i]);
- EXPECT_TRUE(instrumented->IsA(validator.clazz));
- switch (validator.validation) {
- case Validator::valid:
- instrumented->Validate();
- break;
- case Validator::invalid:
- break;
- }
- }
-}
-
-InstrumentedFoo::InstrumentedFoo(int i) {
- LLDB_RECORD_CONSTRUCTOR(InstrumentedFoo, (int), i);
-}
-
-InstrumentedFoo::InstrumentedFoo(const InstrumentedFoo &foo) {
- LLDB_RECORD_CONSTRUCTOR(InstrumentedFoo, (const InstrumentedFoo &), foo);
-}
-
-InstrumentedFoo &InstrumentedFoo::operator=(const InstrumentedFoo &foo) {
- LLDB_RECORD_METHOD(InstrumentedFoo &,
- InstrumentedFoo, operator=,(const InstrumentedFoo &), foo);
- return *this;
-}
-
-void InstrumentedFoo::A(int a) {
- LLDB_RECORD_METHOD(void, InstrumentedFoo, A, (int), a);
- B(a);
- m_a = a;
-}
-
-int InstrumentedFoo::GetA() {
- LLDB_RECORD_METHOD_NO_ARGS(int, InstrumentedFoo, GetA);
-
- return m_a;
-}
-
-void InstrumentedFoo::B(int &b) const {
- LLDB_RECORD_METHOD_CONST(void, InstrumentedFoo, B, (int &), b);
- m_called++;
- m_b = b;
-}
-
-int &InstrumentedFoo::GetB() {
- LLDB_RECORD_METHOD_NO_ARGS(int &, InstrumentedFoo, GetB);
-
- return m_b;
-}
-
-int InstrumentedFoo::C(float *c) {
- LLDB_RECORD_METHOD(int, InstrumentedFoo, C, (float *), c);
- m_c = *c;
- return 1;
-}
-
-float InstrumentedFoo::GetC() {
- LLDB_RECORD_METHOD_NO_ARGS(float, InstrumentedFoo, GetC);
-
- return m_c;
-}
-
-int InstrumentedFoo::D(const char *d) const {
- LLDB_RECORD_METHOD_CONST(int, InstrumentedFoo, D, (const char *), d);
- m_d = std::string(d);
- return 2;
-}
-
-size_t InstrumentedFoo::GetD(char *buffer, size_t length) {
- LLDB_RECORD_CHAR_PTR_METHOD(size_t, InstrumentedFoo, GetD, (char *, size_t),
- buffer, "", length);
- ::snprintf(buffer, length, "%s", m_d.c_str());
- return m_d.size();
-}
-
-void InstrumentedFoo::E(double e) {
- LLDB_RECORD_STATIC_METHOD(void, InstrumentedFoo, E, (double), e);
- g_e = e;
-}
-
-double InstrumentedFoo::GetE() {
- LLDB_RECORD_METHOD_NO_ARGS(double, InstrumentedFoo, GetE);
-
- return g_e;
-}
-
-int InstrumentedFoo::F() {
- LLDB_RECORD_STATIC_METHOD_NO_ARGS(int, InstrumentedFoo, F);
- g_f = true;
- return 3;
-}
-
-bool InstrumentedFoo::GetF() {
- LLDB_RECORD_METHOD_NO_ARGS(bool, InstrumentedFoo, GetF);
-
- return g_f;
-}
-
-void InstrumentedFoo::Validate() {
- LLDB_RECORD_METHOD_NO_ARGS(void, InstrumentedFoo, Validate);
- EXPECT_EQ(m_a, 100);
- EXPECT_EQ(m_b, 200);
- EXPECT_NEAR(m_c, 300.3, 0.01);
- EXPECT_EQ(m_d, "bar");
- EXPECT_NEAR(g_e, 400.4, 0.01);
- EXPECT_EQ(g_f, true);
- EXPECT_EQ(2, m_called);
-}
-
-InstrumentedBar::InstrumentedBar() {
- LLDB_RECORD_CONSTRUCTOR_NO_ARGS(InstrumentedBar);
-}
-
-InstrumentedFoo InstrumentedBar::GetInstrumentedFoo() {
- LLDB_RECORD_METHOD_NO_ARGS(InstrumentedFoo, InstrumentedBar,
- GetInstrumentedFoo);
- m_get_instrumend_foo_called = true;
- return LLDB_RECORD_RESULT(InstrumentedFoo(0));
-}
-
-InstrumentedFoo &InstrumentedBar::GetInstrumentedFooRef() {
- LLDB_RECORD_METHOD_NO_ARGS(InstrumentedFoo &, InstrumentedBar,
- GetInstrumentedFooRef);
- InstrumentedFoo *foo = new InstrumentedFoo(0);
- m_get_instrumend_foo_called = true;
- return LLDB_RECORD_RESULT(*foo);
-}
-
-InstrumentedFoo *InstrumentedBar::GetInstrumentedFooPtr() {
- LLDB_RECORD_METHOD_NO_ARGS(InstrumentedFoo *, InstrumentedBar,
- GetInstrumentedFooPtr);
- InstrumentedFoo *foo = new InstrumentedFoo(0);
- m_get_instrumend_foo_called = true;
- return LLDB_RECORD_RESULT(foo);
-}
-
-void InstrumentedBar::SetInstrumentedFoo(InstrumentedFoo *foo) {
- LLDB_RECORD_METHOD(void, InstrumentedBar, SetInstrumentedFoo,
- (InstrumentedFoo *), foo);
- m_foo_set_by_ptr = foo;
-}
-
-void InstrumentedBar::SetInstrumentedFoo(InstrumentedFoo &foo) {
- LLDB_RECORD_METHOD(void, InstrumentedBar, SetInstrumentedFoo,
- (InstrumentedFoo &), foo);
- m_foo_set_by_ref = &foo;
-}
-
-void InstrumentedBar::Validate() {
- LLDB_RECORD_METHOD_NO_ARGS(void, InstrumentedBar, Validate);
-
- EXPECT_TRUE(m_get_instrumend_foo_called);
- EXPECT_NE(m_foo_set_by_ptr, nullptr);
- EXPECT_EQ(m_foo_set_by_ptr, m_foo_set_by_ref);
-}
-
-TestingRegistry::TestingRegistry() {
- Registry &R = *this;
-
- LLDB_REGISTER_CONSTRUCTOR(InstrumentedFoo, (int i));
- LLDB_REGISTER_CONSTRUCTOR(InstrumentedFoo, (const InstrumentedFoo &));
- LLDB_REGISTER_METHOD(InstrumentedFoo &,
- InstrumentedFoo, operator=,(const InstrumentedFoo &));
- LLDB_REGISTER_METHOD(void, InstrumentedFoo, A, (int));
- LLDB_REGISTER_METHOD_CONST(void, InstrumentedFoo, B, (int &));
- LLDB_REGISTER_METHOD(int, InstrumentedFoo, C, (float *));
- LLDB_REGISTER_METHOD_CONST(int, InstrumentedFoo, D, (const char *));
- LLDB_REGISTER_STATIC_METHOD(void, InstrumentedFoo, E, (double));
- LLDB_REGISTER_STATIC_METHOD(int, InstrumentedFoo, F, ());
- LLDB_REGISTER_METHOD(void, InstrumentedFoo, Validate, ());
-
- LLDB_REGISTER_CONSTRUCTOR(InstrumentedBar, ());
- LLDB_REGISTER_METHOD(InstrumentedFoo, InstrumentedBar, GetInstrumentedFoo,
- ());
- LLDB_REGISTER_METHOD(InstrumentedFoo &, InstrumentedBar,
- GetInstrumentedFooRef, ());
- LLDB_REGISTER_METHOD(InstrumentedFoo *, InstrumentedBar,
- GetInstrumentedFooPtr, ());
- LLDB_REGISTER_METHOD(void, InstrumentedBar, SetInstrumentedFoo,
- (InstrumentedFoo *));
- LLDB_REGISTER_METHOD(void, InstrumentedBar, SetInstrumentedFoo,
- (InstrumentedFoo &));
- LLDB_REGISTER_METHOD(void, InstrumentedBar, Validate, ());
- LLDB_REGISTER_METHOD(int, InstrumentedFoo, GetA, ());
- LLDB_REGISTER_METHOD(int &, InstrumentedFoo, GetB, ());
- LLDB_REGISTER_METHOD(float, InstrumentedFoo, GetC, ());
- LLDB_REGISTER_METHOD(size_t, InstrumentedFoo, GetD, (char *, size_t));
- LLDB_REGISTER_METHOD(double, InstrumentedFoo, GetE, ());
- LLDB_REGISTER_METHOD(bool, InstrumentedFoo, GetF, ());
-}
-
-static const Pod p;
-
-TEST(IndexToObjectTest, ObjectForIndex) {
- IndexToObject index_to_object;
- Foo foo;
- Bar bar;
-
- EXPECT_EQ(nullptr, index_to_object.GetObjectForIndex<Foo>(1));
- EXPECT_EQ(nullptr, index_to_object.GetObjectForIndex<Bar>(2));
-
- index_to_object.AddObjectForIndex<Foo>(1, foo);
- index_to_object.AddObjectForIndex<Bar>(2, &bar);
-
- EXPECT_EQ(&foo, index_to_object.GetObjectForIndex<Foo>(1));
- EXPECT_EQ(&bar, index_to_object.GetObjectForIndex<Bar>(2));
-}
-
-TEST(DeserializerTest, HasData) {
- {
- Deserializer deserializer("");
- EXPECT_FALSE(deserializer.HasData(1));
- }
-
- {
- Deserializer deserializer("a");
- EXPECT_TRUE(deserializer.HasData(1));
- EXPECT_FALSE(deserializer.HasData(2));
- }
-}
-
-TEST(SerializationRountripTest, SerializeDeserializePod) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(p.a, p.b, p.c, p.d, p.e, p.f, p.g, p.h, p.i, p.j, p.k,
- p.l, p.m);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- EXPECT_EQ(p.a, deserializer.Deserialize<bool>());
- EXPECT_EQ(p.b, deserializer.Deserialize<bool>());
- EXPECT_EQ(p.c, deserializer.Deserialize<char>());
- EXPECT_EQ(p.d, deserializer.Deserialize<float>());
- EXPECT_EQ(p.e, deserializer.Deserialize<int>());
- EXPECT_EQ(p.f, deserializer.Deserialize<long long>());
- EXPECT_EQ(p.g, deserializer.Deserialize<long>());
- EXPECT_EQ(p.h, deserializer.Deserialize<short>());
- EXPECT_EQ(p.i, deserializer.Deserialize<unsigned char>());
- EXPECT_EQ(p.j, deserializer.Deserialize<unsigned int>());
- EXPECT_EQ(p.k, deserializer.Deserialize<unsigned long long>());
- EXPECT_EQ(p.l, deserializer.Deserialize<unsigned long>());
- EXPECT_EQ(p.m, deserializer.Deserialize<unsigned short>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializePodPointers) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(&p.a, &p.b, &p.c, &p.d, &p.e, &p.f, &p.g, &p.h, &p.i,
- &p.j, &p.k, &p.l, &p.m);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- EXPECT_EQ(p.a, *deserializer.Deserialize<bool *>());
- EXPECT_EQ(p.b, *deserializer.Deserialize<bool *>());
- EXPECT_EQ(p.c, *deserializer.Deserialize<char *>());
- EXPECT_EQ(p.d, *deserializer.Deserialize<float *>());
- EXPECT_EQ(p.e, *deserializer.Deserialize<int *>());
- EXPECT_EQ(p.f, *deserializer.Deserialize<long long *>());
- EXPECT_EQ(p.g, *deserializer.Deserialize<long *>());
- EXPECT_EQ(p.h, *deserializer.Deserialize<short *>());
- EXPECT_EQ(p.i, *deserializer.Deserialize<unsigned char *>());
- EXPECT_EQ(p.j, *deserializer.Deserialize<unsigned int *>());
- EXPECT_EQ(p.k, *deserializer.Deserialize<unsigned long long *>());
- EXPECT_EQ(p.l, *deserializer.Deserialize<unsigned long *>());
- EXPECT_EQ(p.m, *deserializer.Deserialize<unsigned short *>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializePodReferences) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(p.a, p.b, p.c, p.d, p.e, p.f, p.g, p.h, p.i, p.j, p.k,
- p.l, p.m);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- EXPECT_EQ(p.a, deserializer.Deserialize<bool &>());
- EXPECT_EQ(p.b, deserializer.Deserialize<bool &>());
- EXPECT_EQ(p.c, deserializer.Deserialize<char &>());
- EXPECT_EQ(p.d, deserializer.Deserialize<float &>());
- EXPECT_EQ(p.e, deserializer.Deserialize<int &>());
- EXPECT_EQ(p.f, deserializer.Deserialize<long long &>());
- EXPECT_EQ(p.g, deserializer.Deserialize<long &>());
- EXPECT_EQ(p.h, deserializer.Deserialize<short &>());
- EXPECT_EQ(p.i, deserializer.Deserialize<unsigned char &>());
- EXPECT_EQ(p.j, deserializer.Deserialize<unsigned int &>());
- EXPECT_EQ(p.k, deserializer.Deserialize<unsigned long long &>());
- EXPECT_EQ(p.l, deserializer.Deserialize<unsigned long &>());
- EXPECT_EQ(p.m, deserializer.Deserialize<unsigned short &>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeCString) {
- const char *cstr = "string";
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(cstr);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- EXPECT_STREQ(cstr, deserializer.Deserialize<const char *>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeCStringNull) {
- const char *cstr = nullptr;
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(cstr);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- EXPECT_EQ(nullptr, deserializer.Deserialize<const char *>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeCStringArray) {
- const char *foo = "foo";
- const char *bar = "bar";
- const char *baz = "baz";
- const char *arr[4] = {foo, bar, baz, nullptr};
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(static_cast<const char **>(arr));
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- const char **deserialized = deserializer.Deserialize<const char **>();
- EXPECT_STREQ("foo", deserialized[0]);
- EXPECT_STREQ("bar", deserialized[1]);
- EXPECT_STREQ("baz", deserialized[2]);
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeCStringArrayNullptrElem) {
- const char *arr[1] = {nullptr};
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(static_cast<const char **>(arr));
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- const char **deserialized = deserializer.Deserialize<const char **>();
- EXPECT_EQ(nullptr, deserialized);
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeCStringArrayNullptr) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- Serializer serializer(os);
- serializer.SerializeAll(static_cast<const char **>(nullptr));
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- const char **deserialized = deserializer.Deserialize<const char **>();
- EXPECT_EQ(nullptr, deserialized);
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeObjectPointer) {
- Foo foo;
- Bar bar;
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- unsigned sequence = 123;
-
- Serializer serializer(os);
- serializer.SerializeAll(sequence, static_cast<unsigned>(1));
- serializer.SerializeAll(sequence, static_cast<unsigned>(2));
- serializer.SerializeAll(&foo, &bar);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- deserializer.HandleReplayResult(&foo);
- deserializer.HandleReplayResult(&bar);
-
- EXPECT_EQ(foo, *deserializer.Deserialize<Foo *>());
- EXPECT_EQ(bar, *deserializer.Deserialize<Bar *>());
-}
-
-TEST(SerializationRountripTest, SerializeDeserializeObjectReference) {
- Foo foo;
- Bar bar;
-
- std::string str;
- llvm::raw_string_ostream os(str);
-
- unsigned sequence = 123;
-
- Serializer serializer(os);
- serializer.SerializeAll(sequence, static_cast<unsigned>(1));
- serializer.SerializeAll(sequence, static_cast<unsigned>(2));
- serializer.SerializeAll(foo, bar);
-
- llvm::StringRef buffer(os.str());
- Deserializer deserializer(buffer);
-
- deserializer.HandleReplayResult(&foo);
- deserializer.HandleReplayResult(&bar);
-
- EXPECT_EQ(foo, deserializer.Deserialize<Foo &>());
- EXPECT_EQ(bar, deserializer.Deserialize<Bar &>());
-}
-
-TEST(RecordReplayTest, InstrumentedFoo) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- InstrumentedFoo foo(0);
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-
- ValidateObjects(deserializer.GetAllObjects(),
- {{Class::Foo, Validator::valid}});
-}
-
-TEST(RecordReplayTest, InstrumentedFooSameThis) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- InstrumentedFoo *foo = new InstrumentedFoo(0);
- foo->A(100);
- foo->B(b);
- foo->C(&c);
- foo->D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo->Validate();
- foo->~InstrumentedFoo();
-
- InstrumentedFoo *foo2 = new (foo) InstrumentedFoo(0);
- foo2->A(100);
- foo2->B(b);
- foo2->C(&c);
- foo2->D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo2->Validate();
- delete foo2;
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-
- ValidateObjects(deserializer.GetAllObjects(),
- {{Class::Foo, Validator::valid}});
-}
-
-TEST(RecordReplayTest, InstrumentedBar) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo foo = bar.GetInstrumentedFoo();
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-
- ValidateObjects(
- deserializer.GetAllObjects(),
- {
- {Class::Bar, Validator::valid}, // bar
- {Class::Foo, Validator::invalid}, // bar.GetInstrumentedFoo()
- {Class::Foo, Validator::valid}, // foo
- });
-}
-
-TEST(RecordReplayTest, InstrumentedBarRef) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = bar.GetInstrumentedFooRef();
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-
- ValidateObjects(
- deserializer.GetAllObjects(),
- {{Class::Bar, Validator::valid}, {Class::Foo, Validator::valid}});
-}
-
-TEST(RecordReplayTest, InstrumentedBarPtr) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = *(bar.GetInstrumentedFooPtr());
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-
- ValidateObjects(
- deserializer.GetAllObjects(),
- {{Class::Bar, Validator::valid}, {Class::Foo, Validator::valid}});
-}
-
-TEST(PassiveReplayTest, InstrumentedFoo) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- InstrumentedFoo foo(0);
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
- }
-
- std::string buffer = os.str();
-
- {
- auto data = TestInstrumentationDataRAII::GetReplayData(buffer);
-
- int b = 999;
- float c = 999.9f;
- double e = 999.9;
-
- InstrumentedFoo foo(9);
- foo.A(999);
- foo.B(b);
- foo.C(&c);
- foo.D("999");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
- }
-}
-
-TEST(PassiveReplayTest, InstrumentedFooInvalid) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- InstrumentedFoo foo(0);
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
- }
-
- std::string buffer = os.str();
-
- {
- auto data = TestInstrumentationDataRAII::GetReplayData(buffer);
-
- int b = 999;
- float c = 999.9f;
- double e = 999.9;
-
- InstrumentedFoo foo(9);
- foo.A(999);
- foo.B(b);
- foo.C(&c);
- foo.D("999");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- // Detect divergence.
- EXPECT_DEATH(foo.GetA(), "");
- }
-}
-
-TEST(PassiveReplayTest, InstrumentedBar) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo foo = bar.GetInstrumentedFoo();
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- std::string buffer = os.str();
-
- {
- auto data = TestInstrumentationDataRAII::GetReplayData(buffer);
-
- InstrumentedBar bar;
- InstrumentedFoo foo = bar.GetInstrumentedFoo();
-
- int b = 99;
- float c = 999.9f;
- double e = 999.9;
-
- foo.A(999);
- foo.B(b);
- foo.C(&c);
- foo.D("999");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-}
-
-TEST(PassiveReplayTest, InstrumentedBarRef) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = bar.GetInstrumentedFooRef();
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- std::string buffer = os.str();
-
- {
- auto data = TestInstrumentationDataRAII::GetReplayData(buffer);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = bar.GetInstrumentedFooRef();
-
- int b = 99;
- float c = 999.9f;
- double e = 999.9;
-
- foo.A(999);
- foo.B(b);
- foo.C(&c);
- foo.D("999");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-}
-
-TEST(PassiveReplayTest, InstrumentedBarPtr) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = *(bar.GetInstrumentedFooPtr());
-
- int b = 200;
- float c = 300.3f;
- double e = 400.4;
-
- foo.A(100);
- foo.B(b);
- foo.C(&c);
- foo.D("bar");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-
- std::string buffer = os.str();
-
- {
- auto data = TestInstrumentationDataRAII::GetReplayData(buffer);
-
- InstrumentedBar bar;
- InstrumentedFoo &foo = *(bar.GetInstrumentedFooPtr());
-
- int b = 99;
- float c = 999.9f;
- double e = 999.9;
-
- foo.A(999);
- foo.B(b);
- foo.C(&c);
- foo.D("999");
- InstrumentedFoo::E(e);
- InstrumentedFoo::F();
- foo.Validate();
-
- EXPECT_EQ(foo.GetA(), 100);
- EXPECT_EQ(foo.GetB(), 200);
- EXPECT_NEAR(foo.GetC(), 300.3, 0.01);
- char buffer[100];
- foo.GetD(buffer, 100);
- EXPECT_STREQ(buffer, "bar");
- EXPECT_NEAR(foo.GetE(), 400.4, 0.01);
- EXPECT_EQ(foo.GetF(), true);
-
- bar.SetInstrumentedFoo(foo);
- bar.SetInstrumentedFoo(&foo);
- bar.Validate();
- }
-}
-
-TEST(RecordReplayTest, ValidSequence) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- unsigned sequence = 1;
- int (*f)() = &lldb_private::repro::invoke<int (*)()>::method<
- InstrumentedFoo::F>::record;
- unsigned id = g_registry->GetID(uintptr_t(f));
- g_serializer->SerializeAll(sequence, id);
-
- unsigned result = 0;
- g_serializer->SerializeAll(sequence, result);
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- registry.Replay(deserializer);
-}
-
-TEST(RecordReplayTest, InvalidSequence) {
- std::string str;
- llvm::raw_string_ostream os(str);
-
- {
- auto data = TestInstrumentationDataRAII::GetRecordingData(os);
-
- unsigned sequence = 1;
- int (*f)() = &lldb_private::repro::invoke<int (*)()>::method<
- InstrumentedFoo::F>::record;
- unsigned id = g_registry->GetID(uintptr_t(f));
- g_serializer->SerializeAll(sequence, id);
-
- unsigned result = 0;
- unsigned invalid_sequence = 2;
- g_serializer->SerializeAll(invalid_sequence, result);
- }
-
- TestingRegistry registry;
- Deserializer deserializer(os.str());
- EXPECT_DEATH(registry.Replay(deserializer), "");
-}
More information about the lldb-commits
mailing list