Index: lldb/include/lldb/Utility/ReproducerInstrumentation.h =================================================================== --- lldb/include/lldb/Utility/ReproducerInstrumentation.h +++ lldb/include/lldb/Utility/ReproducerInstrumentation.h @@ -68,18 +68,18 @@ // #define LLDB_REPRO_INSTR_TRACE #define LLDB_REGISTER_CONSTRUCTOR(Class, Signature) \ - Register(&construct::doit, "", #Class, \ + R.Register(&construct::doit, "", #Class, \ #Class, #Signature) #define LLDB_REGISTER_METHOD(Result, Class, Method, Signature) \ - Register( \ + R.Register( \ &invoke::method<(&Class::Method)>::doit, \ #Result, #Class, #Method, #Signature) #define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature) \ - Register(&invoke::method_const<(&Class::Method)>::doit, \ #Result, #Class, #Method, #Signature) #define LLDB_REGISTER_STATIC_METHOD(Result, Class, Method, Signature) \ - Register(static_cast(&Class::Method), \ + R.Register(static_cast(&Class::Method), \ #Result, #Class, #Method, #Signature) #define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...) \ 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_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, 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, + (uint3_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, ()); +} + +} +} 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