Index: lldb/include/lldb/Utility/ReproducerInstrumentation.h =================================================================== --- lldb/include/lldb/Utility/ReproducerInstrumentation.h +++ lldb/include/lldb/Utility/ReproducerInstrumentation.h @@ -82,6 +82,22 @@ Register(static_cast(&Class::Method), \ #Result, #Class, #Method, #Signature) +// temporary transition macros +#define LLDB_REGISTER_CONSTRUCTOR2(Class, Signature) \ + R.Register(&construct::doit, "", #Class, \ + #Class, #Signature) +#define LLDB_REGISTER_METHOD2(Result, Class, Method, Signature) \ + R.Register( \ + &invoke::method<(&Class::Method)>::doit, \ + #Result, #Class, #Method, #Signature) +#define LLDB_REGISTER_METHOD_CONST2(Result, Class, Method, Signature) \ + R.Register(&invoke::method_const<(&Class::Method)>::doit, \ + #Result, #Class, #Method, #Signature) +#define LLDB_REGISTER_STATIC_METHOD2(Result, Class, Method, Signature) \ + R.Register(static_cast(&Class::Method), \ + #Result, #Class, #Method, #Signature) + #define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...) \ LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})", \ LLVM_PRETTY_FUNCTION, log_args(__VA_ARGS__)); \ Index: lldb/source/API/SBAddress.cpp =================================================================== --- lldb/source/API/SBAddress.cpp +++ lldb/source/API/SBAddress.cpp @@ -282,3 +282,41 @@ } return LLDB_RECORD_RESULT(sb_line_entry); } + +namespace lldb_private { +namespace repro { + +template <> +void RegisterMethods(Registry &R) { + LLDB_REGISTER_CONSTRUCTOR2(SBAddress, ()); + LLDB_REGISTER_CONSTRUCTOR2(SBAddress, (const lldb::SBAddress &)); + LLDB_REGISTER_CONSTRUCTOR2(SBAddress, (lldb::SBSection, lldb::addr_t)); + LLDB_REGISTER_CONSTRUCTOR2(SBAddress, (lldb::addr_t, lldb::SBTarget &)); + LLDB_REGISTER_METHOD2(const lldb::SBAddress &, + SBAddress, operator=,(const lldb::SBAddress &)); + LLDB_REGISTER_METHOD_CONST2(bool, SBAddress, IsValid, ()); + LLDB_REGISTER_METHOD_CONST2(bool, SBAddress, operator bool, ()); + LLDB_REGISTER_METHOD2(void, SBAddress, Clear, ()); + LLDB_REGISTER_METHOD2(void, SBAddress, SetAddress, + (lldb::SBSection, lldb::addr_t)); + LLDB_REGISTER_METHOD_CONST2(lldb::addr_t, SBAddress, GetFileAddress, ()); + LLDB_REGISTER_METHOD_CONST2(lldb::addr_t, SBAddress, GetLoadAddress, + (const lldb::SBTarget &)); + LLDB_REGISTER_METHOD2(void, SBAddress, SetLoadAddress, + (lldb::addr_t, lldb::SBTarget &)); + LLDB_REGISTER_METHOD2(bool, SBAddress, OffsetAddress, (lldb::addr_t)); + LLDB_REGISTER_METHOD2(lldb::SBSection, SBAddress, GetSection, ()); + LLDB_REGISTER_METHOD2(lldb::addr_t, SBAddress, GetOffset, ()); + LLDB_REGISTER_METHOD2(bool, SBAddress, GetDescription, (lldb::SBStream &)); + LLDB_REGISTER_METHOD2(lldb::SBModule, SBAddress, GetModule, ()); + LLDB_REGISTER_METHOD2(lldb::SBSymbolContext, SBAddress, GetSymbolContext, + (uint32_t)); + LLDB_REGISTER_METHOD2(lldb::SBCompileUnit, SBAddress, GetCompileUnit, ()); + LLDB_REGISTER_METHOD2(lldb::SBFunction, SBAddress, GetFunction, ()); + LLDB_REGISTER_METHOD2(lldb::SBBlock, SBAddress, GetBlock, ()); + LLDB_REGISTER_METHOD2(lldb::SBSymbol, SBAddress, GetSymbol, ()); + LLDB_REGISTER_METHOD2(lldb::SBLineEntry, SBAddress, GetLineEntry, ()); +} + +} +} Index: lldb/source/API/SBReproducer.cpp =================================================================== --- lldb/source/API/SBReproducer.cpp +++ lldb/source/API/SBReproducer.cpp @@ -42,6 +42,7 @@ } SBRegistry::SBRegistry() { + Registry& R = *this; // Custom implementation. Register(&invoke(R); { LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, ()); LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (lldb::pid_t)); Index: lldb/source/API/SBReproducerPrivate.h =================================================================== --- lldb/source/API/SBReproducerPrivate.h +++ lldb/source/API/SBReproducerPrivate.h @@ -69,6 +69,8 @@ return {}; } +template void RegisterMethods(Registry &R); + } // namespace repro } // namespace lldb_private