Index: lldb/include/lldb/API/SBAddress.h =================================================================== --- lldb/include/lldb/API/SBAddress.h +++ lldb/include/lldb/API/SBAddress.h @@ -81,6 +81,8 @@ lldb::SBLineEntry GetLineEntry(); + static void InitializeReproducerRegistry(); + protected: friend class SBBlock; friend class SBBreakpoint; Index: lldb/source/API/SBAddress.cpp =================================================================== --- lldb/source/API/SBAddress.cpp +++ lldb/source/API/SBAddress.cpp @@ -20,6 +20,7 @@ using namespace lldb; using namespace lldb_private; +using namespace lldb_private::repro; SBAddress::SBAddress() : m_opaque_up(new Address()) { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBAddress); @@ -282,3 +283,34 @@ } return LLDB_RECORD_RESULT(sb_line_entry); } + +void SBAddress::InitializeReproducerRegistry() { + 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, + (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, ()); +} Index: lldb/source/API/SBReproducer.cpp =================================================================== --- lldb/source/API/SBReproducer.cpp +++ lldb/source/API/SBReproducer.cpp @@ -8,7 +8,6 @@ #include "SBReproducerPrivate.h" -#include "SBReproducerPrivate.h" #include "lldb/API/LLDB.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBAttachInfo.h" @@ -54,36 +53,8 @@ &SBDebugger::GetDefaultArchitecture), &GetDefaultArchitectureRedirect); - { - 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, - (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, ()); - } + SBAddress::InitializeReproducerRegistry(); + { LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, ()); LLDB_REGISTER_CONSTRUCTOR(SBAttachInfo, (lldb::pid_t));