Index: source/API/SBAddress.cpp =================================================================== --- source/API/SBAddress.cpp +++ source/API/SBAddress.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBAddress.h" +#include "SBReproducerPrivate.h" #include "lldb/API/SBProcess.h" #include "lldb/API/SBSection.h" #include "lldb/API/SBStream.h" @@ -20,7 +21,9 @@ using namespace lldb; using namespace lldb_private; -SBAddress::SBAddress() : m_opaque_ap(new Address()) {} +SBAddress::SBAddress() : m_opaque_ap(new Address()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBAddress); +} SBAddress::SBAddress(const Address *lldb_object_ptr) : m_opaque_ap(new Address()) { @@ -29,22 +32,33 @@ } SBAddress::SBAddress(const SBAddress &rhs) : m_opaque_ap(new Address()) { + SB_RECORD_CONSTRUCTOR(SBAddress, (const lldb::SBAddress &), rhs); + if (rhs.IsValid()) ref() = rhs.ref(); } SBAddress::SBAddress(lldb::SBSection section, lldb::addr_t offset) - : m_opaque_ap(new Address(section.GetSP(), offset)) {} + : m_opaque_ap(new Address(section.GetSP(), offset)) { + SB_RECORD_CONSTRUCTOR(SBAddress, (lldb::SBSection, lldb::addr_t), section, + offset); +} // Create an address by resolving a load address using the supplied target SBAddress::SBAddress(lldb::addr_t load_addr, lldb::SBTarget &target) : m_opaque_ap(new Address()) { + SB_RECORD_CONSTRUCTOR(SBAddress, (lldb::addr_t, lldb::SBTarget &), load_addr, + target); + SetLoadAddress(load_addr, target); } SBAddress::~SBAddress() {} const SBAddress &SBAddress::operator=(const SBAddress &rhs) { + SB_RECORD_METHOD(const lldb::SBAddress &, + SBAddress, operator=,(const lldb::SBAddress &), rhs); + if (this != &rhs) { if (rhs.IsValid()) ref() = rhs.ref(); @@ -61,12 +75,20 @@ } bool SBAddress::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBAddress, IsValid); + return m_opaque_ap != NULL && m_opaque_ap->IsValid(); } -void SBAddress::Clear() { m_opaque_ap.reset(new Address()); } +void SBAddress::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBAddress, Clear); + m_opaque_ap.reset(new Address()); +} void SBAddress::SetAddress(lldb::SBSection section, lldb::addr_t offset) { + SB_RECORD_METHOD(void, SBAddress, SetAddress, (lldb::SBSection, lldb::addr_t), + section, offset); + Address &addr = ref(); addr.SetSection(section.GetSP()); addr.SetOffset(offset); @@ -80,6 +102,8 @@ } lldb::addr_t SBAddress::GetFileAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBAddress, GetFileAddress); + if (m_opaque_ap->IsValid()) return m_opaque_ap->GetFileAddress(); else @@ -87,6 +111,9 @@ } lldb::addr_t SBAddress::GetLoadAddress(const SBTarget &target) const { + SB_RECORD_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress, + (const lldb::SBTarget &), target); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::addr_t addr = LLDB_INVALID_ADDRESS; @@ -112,6 +139,9 @@ } void SBAddress::SetLoadAddress(lldb::addr_t load_addr, lldb::SBTarget &target) { + SB_RECORD_METHOD(void, SBAddress, SetLoadAddress, + (lldb::addr_t, lldb::SBTarget &), load_addr, target); + // Create the address object if we don't already have one ref(); if (target.IsValid()) @@ -127,6 +157,8 @@ } bool SBAddress::OffsetAddress(addr_t offset) { + SB_RECORD_METHOD(bool, SBAddress, OffsetAddress, (lldb::addr_t), offset); + if (m_opaque_ap->IsValid()) { addr_t addr_offset = m_opaque_ap->GetOffset(); if (addr_offset != LLDB_INVALID_ADDRESS) { @@ -138,6 +170,8 @@ } lldb::SBSection SBAddress::GetSection() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSection, SBAddress, GetSection); + lldb::SBSection sb_section; if (m_opaque_ap->IsValid()) sb_section.SetSP(m_opaque_ap->GetSection()); @@ -145,6 +179,8 @@ } lldb::addr_t SBAddress::GetOffset() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBAddress, GetOffset); + if (m_opaque_ap->IsValid()) return m_opaque_ap->GetOffset(); return 0; @@ -170,6 +206,9 @@ Address *SBAddress::get() { return m_opaque_ap.get(); } bool SBAddress::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBAddress, GetDescription, (lldb::SBStream &), + description); + // Call "ref()" on the stream to make sure it creates a backing stream in // case there isn't one already... Stream &strm = description.ref(); @@ -189,6 +228,8 @@ } SBModule SBAddress::GetModule() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBModule, SBAddress, GetModule); + SBModule sb_module; if (m_opaque_ap->IsValid()) sb_module.SetSP(m_opaque_ap->GetModule()); @@ -196,6 +237,9 @@ } SBSymbolContext SBAddress::GetSymbolContext(uint32_t resolve_scope) { + SB_RECORD_METHOD(lldb::SBSymbolContext, SBAddress, GetSymbolContext, + (uint32_t), resolve_scope); + SBSymbolContext sb_sc; SymbolContextItem scope = static_cast(resolve_scope); if (m_opaque_ap->IsValid()) @@ -204,6 +248,8 @@ } SBCompileUnit SBAddress::GetCompileUnit() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBCompileUnit, SBAddress, GetCompileUnit); + SBCompileUnit sb_comp_unit; if (m_opaque_ap->IsValid()) sb_comp_unit.reset(m_opaque_ap->CalculateSymbolContextCompileUnit()); @@ -211,6 +257,8 @@ } SBFunction SBAddress::GetFunction() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFunction, SBAddress, GetFunction); + SBFunction sb_function; if (m_opaque_ap->IsValid()) sb_function.reset(m_opaque_ap->CalculateSymbolContextFunction()); @@ -218,6 +266,8 @@ } SBBlock SBAddress::GetBlock() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBAddress, GetBlock); + SBBlock sb_block; if (m_opaque_ap->IsValid()) sb_block.SetPtr(m_opaque_ap->CalculateSymbolContextBlock()); @@ -225,6 +275,8 @@ } SBSymbol SBAddress::GetSymbol() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSymbol, SBAddress, GetSymbol); + SBSymbol sb_symbol; if (m_opaque_ap->IsValid()) sb_symbol.reset(m_opaque_ap->CalculateSymbolContextSymbol()); @@ -232,6 +284,8 @@ } SBLineEntry SBAddress::GetLineEntry() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBLineEntry, SBAddress, GetLineEntry); + SBLineEntry sb_line_entry; if (m_opaque_ap->IsValid()) { LineEntry line_entry; Index: source/API/SBAttachInfo.cpp =================================================================== --- source/API/SBAttachInfo.cpp +++ source/API/SBAttachInfo.cpp @@ -8,6 +8,7 @@ #include "lldb/API/SBAttachInfo.h" +#include "SBReproducerPrivate.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBListener.h" #include "lldb/Target/Process.h" @@ -15,15 +16,21 @@ using namespace lldb; using namespace lldb_private; -SBAttachInfo::SBAttachInfo() : m_opaque_sp(new ProcessAttachInfo()) {} +SBAttachInfo::SBAttachInfo() : m_opaque_sp(new ProcessAttachInfo()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBAttachInfo); +} SBAttachInfo::SBAttachInfo(lldb::pid_t pid) : m_opaque_sp(new ProcessAttachInfo()) { + SB_RECORD_CONSTRUCTOR(SBAttachInfo, (lldb::pid_t), pid); + m_opaque_sp->SetProcessID(pid); } SBAttachInfo::SBAttachInfo(const char *path, bool wait_for) : m_opaque_sp(new ProcessAttachInfo()) { + SB_RECORD_CONSTRUCTOR(SBAttachInfo, (const char *, bool), path, wait_for); + if (path && path[0]) m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native); m_opaque_sp->SetWaitForLaunch(wait_for); @@ -31,6 +38,9 @@ SBAttachInfo::SBAttachInfo(const char *path, bool wait_for, bool async) : m_opaque_sp(new ProcessAttachInfo()) { + SB_RECORD_CONSTRUCTOR(SBAttachInfo, (const char *, bool, bool), path, + wait_for, async); + if (path && path[0]) m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native); m_opaque_sp->SetWaitForLaunch(wait_for); @@ -39,6 +49,8 @@ SBAttachInfo::SBAttachInfo(const SBAttachInfo &rhs) : m_opaque_sp(new ProcessAttachInfo()) { + SB_RECORD_CONSTRUCTOR(SBAttachInfo, (const lldb::SBAttachInfo &), rhs); + *m_opaque_sp = *rhs.m_opaque_sp; } @@ -47,34 +59,53 @@ lldb_private::ProcessAttachInfo &SBAttachInfo::ref() { return *m_opaque_sp; } SBAttachInfo &SBAttachInfo::operator=(const SBAttachInfo &rhs) { + SB_RECORD_METHOD(lldb::SBAttachInfo &, + SBAttachInfo, operator=,(const lldb::SBAttachInfo &), rhs); + if (this != &rhs) *m_opaque_sp = *rhs.m_opaque_sp; return *this; } -lldb::pid_t SBAttachInfo::GetProcessID() { return m_opaque_sp->GetProcessID(); } +lldb::pid_t SBAttachInfo::GetProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBAttachInfo, GetProcessID); + return m_opaque_sp->GetProcessID(); +} void SBAttachInfo::SetProcessID(lldb::pid_t pid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetProcessID, (lldb::pid_t), pid); + m_opaque_sp->SetProcessID(pid); } uint32_t SBAttachInfo::GetResumeCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBAttachInfo, GetResumeCount); + return m_opaque_sp->GetResumeCount(); } void SBAttachInfo::SetResumeCount(uint32_t c) { + SB_RECORD_METHOD(void, SBAttachInfo, SetResumeCount, (uint32_t), c); + m_opaque_sp->SetResumeCount(c); } const char *SBAttachInfo::GetProcessPluginName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBAttachInfo, GetProcessPluginName); + return m_opaque_sp->GetProcessPluginName(); } void SBAttachInfo::SetProcessPluginName(const char *plugin_name) { + SB_RECORD_METHOD(void, SBAttachInfo, SetProcessPluginName, (const char *), + plugin_name); + return m_opaque_sp->SetProcessPluginName(plugin_name); } void SBAttachInfo::SetExecutable(const char *path) { + SB_RECORD_METHOD(void, SBAttachInfo, SetExecutable, (const char *), path); + if (path && path[0]) m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native); else @@ -82,6 +113,9 @@ } void SBAttachInfo::SetExecutable(SBFileSpec exe_file) { + SB_RECORD_METHOD(void, SBAttachInfo, SetExecutable, (lldb::SBFileSpec), + exe_file); + if (exe_file.IsValid()) m_opaque_sp->GetExecutableFile() = exe_file.ref(); else @@ -89,78 +123,130 @@ } bool SBAttachInfo::GetWaitForLaunch() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, GetWaitForLaunch); + return m_opaque_sp->GetWaitForLaunch(); } void SBAttachInfo::SetWaitForLaunch(bool b) { + SB_RECORD_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool), b); + m_opaque_sp->SetWaitForLaunch(b); } void SBAttachInfo::SetWaitForLaunch(bool b, bool async) { + SB_RECORD_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool, bool), b, + async); + m_opaque_sp->SetWaitForLaunch(b); m_opaque_sp->SetAsync(async); } bool SBAttachInfo::GetIgnoreExisting() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, GetIgnoreExisting); + return m_opaque_sp->GetIgnoreExisting(); } void SBAttachInfo::SetIgnoreExisting(bool b) { + SB_RECORD_METHOD(void, SBAttachInfo, SetIgnoreExisting, (bool), b); + m_opaque_sp->SetIgnoreExisting(b); } -uint32_t SBAttachInfo::GetUserID() { return m_opaque_sp->GetUserID(); } +uint32_t SBAttachInfo::GetUserID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBAttachInfo, GetUserID); + return m_opaque_sp->GetUserID(); +} -uint32_t SBAttachInfo::GetGroupID() { return m_opaque_sp->GetGroupID(); } +uint32_t SBAttachInfo::GetGroupID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBAttachInfo, GetGroupID); + return m_opaque_sp->GetGroupID(); +} -bool SBAttachInfo::UserIDIsValid() { return m_opaque_sp->UserIDIsValid(); } +bool SBAttachInfo::UserIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, UserIDIsValid); + return m_opaque_sp->UserIDIsValid(); +} -bool SBAttachInfo::GroupIDIsValid() { return m_opaque_sp->GroupIDIsValid(); } +bool SBAttachInfo::GroupIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, GroupIDIsValid); + return m_opaque_sp->GroupIDIsValid(); +} -void SBAttachInfo::SetUserID(uint32_t uid) { m_opaque_sp->SetUserID(uid); } +void SBAttachInfo::SetUserID(uint32_t uid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetUserID, (uint32_t), uid); + m_opaque_sp->SetUserID(uid); +} -void SBAttachInfo::SetGroupID(uint32_t gid) { m_opaque_sp->SetGroupID(gid); } +void SBAttachInfo::SetGroupID(uint32_t gid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetGroupID, (uint32_t), gid); + m_opaque_sp->SetGroupID(gid); +} uint32_t SBAttachInfo::GetEffectiveUserID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBAttachInfo, GetEffectiveUserID); + return m_opaque_sp->GetEffectiveUserID(); } uint32_t SBAttachInfo::GetEffectiveGroupID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBAttachInfo, GetEffectiveGroupID); + return m_opaque_sp->GetEffectiveGroupID(); } bool SBAttachInfo::EffectiveUserIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, EffectiveUserIDIsValid); + return m_opaque_sp->EffectiveUserIDIsValid(); } bool SBAttachInfo::EffectiveGroupIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, EffectiveGroupIDIsValid); + return m_opaque_sp->EffectiveGroupIDIsValid(); } void SBAttachInfo::SetEffectiveUserID(uint32_t uid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetEffectiveUserID, (uint32_t), uid); + m_opaque_sp->SetEffectiveUserID(uid); } void SBAttachInfo::SetEffectiveGroupID(uint32_t gid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetEffectiveGroupID, (uint32_t), gid); + m_opaque_sp->SetEffectiveGroupID(gid); } lldb::pid_t SBAttachInfo::GetParentProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBAttachInfo, GetParentProcessID); + return m_opaque_sp->GetParentProcessID(); } void SBAttachInfo::SetParentProcessID(lldb::pid_t pid) { + SB_RECORD_METHOD(void, SBAttachInfo, SetParentProcessID, (lldb::pid_t), pid); + m_opaque_sp->SetParentProcessID(pid); } bool SBAttachInfo::ParentProcessIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBAttachInfo, ParentProcessIDIsValid); + return m_opaque_sp->ParentProcessIDIsValid(); } SBListener SBAttachInfo::GetListener() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBAttachInfo, GetListener); + return SBListener(m_opaque_sp->GetListener()); } void SBAttachInfo::SetListener(SBListener &listener) { + SB_RECORD_METHOD(void, SBAttachInfo, SetListener, (lldb::SBListener &), + listener); + m_opaque_sp->SetListener(listener.GetSP()); } Index: source/API/SBBlock.cpp =================================================================== --- source/API/SBBlock.cpp +++ source/API/SBBlock.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBBlock.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBFileSpec.h" @@ -25,29 +27,43 @@ using namespace lldb; using namespace lldb_private; -SBBlock::SBBlock() : m_opaque_ptr(NULL) {} +SBBlock::SBBlock() : m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBBlock); +} SBBlock::SBBlock(lldb_private::Block *lldb_object_ptr) : m_opaque_ptr(lldb_object_ptr) {} -SBBlock::SBBlock(const SBBlock &rhs) : m_opaque_ptr(rhs.m_opaque_ptr) {} +SBBlock::SBBlock(const SBBlock &rhs) : m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBBlock, (const lldb::SBBlock &), rhs); +} const SBBlock &SBBlock::operator=(const SBBlock &rhs) { + SB_RECORD_METHOD(const lldb::SBBlock &, + SBBlock, operator=,(const lldb::SBBlock &), rhs); + m_opaque_ptr = rhs.m_opaque_ptr; return *this; } SBBlock::~SBBlock() { m_opaque_ptr = NULL; } -bool SBBlock::IsValid() const { return m_opaque_ptr != NULL; } +bool SBBlock::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsValid); + return m_opaque_ptr != NULL; +} bool SBBlock::IsInlined() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsInlined); + if (m_opaque_ptr) return m_opaque_ptr->GetInlinedFunctionInfo() != NULL; return false; } const char *SBBlock::GetInlinedName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBlock, GetInlinedName); + if (m_opaque_ptr) { const InlineFunctionInfo *inlined_info = m_opaque_ptr->GetInlinedFunctionInfo(); @@ -65,6 +81,9 @@ } SBFileSpec SBBlock::GetInlinedCallSiteFile() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBBlock, + GetInlinedCallSiteFile); + SBFileSpec sb_file; if (m_opaque_ptr) { const InlineFunctionInfo *inlined_info = @@ -76,6 +95,8 @@ } uint32_t SBBlock::GetInlinedCallSiteLine() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBlock, GetInlinedCallSiteLine); + if (m_opaque_ptr) { const InlineFunctionInfo *inlined_info = m_opaque_ptr->GetInlinedFunctionInfo(); @@ -86,6 +107,8 @@ } uint32_t SBBlock::GetInlinedCallSiteColumn() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBlock, GetInlinedCallSiteColumn); + if (m_opaque_ptr) { const InlineFunctionInfo *inlined_info = m_opaque_ptr->GetInlinedFunctionInfo(); @@ -105,6 +128,8 @@ } SBBlock SBBlock::GetParent() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetParent); + SBBlock sb_block; if (m_opaque_ptr) sb_block.m_opaque_ptr = m_opaque_ptr->GetParent(); @@ -112,6 +137,8 @@ } lldb::SBBlock SBBlock::GetContainingInlinedBlock() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetContainingInlinedBlock); + SBBlock sb_block; if (m_opaque_ptr) sb_block.m_opaque_ptr = m_opaque_ptr->GetContainingInlinedBlock(); @@ -119,6 +146,8 @@ } SBBlock SBBlock::GetSibling() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetSibling); + SBBlock sb_block; if (m_opaque_ptr) sb_block.m_opaque_ptr = m_opaque_ptr->GetSibling(); @@ -126,6 +155,8 @@ } SBBlock SBBlock::GetFirstChild() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetFirstChild); + SBBlock sb_block; if (m_opaque_ptr) sb_block.m_opaque_ptr = m_opaque_ptr->GetFirstChild(); @@ -137,6 +168,9 @@ void SBBlock::SetPtr(lldb_private::Block *block) { m_opaque_ptr = block; } bool SBBlock::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBBlock, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ptr) { @@ -159,12 +193,17 @@ } uint32_t SBBlock::GetNumRanges() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBBlock, GetNumRanges); + if (m_opaque_ptr) return m_opaque_ptr->GetNumRanges(); return 0; } lldb::SBAddress SBBlock::GetRangeStartAddress(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBAddress, SBBlock, GetRangeStartAddress, (uint32_t), + idx); + lldb::SBAddress sb_addr; if (m_opaque_ptr) { AddressRange range; @@ -176,6 +215,9 @@ } lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBAddress, SBBlock, GetRangeEndAddress, (uint32_t), + idx); + lldb::SBAddress sb_addr; if (m_opaque_ptr) { AddressRange range; @@ -188,6 +230,9 @@ } uint32_t SBBlock::GetRangeIndexForBlockAddress(lldb::SBAddress block_addr) { + SB_RECORD_METHOD(uint32_t, SBBlock, GetRangeIndexForBlockAddress, + (lldb::SBAddress), block_addr); + if (m_opaque_ptr && block_addr.IsValid()) { return m_opaque_ptr->GetRangeIndexContainingAddress(block_addr.ref()); } @@ -198,6 +243,10 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBFrame &frame, bool arguments, bool locals, bool statics, lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValueList, SBBlock, GetVariables, + (lldb::SBFrame &, bool, bool, bool, lldb::DynamicValueType), + frame, arguments, locals, statics, use_dynamic); + Block *block = GetPtr(); SBValueList value_list; if (block) { @@ -249,6 +298,10 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments, bool locals, bool statics) { + SB_RECORD_METHOD(lldb::SBValueList, SBBlock, GetVariables, + (lldb::SBTarget &, bool, bool, bool), target, arguments, + locals, statics); + Block *block = GetPtr(); SBValueList value_list; Index: source/API/SBBreakpoint.cpp =================================================================== --- source/API/SBBreakpoint.cpp +++ source/API/SBBreakpoint.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBBreakpoint.h" #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBDebugger.h" @@ -43,26 +45,39 @@ using namespace lldb; using namespace lldb_private; -SBBreakpoint::SBBreakpoint() {} +SBBreakpoint::SBBreakpoint() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpoint); } SBBreakpoint::SBBreakpoint(const SBBreakpoint &rhs) - : m_opaque_wp(rhs.m_opaque_wp) {} + : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBBreakpoint, (const lldb::SBBreakpoint &), rhs); +} SBBreakpoint::SBBreakpoint(const lldb::BreakpointSP &bp_sp) - : m_opaque_wp(bp_sp) {} + : m_opaque_wp(bp_sp) { + SB_RECORD_CONSTRUCTOR(SBBreakpoint, (const lldb::BreakpointSP &), bp_sp); +} SBBreakpoint::~SBBreakpoint() = default; const SBBreakpoint &SBBreakpoint::operator=(const SBBreakpoint &rhs) { + SB_RECORD_METHOD(const lldb::SBBreakpoint &, + SBBreakpoint, operator=,(const lldb::SBBreakpoint &), rhs); + m_opaque_wp = rhs.m_opaque_wp; return *this; } bool SBBreakpoint::operator==(const lldb::SBBreakpoint &rhs) { + SB_RECORD_METHOD(bool, SBBreakpoint, operator==,(const lldb::SBBreakpoint &), + rhs); + return m_opaque_wp.lock() == rhs.m_opaque_wp.lock(); } bool SBBreakpoint::operator!=(const lldb::SBBreakpoint &rhs) { + SB_RECORD_METHOD(bool, SBBreakpoint, operator!=,(const lldb::SBBreakpoint &), + rhs); + return m_opaque_wp.lock() != rhs.m_opaque_wp.lock(); } @@ -79,6 +94,8 @@ } bool SBBreakpoint::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsValid); + BreakpointSP bkpt_sp = GetSP(); if (!bkpt_sp) return false; @@ -89,6 +106,8 @@ } void SBBreakpoint::ClearAllBreakpointSites() { + SB_RECORD_METHOD_NO_ARGS(void, SBBreakpoint, ClearAllBreakpointSites); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -98,6 +117,9 @@ } SBBreakpointLocation SBBreakpoint::FindLocationByAddress(addr_t vm_addr) { + SB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, + FindLocationByAddress, (lldb::addr_t), vm_addr); + SBBreakpointLocation sb_bp_location; BreakpointSP bkpt_sp = GetSP(); @@ -117,6 +139,9 @@ } break_id_t SBBreakpoint::FindLocationIDByAddress(addr_t vm_addr) { + SB_RECORD_METHOD(lldb::break_id_t, SBBreakpoint, FindLocationIDByAddress, + (lldb::addr_t), vm_addr); + break_id_t break_id = LLDB_INVALID_BREAK_ID; BreakpointSP bkpt_sp = GetSP(); @@ -135,6 +160,9 @@ } SBBreakpointLocation SBBreakpoint::FindLocationByID(break_id_t bp_loc_id) { + SB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, FindLocationByID, + (lldb::break_id_t), bp_loc_id); + SBBreakpointLocation sb_bp_location; BreakpointSP bkpt_sp = GetSP(); @@ -148,6 +176,9 @@ } SBBreakpointLocation SBBreakpoint::GetLocationAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, GetLocationAtIndex, + (uint32_t), index); + SBBreakpointLocation sb_bp_location; BreakpointSP bkpt_sp = GetSP(); @@ -174,6 +205,8 @@ } bool SBBreakpoint::IsEnabled() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, IsEnabled); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -197,6 +230,8 @@ } bool SBBreakpoint::IsOneShot() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsOneShot); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -207,6 +242,8 @@ } bool SBBreakpoint::IsInternal() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, IsInternal); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -230,6 +267,8 @@ } void SBBreakpoint::SetCondition(const char *condition) { + SB_RECORD_METHOD(void, SBBreakpoint, SetCondition, (const char *), condition); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -239,6 +278,8 @@ } const char *SBBreakpoint::GetCondition() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpoint, GetCondition); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -249,6 +290,8 @@ } void SBBreakpoint::SetAutoContinue(bool auto_continue) { + SB_RECORD_METHOD(void, SBBreakpoint, SetAutoContinue, (bool), auto_continue); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -258,6 +301,8 @@ } bool SBBreakpoint::GetAutoContinue() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, GetAutoContinue); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -436,6 +481,9 @@ } void SBBreakpoint::SetCommandLineCommands(SBStringList &commands) { + SB_RECORD_METHOD(void, SBBreakpoint, SetCommandLineCommands, + (lldb::SBStringList &), commands); + BreakpointSP bkpt_sp = GetSP(); if (!bkpt_sp) return; @@ -451,6 +499,9 @@ } bool SBBreakpoint::GetCommandLineCommands(SBStringList &commands) { + SB_RECORD_METHOD(bool, SBBreakpoint, GetCommandLineCommands, + (lldb::SBStringList &), commands); + BreakpointSP bkpt_sp = GetSP(); if (!bkpt_sp) return false; @@ -463,10 +514,15 @@ } bool SBBreakpoint::GetDescription(SBStream &s) { + SB_RECORD_METHOD(bool, SBBreakpoint, GetDescription, (lldb::SBStream &), s); + return GetDescription(s, true); } bool SBBreakpoint::GetDescription(SBStream &s, bool include_locations) { + SB_RECORD_METHOD(bool, SBBreakpoint, GetDescription, (lldb::SBStream &, bool), + s, include_locations); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) { std::lock_guard guard( @@ -484,39 +540,39 @@ return false; } -SBError -SBBreakpoint::AddLocation(SBAddress &address) { - BreakpointSP bkpt_sp = GetSP(); - SBError error; - - if (!address.IsValid()) { - error.SetErrorString("Can't add an invalid address."); - return error; - } - - if (!bkpt_sp) { - error.SetErrorString("No breakpoint to add a location to."); - return error; - } - - if (!llvm::isa(bkpt_sp->GetResolver().get())) { - error.SetErrorString("Only a scripted resolver can add locations."); - return error; - } - - if (bkpt_sp->GetSearchFilter()->AddressPasses(address.ref())) - bkpt_sp->AddLocation(address.ref()); - else - { - StreamString s; - address.get()->Dump(&s, &bkpt_sp->GetTarget(), - Address::DumpStyleModuleWithFileAddress); - error.SetErrorStringWithFormat("Address: %s didn't pass the filter.", - s.GetData()); - } +SBError SBBreakpoint::AddLocation(SBAddress &address) { + SB_RECORD_METHOD(lldb::SBError, SBBreakpoint, AddLocation, + (lldb::SBAddress &), address); + + BreakpointSP bkpt_sp = GetSP(); + SBError error; + + if (!address.IsValid()) { + error.SetErrorString("Can't add an invalid address."); return error; -} + } + + if (!bkpt_sp) { + error.SetErrorString("No breakpoint to add a location to."); + return error; + } + if (!llvm::isa(bkpt_sp->GetResolver().get())) { + error.SetErrorString("Only a scripted resolver can add locations."); + return error; + } + + if (bkpt_sp->GetSearchFilter()->AddressPasses(address.ref())) + bkpt_sp->AddLocation(address.ref()); + else { + StreamString s; + address.get()->Dump(&s, &bkpt_sp->GetTarget(), + Address::DumpStyleModuleWithFileAddress); + error.SetErrorStringWithFormat("Address: %s didn't pass the filter.", + s.GetData()); + } + return error; +} void SBBreakpoint ::SetCallback(SBBreakpointHitCallback callback, @@ -594,8 +650,8 @@ if (error.Fail()) { if (log) - log->Printf("Failed to add name: '%s' to breakpoint: %s", - new_name, error.AsCString()); + log->Printf("Failed to add name: '%s' to breakpoint: %s", new_name, + error.AsCString()); return false; } } @@ -611,8 +667,8 @@ if (bkpt_sp) { std::lock_guard guard( bkpt_sp->GetTarget().GetAPIMutex()); - bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp, - ConstString(name_to_remove)); + bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp, + ConstString(name_to_remove)); } } @@ -647,12 +703,19 @@ } bool SBBreakpoint::EventIsBreakpointEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBBreakpoint, EventIsBreakpointEvent, + (const lldb::SBEvent &), event); + return Breakpoint::BreakpointEventData::GetEventDataFromEvent(event.get()) != nullptr; } BreakpointEventType SBBreakpoint::GetBreakpointEventTypeFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::BreakpointEventType, SBBreakpoint, + GetBreakpointEventTypeFromEvent, + (const lldb::SBEvent &), event); + if (event.IsValid()) return Breakpoint::BreakpointEventData::GetBreakpointEventTypeFromEvent( event.GetSP()); @@ -660,6 +723,10 @@ } SBBreakpoint SBBreakpoint::GetBreakpointFromEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBBreakpoint, SBBreakpoint, + GetBreakpointFromEvent, (const lldb::SBEvent &), + event); + if (event.IsValid()) return SBBreakpoint( Breakpoint::BreakpointEventData::GetBreakpointFromEvent(event.GetSP())); @@ -669,6 +736,10 @@ SBBreakpointLocation SBBreakpoint::GetBreakpointLocationAtIndexFromEvent(const lldb::SBEvent &event, uint32_t loc_idx) { + SB_RECORD_STATIC_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, + GetBreakpointLocationAtIndexFromEvent, + (const lldb::SBEvent &, uint32_t), event, loc_idx); + SBBreakpointLocation sb_breakpoint_loc; if (event.IsValid()) sb_breakpoint_loc.SetLocation( @@ -679,6 +750,10 @@ uint32_t SBBreakpoint::GetNumBreakpointLocationsFromEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(uint32_t, SBBreakpoint, + GetNumBreakpointLocationsFromEvent, + (const lldb::SBEvent &), event); + uint32_t num_locations = 0; if (event.IsValid()) num_locations = @@ -688,6 +763,8 @@ } bool SBBreakpoint::IsHardware() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsHardware); + BreakpointSP bkpt_sp = GetSP(); if (bkpt_sp) return bkpt_sp->IsHardware(); @@ -700,6 +777,8 @@ class SBBreakpointListImpl { public: SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() { + SB_RECORD_CONSTRUCTOR(SBBreakpointListImpl, (lldb::TargetSP), target_sp); + if (target_sp && target_sp->IsValid()) m_target_wp = target_sp; } @@ -781,11 +860,15 @@ }; SBBreakpointList::SBBreakpointList(SBTarget &target) - : m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {} + : m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) { + SB_RECORD_CONSTRUCTOR(SBBreakpointList, (lldb::SBTarget &), target); +} SBBreakpointList::~SBBreakpointList() {} size_t SBBreakpointList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(size_t, SBBreakpointList, GetSize); + if (!m_opaque_sp) return 0; else @@ -793,6 +876,9 @@ } SBBreakpoint SBBreakpointList::GetBreakpointAtIndex(size_t idx) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBBreakpointList, GetBreakpointAtIndex, + (size_t), idx); + if (!m_opaque_sp) return SBBreakpoint(); @@ -801,6 +887,9 @@ } SBBreakpoint SBBreakpointList::FindBreakpointByID(lldb::break_id_t id) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBBreakpointList, FindBreakpointByID, + (lldb::break_id_t), id); + if (!m_opaque_sp) return SBBreakpoint(); BreakpointSP bkpt_sp = m_opaque_sp->FindBreakpointByID(id); @@ -808,6 +897,9 @@ } void SBBreakpointList::Append(const SBBreakpoint &sb_bkpt) { + SB_RECORD_METHOD(void, SBBreakpointList, Append, (const lldb::SBBreakpoint &), + sb_bkpt); + if (!sb_bkpt.IsValid()) return; if (!m_opaque_sp) @@ -816,12 +908,17 @@ } void SBBreakpointList::AppendByID(lldb::break_id_t id) { + SB_RECORD_METHOD(void, SBBreakpointList, AppendByID, (lldb::break_id_t), id); + if (!m_opaque_sp) return; m_opaque_sp->AppendByID(id); } bool SBBreakpointList::AppendIfUnique(const SBBreakpoint &sb_bkpt) { + SB_RECORD_METHOD(bool, SBBreakpointList, AppendIfUnique, + (const lldb::SBBreakpoint &), sb_bkpt); + if (!sb_bkpt.IsValid()) return false; if (!m_opaque_sp) @@ -830,6 +927,8 @@ } void SBBreakpointList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBBreakpointList, Clear); + if (m_opaque_sp) m_opaque_sp->Clear(); } Index: source/API/SBBreakpointLocation.cpp =================================================================== --- source/API/SBBreakpointLocation.cpp +++ source/API/SBBreakpointLocation.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBDebugger.h" @@ -29,11 +31,16 @@ using namespace lldb; using namespace lldb_private; -SBBreakpointLocation::SBBreakpointLocation() {} +SBBreakpointLocation::SBBreakpointLocation() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpointLocation); +} SBBreakpointLocation::SBBreakpointLocation( const lldb::BreakpointLocationSP &break_loc_sp) : m_opaque_wp(break_loc_sp) { + SB_RECORD_CONSTRUCTOR(SBBreakpointLocation, + (const lldb::BreakpointLocationSP &), break_loc_sp); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { @@ -44,10 +51,18 @@ } SBBreakpointLocation::SBBreakpointLocation(const SBBreakpointLocation &rhs) - : m_opaque_wp(rhs.m_opaque_wp) {} + : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBBreakpointLocation, + (const lldb::SBBreakpointLocation &), rhs); +} const SBBreakpointLocation &SBBreakpointLocation:: operator=(const SBBreakpointLocation &rhs) { + SB_RECORD_METHOD( + const lldb::SBBreakpointLocation &, + SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &), + rhs); + m_opaque_wp = rhs.m_opaque_wp; return *this; } @@ -58,9 +73,14 @@ return m_opaque_wp.lock(); } -bool SBBreakpointLocation::IsValid() const { return bool(GetSP()); } +bool SBBreakpointLocation::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointLocation, IsValid); + return bool(GetSP()); +} SBAddress SBBreakpointLocation::GetAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBBreakpointLocation, GetAddress); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) return SBAddress(&loc_sp->GetAddress()); @@ -69,6 +89,8 @@ } addr_t SBBreakpointLocation::GetLoadAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBBreakpointLocation, GetLoadAddress); + addr_t ret_addr = LLDB_INVALID_ADDRESS; BreakpointLocationSP loc_sp = GetSP(); @@ -82,6 +104,8 @@ } void SBBreakpointLocation::SetEnabled(bool enabled) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetEnabled, (bool), enabled); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -91,6 +115,8 @@ } bool SBBreakpointLocation::IsEnabled() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, IsEnabled); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -101,6 +127,8 @@ } uint32_t SBBreakpointLocation::GetHitCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBBreakpointLocation, GetHitCount); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -111,6 +139,8 @@ } uint32_t SBBreakpointLocation::GetIgnoreCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBBreakpointLocation, GetIgnoreCount); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -121,6 +151,8 @@ } void SBBreakpointLocation::SetIgnoreCount(uint32_t n) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetIgnoreCount, (uint32_t), n); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -130,6 +162,9 @@ } void SBBreakpointLocation::SetCondition(const char *condition) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetCondition, (const char *), + condition); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -139,6 +174,8 @@ } const char *SBBreakpointLocation::GetCondition() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointLocation, GetCondition); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -149,6 +186,9 @@ } void SBBreakpointLocation::SetAutoContinue(bool auto_continue) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetAutoContinue, (bool), + auto_continue); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -158,6 +198,8 @@ } bool SBBreakpointLocation::GetAutoContinue() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, GetAutoContinue); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -215,6 +257,9 @@ } void SBBreakpointLocation::SetCommandLineCommands(SBStringList &commands) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetCommandLineCommands, + (lldb::SBStringList &), commands); + BreakpointLocationSP loc_sp = GetSP(); if (!loc_sp) return; @@ -230,6 +275,9 @@ } bool SBBreakpointLocation::GetCommandLineCommands(SBStringList &commands) { + SB_RECORD_METHOD(bool, SBBreakpointLocation, GetCommandLineCommands, + (lldb::SBStringList &), commands); + BreakpointLocationSP loc_sp = GetSP(); if (!loc_sp) return false; @@ -242,6 +290,9 @@ } void SBBreakpointLocation::SetThreadID(tid_t thread_id) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadID, (lldb::tid_t), + thread_id); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -251,6 +302,8 @@ } tid_t SBBreakpointLocation::GetThreadID() { + SB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpointLocation, GetThreadID); + tid_t tid = LLDB_INVALID_THREAD_ID; BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { @@ -262,6 +315,9 @@ } void SBBreakpointLocation::SetThreadIndex(uint32_t index) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadIndex, (uint32_t), + index); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -271,6 +327,9 @@ } uint32_t SBBreakpointLocation::GetThreadIndex() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointLocation, + GetThreadIndex); + uint32_t thread_idx = UINT32_MAX; BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { @@ -282,6 +341,9 @@ } void SBBreakpointLocation::SetThreadName(const char *thread_name) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadName, (const char *), + thread_name); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -291,6 +353,9 @@ } const char *SBBreakpointLocation::GetThreadName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointLocation, + GetThreadName); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -301,6 +366,9 @@ } void SBBreakpointLocation::SetQueueName(const char *queue_name) { + SB_RECORD_METHOD(void, SBBreakpointLocation, SetQueueName, (const char *), + queue_name); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -310,6 +378,9 @@ } const char *SBBreakpointLocation::GetQueueName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointLocation, + GetQueueName); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -320,6 +391,8 @@ } bool SBBreakpointLocation::IsResolved() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, IsResolved); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -337,6 +410,10 @@ bool SBBreakpointLocation::GetDescription(SBStream &description, DescriptionLevel level) { + SB_RECORD_METHOD(bool, SBBreakpointLocation, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + level); + Stream &strm = description.ref(); BreakpointLocationSP loc_sp = GetSP(); @@ -352,6 +429,8 @@ } break_id_t SBBreakpointLocation::GetID() { + SB_RECORD_METHOD_NO_ARGS(lldb::break_id_t, SBBreakpointLocation, GetID); + BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { std::lock_guard guard( @@ -362,6 +441,9 @@ } SBBreakpoint SBBreakpointLocation::GetBreakpoint() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBreakpoint, SBBreakpointLocation, + GetBreakpoint); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); BreakpointLocationSP loc_sp = GetSP(); Index: source/API/SBBreakpointName.cpp =================================================================== --- source/API/SBBreakpointName.cpp +++ source/API/SBBreakpointName.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBBreakpointName.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBError.h" @@ -33,6 +35,7 @@ class SBBreakpointNameImpl { public: SBBreakpointNameImpl(TargetSP target_sp, const char *name) { + if (!name || name[0] == '\0') return; m_name.assign(name); @@ -51,14 +54,17 @@ // the location when we need it. TargetSP GetTarget() const { + return m_target_wp.lock(); } const char *GetName() const { + return m_name.c_str(); } bool IsValid() const { + return !m_name.empty() && m_target_wp.lock(); } @@ -71,6 +77,11 @@ SBBreakpointNameImpl::SBBreakpointNameImpl(SBTarget &sb_target, const char *name) { + SB_RECORD_CONSTRUCTOR(SBBreakpointNameImpl, (lldb::SBTarget &, const char *), + sb_target, name); + SB_RECORD_CONSTRUCTOR(SBBreakpointNameImpl, (lldb::SBTarget &, const char *), + sb_target, name); + if (!name || name[0] == '\0') return; m_name.assign(name); @@ -105,10 +116,14 @@ } // namespace lldb -SBBreakpointName::SBBreakpointName() {} +SBBreakpointName::SBBreakpointName() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpointName); +} + +SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) { + SB_RECORD_CONSTRUCTOR(SBBreakpointName, (lldb::SBTarget &, const char *), + sb_target, name); -SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) -{ m_impl_up.reset(new SBBreakpointNameImpl(sb_target, name)); // Call FindBreakpointName here to make sure the name is valid, reset if not: BreakpointName *bp_name = GetBreakpointName(); @@ -116,8 +131,10 @@ m_impl_up.reset(); } -SBBreakpointName::SBBreakpointName(SBBreakpoint &sb_bkpt, const char *name) -{ +SBBreakpointName::SBBreakpointName(SBBreakpoint &sb_bkpt, const char *name) { + SB_RECORD_CONSTRUCTOR(SBBreakpointName, (lldb::SBBreakpoint &, const char *), + sb_bkpt, name); + if (!sb_bkpt.IsValid()) { m_impl_up.reset(); return; @@ -139,8 +156,10 @@ BreakpointName::Permissions()); } -SBBreakpointName::SBBreakpointName(const SBBreakpointName &rhs) -{ +SBBreakpointName::SBBreakpointName(const SBBreakpointName &rhs) { + SB_RECORD_CONSTRUCTOR(SBBreakpointName, (const lldb::SBBreakpointName &), + rhs); + if (!rhs.m_impl_up) return; else @@ -150,8 +169,12 @@ SBBreakpointName::~SBBreakpointName() = default; -const SBBreakpointName &SBBreakpointName::operator=(const SBBreakpointName &rhs) -{ +const SBBreakpointName &SBBreakpointName:: +operator=(const SBBreakpointName &rhs) { + SB_RECORD_METHOD(const lldb::SBBreakpointName &, + SBBreakpointName, operator=,(const lldb::SBBreakpointName &), + rhs); + if (!rhs.m_impl_up) { m_impl_up.reset(); return *this; @@ -163,20 +186,30 @@ } bool SBBreakpointName::operator==(const lldb::SBBreakpointName &rhs) { + SB_RECORD_METHOD( + bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &), rhs); + return *m_impl_up == *rhs.m_impl_up; } bool SBBreakpointName::operator!=(const lldb::SBBreakpointName &rhs) { + SB_RECORD_METHOD( + bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &), rhs); + return *m_impl_up != *rhs.m_impl_up; } bool SBBreakpointName::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsValid); + if (!m_impl_up) return false; return m_impl_up->IsValid(); } const char *SBBreakpointName::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, GetName); + if (!m_impl_up) return ""; return m_impl_up->GetName(); @@ -606,16 +639,18 @@ return sb_error; } -bool SBBreakpointName::GetAllowList() const -{ +bool SBBreakpointName::GetAllowList() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, GetAllowList); + BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) return false; return bp_name->GetPermissions().GetAllowList(); } -void SBBreakpointName::SetAllowList(bool value) -{ +void SBBreakpointName::SetAllowList(bool value) { + SB_RECORD_METHOD(void, SBBreakpointName, SetAllowList, (bool), value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); BreakpointName *bp_name = GetBreakpointName(); @@ -626,17 +661,19 @@ bp_name->GetName().AsCString()); bp_name->GetPermissions().SetAllowList(value); } - -bool SBBreakpointName::GetAllowDelete() -{ + +bool SBBreakpointName::GetAllowDelete() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDelete); + BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) return false; return bp_name->GetPermissions().GetAllowDelete(); } -void SBBreakpointName::SetAllowDelete(bool value) -{ +void SBBreakpointName::SetAllowDelete(bool value) { + SB_RECORD_METHOD(void, SBBreakpointName, SetAllowDelete, (bool), value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); BreakpointName *bp_name = GetBreakpointName(); @@ -647,17 +684,19 @@ bp_name->GetName().AsCString()); bp_name->GetPermissions().SetAllowDelete(value); } - -bool SBBreakpointName::GetAllowDisable() -{ + +bool SBBreakpointName::GetAllowDisable() { + SB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDisable); + BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) return false; return bp_name->GetPermissions().GetAllowDisable(); } -void SBBreakpointName::SetAllowDisable(bool value) -{ +void SBBreakpointName::SetAllowDisable(bool value) { + SB_RECORD_METHOD(void, SBBreakpointName, SetAllowDisable, (bool), value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); BreakpointName *bp_name = GetBreakpointName(); Index: source/API/SBBreakpointOptionCommon.cpp =================================================================== --- source/API/SBBreakpointOptionCommon.cpp +++ source/API/SBBreakpointOptionCommon.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBBreakpointName.h" #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBDebugger.h" Index: source/API/SBBroadcaster.cpp =================================================================== --- source/API/SBBroadcaster.cpp +++ source/API/SBBroadcaster.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/Utility/Broadcaster.h" #include "lldb/Utility/Log.h" @@ -16,7 +18,9 @@ using namespace lldb; using namespace lldb_private; -SBBroadcaster::SBBroadcaster() : m_opaque_sp(), m_opaque_ptr(NULL) {} +SBBroadcaster::SBBroadcaster() : m_opaque_sp(), m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBBroadcaster); +} SBBroadcaster::SBBroadcaster(const char *name) : m_opaque_sp(new Broadcaster(NULL, name)), m_opaque_ptr(NULL) { @@ -33,9 +37,14 @@ } SBBroadcaster::SBBroadcaster(const SBBroadcaster &rhs) - : m_opaque_sp(rhs.m_opaque_sp), m_opaque_ptr(rhs.m_opaque_ptr) {} + : m_opaque_sp(rhs.m_opaque_sp), m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBBroadcaster, (const lldb::SBBroadcaster &), rhs); +} const SBBroadcaster &SBBroadcaster::operator=(const SBBroadcaster &rhs) { + SB_RECORD_METHOD(const lldb::SBBroadcaster &, + SBBroadcaster, operator=,(const lldb::SBBroadcaster &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; m_opaque_ptr = rhs.m_opaque_ptr; @@ -46,6 +55,9 @@ SBBroadcaster::~SBBroadcaster() { reset(NULL, false); } void SBBroadcaster::BroadcastEventByType(uint32_t event_type, bool unique) { + SB_RECORD_METHOD(void, SBBroadcaster, BroadcastEventByType, (uint32_t, bool), + event_type, unique); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -63,6 +75,9 @@ } void SBBroadcaster::BroadcastEvent(const SBEvent &event, bool unique) { + SB_RECORD_METHOD(void, SBBroadcaster, BroadcastEvent, + (const lldb::SBEvent &, bool), event, unique); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -83,6 +98,10 @@ void SBBroadcaster::AddInitialEventsToListener(const SBListener &listener, uint32_t requested_events) { + SB_RECORD_METHOD(void, SBBroadcaster, AddInitialEventsToListener, + (const lldb::SBListener &, uint32_t), listener, + requested_events); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBBroadcaster(%p)::AddInitialEventsToListener " @@ -96,18 +115,26 @@ uint32_t SBBroadcaster::AddListener(const SBListener &listener, uint32_t event_mask) { + SB_RECORD_METHOD(uint32_t, SBBroadcaster, AddListener, + (const lldb::SBListener &, uint32_t), listener, event_mask); + if (m_opaque_ptr) return m_opaque_ptr->AddListener(listener.m_opaque_sp, event_mask); return 0; } const char *SBBroadcaster::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBroadcaster, GetName); + if (m_opaque_ptr) return m_opaque_ptr->GetBroadcasterName().GetCString(); return NULL; } bool SBBroadcaster::EventTypeHasListeners(uint32_t event_type) { + SB_RECORD_METHOD(bool, SBBroadcaster, EventTypeHasListeners, (uint32_t), + event_type); + if (m_opaque_ptr) return m_opaque_ptr->EventTypeHasListeners(event_type); return false; @@ -115,6 +142,9 @@ bool SBBroadcaster::RemoveListener(const SBListener &listener, uint32_t event_mask) { + SB_RECORD_METHOD(bool, SBBroadcaster, RemoveListener, + (const lldb::SBListener &, uint32_t), listener, event_mask); + if (m_opaque_ptr) return m_opaque_ptr->RemoveListener(listener.m_opaque_sp, event_mask); return false; @@ -130,21 +160,35 @@ m_opaque_ptr = broadcaster; } -bool SBBroadcaster::IsValid() const { return m_opaque_ptr != NULL; } +bool SBBroadcaster::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBroadcaster, IsValid); + return m_opaque_ptr != NULL; +} void SBBroadcaster::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBBroadcaster, Clear); + m_opaque_sp.reset(); m_opaque_ptr = NULL; } bool SBBroadcaster::operator==(const SBBroadcaster &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBBroadcaster, operator==,(const lldb::SBBroadcaster &), rhs); + return m_opaque_ptr == rhs.m_opaque_ptr; } bool SBBroadcaster::operator!=(const SBBroadcaster &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBBroadcaster, operator!=,(const lldb::SBBroadcaster &), rhs); + return m_opaque_ptr != rhs.m_opaque_ptr; } bool SBBroadcaster::operator<(const SBBroadcaster &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBBroadcaster, operator<,(const lldb::SBBroadcaster &), rhs); + return m_opaque_ptr < rhs.m_opaque_ptr; } Index: source/API/SBCommandInterpreter.cpp =================================================================== --- source/API/SBCommandInterpreter.cpp +++ source/API/SBCommandInterpreter.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" #include "lldb/lldb-types.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -21,6 +22,7 @@ #include "lldb/API/SBExecutionContext.h" #include "lldb/API/SBListener.h" #include "lldb/API/SBProcess.h" +#include "lldb/API/SBReproducer.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBStringList.h" #include "lldb/API/SBTarget.h" @@ -30,63 +32,106 @@ SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions() { m_opaque_up.reset(new CommandInterpreterRunOptions()); + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommandInterpreterRunOptions); } SBCommandInterpreterRunOptions::~SBCommandInterpreterRunOptions() = default; bool SBCommandInterpreterRunOptions::GetStopOnContinue() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetStopOnContinue); + return m_opaque_up->GetStopOnContinue(); } void SBCommandInterpreterRunOptions::SetStopOnContinue(bool stop_on_continue) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnContinue, + (bool), stop_on_continue); + m_opaque_up->SetStopOnContinue(stop_on_continue); } bool SBCommandInterpreterRunOptions::GetStopOnError() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetStopOnError); + return m_opaque_up->GetStopOnError(); } void SBCommandInterpreterRunOptions::SetStopOnError(bool stop_on_error) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnError, (bool), + stop_on_error); + m_opaque_up->SetStopOnError(stop_on_error); } bool SBCommandInterpreterRunOptions::GetStopOnCrash() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetStopOnCrash); + return m_opaque_up->GetStopOnCrash(); } void SBCommandInterpreterRunOptions::SetStopOnCrash(bool stop_on_crash) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnCrash, (bool), + stop_on_crash); + m_opaque_up->SetStopOnCrash(stop_on_crash); } bool SBCommandInterpreterRunOptions::GetEchoCommands() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetEchoCommands); + return m_opaque_up->GetEchoCommands(); } void SBCommandInterpreterRunOptions::SetEchoCommands(bool echo_commands) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetEchoCommands, + (bool), echo_commands); + m_opaque_up->SetEchoCommands(echo_commands); } bool SBCommandInterpreterRunOptions::GetEchoCommentCommands() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetEchoCommentCommands); + return m_opaque_up->GetEchoCommentCommands(); } void SBCommandInterpreterRunOptions::SetEchoCommentCommands(bool echo) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetEchoCommentCommands, + (bool), echo); + m_opaque_up->SetEchoCommentCommands(echo); } bool SBCommandInterpreterRunOptions::GetPrintResults() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetPrintResults); + return m_opaque_up->GetPrintResults(); } void SBCommandInterpreterRunOptions::SetPrintResults(bool print_results) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetPrintResults, + (bool), print_results); + m_opaque_up->SetPrintResults(print_results); } bool SBCommandInterpreterRunOptions::GetAddToHistory() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetAddToHistory); + return m_opaque_up->GetAddToHistory(); } void SBCommandInterpreterRunOptions::SetAddToHistory(bool add_to_history) { + SB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetAddToHistory, + (bool), add_to_history); + m_opaque_up->SetAddToHistory(add_to_history); } @@ -109,9 +154,19 @@ const char *syntax = nullptr, uint32_t flags = 0) : CommandObjectParsed(interpreter, name, help, syntax, flags), - m_backend(backend) {} + m_backend(backend) { + SB_RECORD_CONSTRUCTOR(CommandPluginInterfaceImplementation, + (lldb_private::CommandInterpreter &, const char *, + lldb::SBCommandPluginInterface *, const char *, + const char *, uint32_t), + interpreter, name, backend, help, syntax, flags); + } - bool IsRemovable() const override { return true; } + bool IsRemovable() const override { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, CommandPluginInterfaceImplementation, + IsRemovable); + return true; + } protected: bool DoExecute(Args &command, CommandReturnObject &result) override { @@ -128,6 +183,8 @@ SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter) : m_opaque_ptr(interpreter) { + SB_RECORD_CONSTRUCTOR(SBCommandInterpreter, (CommandInterpreter *), + interpreter); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -138,37 +195,61 @@ } SBCommandInterpreter::SBCommandInterpreter(const SBCommandInterpreter &rhs) - : m_opaque_ptr(rhs.m_opaque_ptr) {} + : m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBCommandInterpreter, (const SBCommandInterpreter &), + rhs); +} SBCommandInterpreter::~SBCommandInterpreter() = default; const SBCommandInterpreter &SBCommandInterpreter:: operator=(const SBCommandInterpreter &rhs) { + SB_RECORD_METHOD( + const lldb::SBCommandInterpreter &, + SBCommandInterpreter, operator=,(const lldb::SBCommandInterpreter &), + rhs); + m_opaque_ptr = rhs.m_opaque_ptr; return *this; } -bool SBCommandInterpreter::IsValid() const { return m_opaque_ptr != nullptr; } +bool SBCommandInterpreter::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreter, IsValid); + return m_opaque_ptr != nullptr; +} bool SBCommandInterpreter::CommandExists(const char *cmd) { + SB_RECORD_METHOD(bool, SBCommandInterpreter, CommandExists, (const char *), + cmd); + return (((cmd != nullptr) && IsValid()) ? m_opaque_ptr->CommandExists(cmd) : false); } bool SBCommandInterpreter::AliasExists(const char *cmd) { + SB_RECORD_METHOD(bool, SBCommandInterpreter, AliasExists, (const char *), + cmd); + return (((cmd != nullptr) && IsValid()) ? m_opaque_ptr->AliasExists(cmd) : false); } bool SBCommandInterpreter::IsActive() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, IsActive); + return (IsValid() ? m_opaque_ptr->IsActive() : false); } bool SBCommandInterpreter::WasInterrupted() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreter, WasInterrupted); + return (IsValid() ? m_opaque_ptr->WasInterrupted() : false); } const char *SBCommandInterpreter::GetIOHandlerControlSequence(char ch) { + SB_RECORD_METHOD(const char *, SBCommandInterpreter, + GetIOHandlerControlSequence, (char), ch); + return (IsValid() ? m_opaque_ptr->GetDebugger() .GetTopIOHandlerControlSequence(ch) @@ -180,6 +261,10 @@ SBCommandInterpreter::HandleCommand(const char *command_line, SBCommandReturnObject &result, bool add_to_history) { + SB_RECORD_METHOD(lldb::ReturnStatus, SBCommandInterpreter, HandleCommand, + (const char *, lldb::SBCommandReturnObject &, bool), + command_line, result, add_to_history); + SBExecutionContext sb_exe_ctx; return HandleCommand(command_line, sb_exe_ctx, result, add_to_history); } @@ -187,6 +272,11 @@ lldb::ReturnStatus SBCommandInterpreter::HandleCommand( const char *command_line, SBExecutionContext &override_context, SBCommandReturnObject &result, bool add_to_history) { + SB_RECORD_METHOD(lldb::ReturnStatus, SBCommandInterpreter, HandleCommand, + (const char *, lldb::SBExecutionContext &, + lldb::SBCommandReturnObject &, bool), + command_line, override_context, result, add_to_history); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -233,6 +323,12 @@ lldb::SBFileSpec &file, lldb::SBExecutionContext &override_context, lldb::SBCommandInterpreterRunOptions &options, lldb::SBCommandReturnObject result) { + SB_RECORD_METHOD(void, SBCommandInterpreter, HandleCommandsFromFile, + (lldb::SBFileSpec &, lldb::SBExecutionContext &, + lldb::SBCommandInterpreterRunOptions &, + lldb::SBCommandReturnObject), + file, override_context, options, result); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { @@ -272,6 +368,12 @@ int SBCommandInterpreter::HandleCompletion( const char *current_line, const char *cursor, const char *last_char, int match_start_point, int max_return_elements, SBStringList &matches) { + SB_RECORD_METHOD(int, SBCommandInterpreter, HandleCompletion, + (const char *, const char *, const char *, int, int, + lldb::SBStringList &), + current_line, cursor, last_char, match_start_point, + max_return_elements, matches); + SBStringList dummy_descriptions; return HandleCompletionWithDescriptions( current_line, cursor, last_char, match_start_point, max_return_elements, @@ -282,6 +384,12 @@ const char *current_line, const char *cursor, const char *last_char, int match_start_point, int max_return_elements, SBStringList &matches, SBStringList &descriptions) { + SB_RECORD_METHOD(int, SBCommandInterpreter, HandleCompletionWithDescriptions, + (const char *, const char *, const char *, int, int, + lldb::SBStringList &, lldb::SBStringList &), + current_line, cursor, last_char, match_start_point, + max_return_elements, matches, descriptions); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); int num_completions = 0; @@ -331,6 +439,12 @@ const char *current_line, uint32_t cursor_pos, int match_start_point, int max_return_elements, SBStringList &matches, SBStringList &descriptions) { + SB_RECORD_METHOD(int, SBCommandInterpreter, HandleCompletionWithDescriptions, + (const char *, uint32_t, int, int, lldb::SBStringList &, + lldb::SBStringList &), + current_line, cursor_pos, match_start_point, + max_return_elements, matches, descriptions); + const char *cursor = current_line + cursor_pos; const char *last_char = current_line + strlen(current_line); return HandleCompletionWithDescriptions( @@ -343,6 +457,11 @@ int match_start_point, int max_return_elements, lldb::SBStringList &matches) { + SB_RECORD_METHOD(int, SBCommandInterpreter, HandleCompletion, + (const char *, uint32_t, int, int, lldb::SBStringList &), + current_line, cursor_pos, match_start_point, + max_return_elements, matches); + const char *cursor = current_line + cursor_pos; const char *last_char = current_line + strlen(current_line); return HandleCompletion(current_line, cursor, last_char, match_start_point, @@ -350,18 +469,26 @@ } bool SBCommandInterpreter::HasCommands() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, HasCommands); + return (IsValid() ? m_opaque_ptr->HasCommands() : false); } bool SBCommandInterpreter::HasAliases() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, HasAliases); + return (IsValid() ? m_opaque_ptr->HasAliases() : false); } bool SBCommandInterpreter::HasAliasOptions() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, HasAliasOptions); + return (IsValid() ? m_opaque_ptr->HasAliasOptions() : false); } SBProcess SBCommandInterpreter::GetProcess() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBCommandInterpreter, GetProcess); + SBProcess sb_process; ProcessSP process_sp; if (IsValid()) { @@ -383,6 +510,8 @@ } SBDebugger SBCommandInterpreter::GetDebugger() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBDebugger, SBCommandInterpreter, GetDebugger); + SBDebugger sb_debugger; if (IsValid()) sb_debugger.reset(m_opaque_ptr->GetDebugger().shared_from_this()); @@ -397,20 +526,28 @@ } bool SBCommandInterpreter::GetPromptOnQuit() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, GetPromptOnQuit); + return (IsValid() ? m_opaque_ptr->GetPromptOnQuit() : false); } void SBCommandInterpreter::SetPromptOnQuit(bool b) { + SB_RECORD_METHOD(void, SBCommandInterpreter, SetPromptOnQuit, (bool), b); + if (IsValid()) m_opaque_ptr->SetPromptOnQuit(b); } void SBCommandInterpreter::AllowExitCodeOnQuit(bool allow) { + SB_RECORD_METHOD(void, SBCommandInterpreter, AllowExitCodeOnQuit, (bool), + allow); if (m_opaque_ptr) m_opaque_ptr->AllowExitCodeOnQuit(allow); } bool SBCommandInterpreter::HasCustomQuitExitCode() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandInterpreter, HasCustomQuitExitCode); + bool exited = false; if (m_opaque_ptr) m_opaque_ptr->GetQuitExitCode(exited); @@ -418,12 +555,17 @@ } int SBCommandInterpreter::GetQuitStatus() { + SB_RECORD_METHOD_NO_ARGS(int, SBCommandInterpreter, GetQuitStatus); bool exited = false; return (m_opaque_ptr ? m_opaque_ptr->GetQuitExitCode(exited) : 0); } void SBCommandInterpreter::ResolveCommand(const char *command_line, SBCommandReturnObject &result) { + SB_RECORD_METHOD(void, SBCommandInterpreter, ResolveCommand, + (const char *, lldb::SBCommandReturnObject &), command_line, + result); + result.Clear(); if (command_line && IsValid()) { m_opaque_ptr->ResolveCommand(command_line, result.ref()); @@ -448,6 +590,8 @@ void SBCommandInterpreter::SourceInitFileInHomeDirectory( SBCommandReturnObject &result) { + SB_RECORD_METHOD(void, SBCommandInterpreter, SourceInitFileInHomeDirectory, + (SBCommandReturnObject &), result); result.Clear(); if (IsValid()) { TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget()); @@ -470,6 +614,10 @@ void SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory( SBCommandReturnObject &result) { + SB_RECORD_METHOD(void, SBCommandInterpreter, + SourceInitFileInCurrentWorkingDirectory, + (lldb::SBCommandReturnObject &), result); + result.Clear(); if (IsValid()) { TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget()); @@ -491,6 +639,9 @@ } SBBroadcaster SBCommandInterpreter::GetBroadcaster() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBroadcaster, SBCommandInterpreter, + GetBroadcaster); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBroadcaster broadcaster(m_opaque_ptr, false); @@ -505,21 +656,36 @@ } const char *SBCommandInterpreter::GetBroadcasterClass() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBCommandInterpreter, + GetBroadcasterClass); + return CommandInterpreter::GetStaticBroadcasterClass().AsCString(); } const char *SBCommandInterpreter::GetArgumentTypeAsCString( const lldb::CommandArgumentType arg_type) { + SB_RECORD_STATIC_METHOD(const char *, SBCommandInterpreter, + GetArgumentTypeAsCString, + (const lldb::CommandArgumentType), arg_type); + return CommandObject::GetArgumentTypeAsCString(arg_type); } const char *SBCommandInterpreter::GetArgumentDescriptionAsCString( const lldb::CommandArgumentType arg_type) { + SB_RECORD_STATIC_METHOD(const char *, SBCommandInterpreter, + GetArgumentDescriptionAsCString, + (const lldb::CommandArgumentType), arg_type); + return CommandObject::GetArgumentDescriptionAsCString(arg_type); } bool SBCommandInterpreter::EventIsCommandInterpreterEvent( const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBCommandInterpreter, + EventIsCommandInterpreterEvent, + (const lldb::SBEvent &), event); + return event.GetBroadcasterClass() == SBCommandInterpreter::GetBroadcasterClass(); } @@ -542,6 +708,9 @@ lldb::SBCommand SBCommandInterpreter::AddMultiwordCommand(const char *name, const char *help) { + SB_RECORD_METHOD(lldb::SBCommand, SBCommandInterpreter, AddMultiwordCommand, + (const char *, const char *), name, help); + CommandObjectMultiword *new_command = new CommandObjectMultiword(*m_opaque_ptr, name, help); new_command->SetRemovable(true); @@ -554,6 +723,11 @@ lldb::SBCommand SBCommandInterpreter::AddCommand( const char *name, lldb::SBCommandPluginInterface *impl, const char *help) { + SB_RECORD_METHOD( + lldb::SBCommand, SBCommandInterpreter, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, const char *), name, + impl, help); + lldb::CommandObjectSP new_command_sp; new_command_sp.reset(new CommandPluginInterfaceImplementation( *m_opaque_ptr, name, impl, help)); @@ -568,6 +742,11 @@ SBCommandInterpreter::AddCommand(const char *name, lldb::SBCommandPluginInterface *impl, const char *help, const char *syntax) { + SB_RECORD_METHOD(lldb::SBCommand, SBCommandInterpreter, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, + const char *, const char *), + name, impl, help, syntax); + lldb::CommandObjectSP new_command_sp; new_command_sp.reset(new CommandPluginInterfaceImplementation( *m_opaque_ptr, name, impl, help, syntax)); @@ -578,38 +757,54 @@ return lldb::SBCommand(); } -SBCommand::SBCommand() = default; +SBCommand::SBCommand() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommand); } SBCommand::SBCommand(lldb::CommandObjectSP cmd_sp) : m_opaque_sp(cmd_sp) {} -bool SBCommand::IsValid() { return m_opaque_sp.get() != nullptr; } +bool SBCommand::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommand, IsValid); + return m_opaque_sp.get() != nullptr; +} const char *SBCommand::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBCommand, GetName); + return (IsValid() ? ConstString(m_opaque_sp->GetCommandName()).AsCString() : nullptr); } const char *SBCommand::GetHelp() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBCommand, GetHelp); + return (IsValid() ? ConstString(m_opaque_sp->GetHelp()).AsCString() : nullptr); } const char *SBCommand::GetHelpLong() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBCommand, GetHelpLong); + return (IsValid() ? ConstString(m_opaque_sp->GetHelpLong()).AsCString() : nullptr); } void SBCommand::SetHelp(const char *help) { + SB_RECORD_METHOD(void, SBCommand, SetHelp, (const char *), help); + if (IsValid()) m_opaque_sp->SetHelp(help); } void SBCommand::SetHelpLong(const char *help) { + SB_RECORD_METHOD(void, SBCommand, SetHelpLong, (const char *), help); + if (IsValid()) m_opaque_sp->SetHelpLong(help); } lldb::SBCommand SBCommand::AddMultiwordCommand(const char *name, const char *help) { + SB_RECORD_METHOD(lldb::SBCommand, SBCommand, AddMultiwordCommand, + (const char *, const char *), name, help); + if (!IsValid()) return lldb::SBCommand(); if (!m_opaque_sp->IsMultiwordObject()) @@ -626,6 +821,11 @@ lldb::SBCommand SBCommand::AddCommand(const char *name, lldb::SBCommandPluginInterface *impl, const char *help) { + SB_RECORD_METHOD( + lldb::SBCommand, SBCommand, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, const char *), name, + impl, help); + if (!IsValid()) return lldb::SBCommand(); if (!m_opaque_sp->IsMultiwordObject()) @@ -641,6 +841,11 @@ lldb::SBCommand SBCommand::AddCommand(const char *name, lldb::SBCommandPluginInterface *impl, const char *help, const char *syntax) { + SB_RECORD_METHOD(lldb::SBCommand, SBCommand, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, + const char *, const char *), + name, impl, help, syntax); + if (!IsValid()) return lldb::SBCommand(); if (!m_opaque_sp->IsMultiwordObject()) @@ -654,10 +859,14 @@ } uint32_t SBCommand::GetFlags() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBCommand, GetFlags); + return (IsValid() ? m_opaque_sp->GetFlags().Get() : 0); } void SBCommand::SetFlags(uint32_t flags) { + SB_RECORD_METHOD(void, SBCommand, SetFlags, (uint32_t), flags); + if (IsValid()) m_opaque_sp->GetFlags().Set(flags); } Index: source/API/SBCommandReturnObject.cpp =================================================================== --- source/API/SBCommandReturnObject.cpp +++ source/API/SBCommandReturnObject.cpp @@ -7,7 +7,9 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBCommandReturnObject.h" +#include "SBReproducerPrivate.h" #include "lldb/API/SBError.h" +#include "lldb/API/SBReproducer.h" #include "lldb/API/SBStream.h" #include "lldb/Interpreter/CommandReturnObject.h" @@ -19,25 +21,42 @@ using namespace lldb_private; SBCommandReturnObject::SBCommandReturnObject() - : m_opaque_ap(new CommandReturnObject()) {} + : m_opaque_ap(new CommandReturnObject()) { + + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommandReturnObject); +} SBCommandReturnObject::SBCommandReturnObject(const SBCommandReturnObject &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBCommandReturnObject, + (const lldb::SBCommandReturnObject &), rhs); + if (rhs.m_opaque_ap) m_opaque_ap.reset(new CommandReturnObject(*rhs.m_opaque_ap)); } SBCommandReturnObject::SBCommandReturnObject(CommandReturnObject *ptr) - : m_opaque_ap(ptr) {} + : m_opaque_ap(ptr) { + SB_RECORD_CONSTRUCTOR(SBCommandReturnObject, + (lldb_private::CommandReturnObject *), ptr); +} SBCommandReturnObject::~SBCommandReturnObject() = default; CommandReturnObject *SBCommandReturnObject::Release() { + SB_RECORD_METHOD_NO_ARGS(lldb_private::CommandReturnObject *, + SBCommandReturnObject, Release); + return m_opaque_ap.release(); } const SBCommandReturnObject &SBCommandReturnObject:: operator=(const SBCommandReturnObject &rhs) { + SB_RECORD_METHOD( + const lldb::SBCommandReturnObject &, + SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &), + rhs); + if (this != &rhs) { if (rhs.m_opaque_ap) m_opaque_ap.reset(new CommandReturnObject(*rhs.m_opaque_ap)); @@ -47,9 +66,14 @@ return *this; } -bool SBCommandReturnObject::IsValid() const { return m_opaque_ap != nullptr; } +bool SBCommandReturnObject::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandReturnObject, IsValid); + return m_opaque_ap != nullptr; +} const char *SBCommandReturnObject::GetOutput() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetOutput); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_opaque_ap) { @@ -71,6 +95,8 @@ } const char *SBCommandReturnObject::GetError() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetError); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_opaque_ap) { @@ -91,14 +117,20 @@ } size_t SBCommandReturnObject::GetOutputSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBCommandReturnObject, GetOutputSize); + return (m_opaque_ap ? m_opaque_ap->GetOutputData().size() : 0); } size_t SBCommandReturnObject::GetErrorSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBCommandReturnObject, GetErrorSize); + return (m_opaque_ap ? m_opaque_ap->GetErrorData().size() : 0); } size_t SBCommandReturnObject::PutOutput(FILE *fh) { + SB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh); + if (fh) { size_t num_bytes = GetOutputSize(); if (num_bytes) @@ -108,6 +140,8 @@ } size_t SBCommandReturnObject::PutError(FILE *fh) { + SB_RECORD_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *), fh); + if (fh) { size_t num_bytes = GetErrorSize(); if (num_bytes) @@ -117,33 +151,51 @@ } void SBCommandReturnObject::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBCommandReturnObject, Clear); + if (m_opaque_ap) m_opaque_ap->Clear(); } lldb::ReturnStatus SBCommandReturnObject::GetStatus() { + SB_RECORD_METHOD_NO_ARGS(lldb::ReturnStatus, SBCommandReturnObject, + GetStatus); + return (m_opaque_ap ? m_opaque_ap->GetStatus() : lldb::eReturnStatusInvalid); } void SBCommandReturnObject::SetStatus(lldb::ReturnStatus status) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetStatus, (lldb::ReturnStatus), + status); + if (m_opaque_ap) m_opaque_ap->SetStatus(status); } bool SBCommandReturnObject::Succeeded() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandReturnObject, Succeeded); + return (m_opaque_ap ? m_opaque_ap->Succeeded() : false); } bool SBCommandReturnObject::HasResult() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommandReturnObject, HasResult); + return (m_opaque_ap ? m_opaque_ap->HasResult() : false); } void SBCommandReturnObject::AppendMessage(const char *message) { + SB_RECORD_METHOD(void, SBCommandReturnObject, AppendMessage, (const char *), + message); + if (m_opaque_ap) m_opaque_ap->AppendMessage(message); } void SBCommandReturnObject::AppendWarning(const char *message) { + SB_RECORD_METHOD(void, SBCommandReturnObject, AppendWarning, (const char *), + message); + if (m_opaque_ap) m_opaque_ap->AppendWarning(message); } @@ -172,6 +224,9 @@ } bool SBCommandReturnObject::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBCommandReturnObject, GetDescription, + (lldb::SBStream &), description); + Stream &strm = description.ref(); if (m_opaque_ap) { @@ -198,26 +253,41 @@ } void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile, + (FILE *), fh); + SetImmediateOutputFile(fh, false); } void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile, (FILE *), + fh); + SetImmediateErrorFile(fh, false); } void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh, bool transfer_ownership) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile, + (FILE *, bool), fh, transfer_ownership); + if (m_opaque_ap) m_opaque_ap->SetImmediateOutputFile(fh, transfer_ownership); } void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh, bool transfer_ownership) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile, + (FILE *, bool), fh, transfer_ownership); + if (m_opaque_ap) m_opaque_ap->SetImmediateErrorFile(fh, transfer_ownership); } void SBCommandReturnObject::PutCString(const char *string, int len) { + SB_RECORD_METHOD(void, SBCommandReturnObject, PutCString, (const char *, int), + string, len); + if (m_opaque_ap) { if (len == 0 || string == nullptr || *string == 0) { return; @@ -230,6 +300,9 @@ } const char *SBCommandReturnObject::GetOutput(bool only_if_no_immediate) { + SB_RECORD_METHOD(const char *, SBCommandReturnObject, GetOutput, (bool), + only_if_no_immediate); + if (!m_opaque_ap) return nullptr; if (!only_if_no_immediate || @@ -239,6 +312,9 @@ } const char *SBCommandReturnObject::GetError(bool only_if_no_immediate) { + SB_RECORD_METHOD(const char *, SBCommandReturnObject, GetError, (bool), + only_if_no_immediate); + if (!m_opaque_ap) return nullptr; if (!only_if_no_immediate || @@ -260,6 +336,9 @@ void SBCommandReturnObject::SetError(lldb::SBError &error, const char *fallback_error_cstr) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetError, + (lldb::SBError &, const char *), error, fallback_error_cstr); + if (m_opaque_ap) { if (error.IsValid()) m_opaque_ap->SetError(error.ref(), fallback_error_cstr); @@ -269,6 +348,9 @@ } void SBCommandReturnObject::SetError(const char *error_cstr) { + SB_RECORD_METHOD(void, SBCommandReturnObject, SetError, (const char *), + error_cstr); + if (m_opaque_ap && error_cstr) m_opaque_ap->SetError(error_cstr); } Index: source/API/SBCommunication.cpp =================================================================== --- source/API/SBCommunication.cpp +++ source/API/SBCommunication.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBCommunication.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/Core/Communication.h" @@ -16,10 +18,14 @@ using namespace lldb; using namespace lldb_private; -SBCommunication::SBCommunication() : m_opaque(NULL), m_opaque_owned(false) {} +SBCommunication::SBCommunication() : m_opaque(NULL), m_opaque_owned(false) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommunication); +} SBCommunication::SBCommunication(const char *broadcaster_name) : m_opaque(new Communication(broadcaster_name)), m_opaque_owned(true) { + SB_RECORD_CONSTRUCTOR(SBCommunication, (const char *), broadcaster_name); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -35,20 +41,30 @@ m_opaque_owned = false; } -bool SBCommunication::IsValid() const { return m_opaque != NULL; } +bool SBCommunication::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommunication, IsValid); + return m_opaque != NULL; +} bool SBCommunication::GetCloseOnEOF() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, GetCloseOnEOF); + if (m_opaque) return m_opaque->GetCloseOnEOF(); return false; } void SBCommunication::SetCloseOnEOF(bool b) { + SB_RECORD_METHOD(void, SBCommunication, SetCloseOnEOF, (bool), b); + if (m_opaque) m_opaque->SetCloseOnEOF(b); } ConnectionStatus SBCommunication::Connect(const char *url) { + SB_RECORD_METHOD(lldb::ConnectionStatus, SBCommunication, Connect, + (const char *), url); + if (m_opaque) { if (!m_opaque->HasConnection()) m_opaque->SetConnection(Host::CreateDefaultConnection(url).release()); @@ -58,6 +74,9 @@ } ConnectionStatus SBCommunication::AdoptFileDesriptor(int fd, bool owns_fd) { + SB_RECORD_METHOD(lldb::ConnectionStatus, SBCommunication, AdoptFileDesriptor, + (int, bool), fd, owns_fd); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ConnectionStatus status = eConnectionStatusNoConnection; @@ -83,6 +102,8 @@ } ConnectionStatus SBCommunication::Disconnect() { + SB_RECORD_METHOD_NO_ARGS(lldb::ConnectionStatus, SBCommunication, Disconnect); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ConnectionStatus status = eConnectionStatusNoConnection; @@ -98,6 +119,8 @@ } bool SBCommunication::IsConnected() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommunication, IsConnected); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = false; if (m_opaque) @@ -158,6 +181,8 @@ } bool SBCommunication::ReadThreadStart() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadStart); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool success = false; @@ -172,6 +197,8 @@ } bool SBCommunication::ReadThreadStop() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadStop); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBCommunication(%p)::ReadThreadStop ()...", @@ -189,6 +216,8 @@ } bool SBCommunication::ReadThreadIsRunning() { + SB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadIsRunning); + bool result = false; if (m_opaque) result = m_opaque->ReadThreadIsRunning(); @@ -220,6 +249,9 @@ } SBBroadcaster SBCommunication::GetBroadcaster() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBroadcaster, SBCommunication, + GetBroadcaster); + SBBroadcaster broadcaster(m_opaque, false); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -233,6 +265,9 @@ } const char *SBCommunication::GetBroadcasterClass() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBCommunication, + GetBroadcasterClass); + return Communication::GetStaticBroadcasterClass().AsCString(); } Index: source/API/SBCompileUnit.cpp =================================================================== --- source/API/SBCompileUnit.cpp +++ source/API/SBCompileUnit.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBCompileUnit.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBStream.h" @@ -20,15 +22,22 @@ using namespace lldb; using namespace lldb_private; -SBCompileUnit::SBCompileUnit() : m_opaque_ptr(NULL) {} +SBCompileUnit::SBCompileUnit() : m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBCompileUnit); +} SBCompileUnit::SBCompileUnit(lldb_private::CompileUnit *lldb_object_ptr) : m_opaque_ptr(lldb_object_ptr) {} SBCompileUnit::SBCompileUnit(const SBCompileUnit &rhs) - : m_opaque_ptr(rhs.m_opaque_ptr) {} + : m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBCompileUnit, (const lldb::SBCompileUnit &), rhs); +} const SBCompileUnit &SBCompileUnit::operator=(const SBCompileUnit &rhs) { + SB_RECORD_METHOD(const lldb::SBCompileUnit &, + SBCompileUnit, operator=,(const lldb::SBCompileUnit &), rhs); + m_opaque_ptr = rhs.m_opaque_ptr; return *this; } @@ -36,6 +45,8 @@ SBCompileUnit::~SBCompileUnit() { m_opaque_ptr = NULL; } SBFileSpec SBCompileUnit::GetFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBCompileUnit, GetFileSpec); + SBFileSpec file_spec; if (m_opaque_ptr) file_spec.SetFileSpec(*m_opaque_ptr); @@ -43,6 +54,8 @@ } uint32_t SBCompileUnit::GetNumLineEntries() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBCompileUnit, GetNumLineEntries); + if (m_opaque_ptr) { LineTable *line_table = m_opaque_ptr->GetLineTable(); if (line_table) @@ -52,6 +65,9 @@ } SBLineEntry SBCompileUnit::GetLineEntryAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBLineEntry, SBCompileUnit, GetLineEntryAtIndex, + (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBLineEntry sb_line_entry; @@ -78,6 +94,10 @@ uint32_t SBCompileUnit::FindLineEntryIndex(uint32_t start_idx, uint32_t line, SBFileSpec *inline_file_spec) const { + SB_RECORD_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex, + (uint32_t, uint32_t, lldb::SBFileSpec *), start_idx, + line, inline_file_spec); + const bool exact = true; return FindLineEntryIndex(start_idx, line, inline_file_spec, exact); } @@ -85,6 +105,10 @@ uint32_t SBCompileUnit::FindLineEntryIndex(uint32_t start_idx, uint32_t line, SBFileSpec *inline_file_spec, bool exact) const { + SB_RECORD_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex, + (uint32_t, uint32_t, lldb::SBFileSpec *, bool), + start_idx, line, inline_file_spec, exact); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t index = UINT32_MAX; @@ -124,6 +148,8 @@ } uint32_t SBCompileUnit::GetNumSupportFiles() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBCompileUnit, GetNumSupportFiles); + if (m_opaque_ptr) { FileSpecList &support_files = m_opaque_ptr->GetSupportFiles(); return support_files.GetSize(); @@ -132,6 +158,9 @@ } lldb::SBTypeList SBCompileUnit::GetTypes(uint32_t type_mask) { + SB_RECORD_METHOD(lldb::SBTypeList, SBCompileUnit, GetTypes, (uint32_t), + type_mask); + SBTypeList sb_type_list; if (!m_opaque_ptr) @@ -153,6 +182,9 @@ } SBFileSpec SBCompileUnit::GetSupportFileAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit, GetSupportFileAtIndex, + (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFileSpec sb_file_spec; @@ -177,6 +209,10 @@ uint32_t SBCompileUnit::FindSupportFileIndex(uint32_t start_idx, const SBFileSpec &sb_file, bool full) { + SB_RECORD_METHOD(uint32_t, SBCompileUnit, FindSupportFileIndex, + (uint32_t, const lldb::SBFileSpec &, bool), start_idx, + sb_file, full); + if (m_opaque_ptr) { FileSpecList &support_files = m_opaque_ptr->GetSupportFiles(); return support_files.FindFileIndex(start_idx, sb_file.ref(), full); @@ -185,18 +221,29 @@ } lldb::LanguageType SBCompileUnit::GetLanguage() { + SB_RECORD_METHOD_NO_ARGS(lldb::LanguageType, SBCompileUnit, GetLanguage); + if (m_opaque_ptr) return m_opaque_ptr->GetLanguage(); return lldb::eLanguageTypeUnknown; } -bool SBCompileUnit::IsValid() const { return m_opaque_ptr != NULL; } +bool SBCompileUnit::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCompileUnit, IsValid); + return m_opaque_ptr != NULL; +} bool SBCompileUnit::operator==(const SBCompileUnit &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBCompileUnit, operator==,(const lldb::SBCompileUnit &), rhs); + return m_opaque_ptr == rhs.m_opaque_ptr; } bool SBCompileUnit::operator!=(const SBCompileUnit &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBCompileUnit, operator!=,(const lldb::SBCompileUnit &), rhs); + return m_opaque_ptr != rhs.m_opaque_ptr; } @@ -215,6 +262,9 @@ } bool SBCompileUnit::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBCompileUnit, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ptr) { Index: source/API/SBData.cpp =================================================================== --- source/API/SBData.cpp +++ source/API/SBData.cpp @@ -8,6 +8,8 @@ #include +#include "SBReproducerPrivate.h" + #include "lldb/API/SBData.h" #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" @@ -21,13 +23,20 @@ using namespace lldb; using namespace lldb_private; -SBData::SBData() : m_opaque_sp(new DataExtractor()) {} +SBData::SBData() : m_opaque_sp(new DataExtractor()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBData); +} SBData::SBData(const lldb::DataExtractorSP &data_sp) : m_opaque_sp(data_sp) {} -SBData::SBData(const SBData &rhs) : m_opaque_sp(rhs.m_opaque_sp) {} +SBData::SBData(const SBData &rhs) : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBData, (const lldb::SBData &), rhs); +} const SBData &SBData::operator=(const SBData &rhs) { + SB_RECORD_METHOD(const lldb::SBData &, + SBData, operator=,(const lldb::SBData &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -49,9 +58,14 @@ const lldb::DataExtractorSP &SBData::operator*() const { return m_opaque_sp; } -bool SBData::IsValid() { return m_opaque_sp.get() != NULL; } +bool SBData::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBData, IsValid); + return m_opaque_sp.get() != NULL; +} uint8_t SBData::GetAddressByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint8_t, SBData, GetAddressByteSize); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint8_t value = 0; if (m_opaque_sp.get()) @@ -64,6 +78,8 @@ } void SBData::SetAddressByteSize(uint8_t addr_byte_size) { + SB_RECORD_METHOD(void, SBData, SetAddressByteSize, (uint8_t), addr_byte_size); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_opaque_sp.get()) m_opaque_sp->SetAddressByteSize(addr_byte_size); @@ -72,11 +88,15 @@ } void SBData::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBData, Clear); + if (m_opaque_sp.get()) m_opaque_sp->Clear(); } size_t SBData::GetByteSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBData, GetByteSize); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); size_t value = 0; if (m_opaque_sp.get()) @@ -89,6 +109,8 @@ } lldb::ByteOrder SBData::GetByteOrder() { + SB_RECORD_METHOD_NO_ARGS(lldb::ByteOrder, SBData, GetByteOrder); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::ByteOrder value = eByteOrderInvalid; if (m_opaque_sp.get()) @@ -101,6 +123,8 @@ } void SBData::SetByteOrder(lldb::ByteOrder endian) { + SB_RECORD_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder), endian); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_opaque_sp.get()) m_opaque_sp->SetByteOrder(endian); @@ -109,6 +133,9 @@ } float SBData::GetFloat(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(float, SBData, GetFloat, (lldb::SBError &, lldb::offset_t), + error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); float value = 0; if (!m_opaque_sp.get()) { @@ -126,6 +153,9 @@ } double SBData::GetDouble(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(double, SBData, GetDouble, (lldb::SBError &, lldb::offset_t), + error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); double value = 0; if (!m_opaque_sp.get()) { @@ -144,6 +174,9 @@ } long double SBData::GetLongDouble(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(long double, SBData, GetLongDouble, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); long double value = 0; if (!m_opaque_sp.get()) { @@ -162,6 +195,9 @@ } lldb::addr_t SBData::GetAddress(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(lldb::addr_t, SBData, GetAddress, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::addr_t value = 0; if (!m_opaque_sp.get()) { @@ -181,6 +217,9 @@ } uint8_t SBData::GetUnsignedInt8(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(uint8_t, SBData, GetUnsignedInt8, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint8_t value = 0; if (!m_opaque_sp.get()) { @@ -199,6 +238,9 @@ } uint16_t SBData::GetUnsignedInt16(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(uint16_t, SBData, GetUnsignedInt16, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint16_t value = 0; if (!m_opaque_sp.get()) { @@ -217,6 +259,9 @@ } uint32_t SBData::GetUnsignedInt32(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(uint32_t, SBData, GetUnsignedInt32, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t value = 0; if (!m_opaque_sp.get()) { @@ -235,6 +280,9 @@ } uint64_t SBData::GetUnsignedInt64(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(uint64_t, SBData, GetUnsignedInt64, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint64_t value = 0; if (!m_opaque_sp.get()) { @@ -253,6 +301,9 @@ } int8_t SBData::GetSignedInt8(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(int8_t, SBData, GetSignedInt8, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); int8_t value = 0; if (!m_opaque_sp.get()) { @@ -271,6 +322,9 @@ } int16_t SBData::GetSignedInt16(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(int16_t, SBData, GetSignedInt16, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); int16_t value = 0; if (!m_opaque_sp.get()) { @@ -289,6 +343,9 @@ } int32_t SBData::GetSignedInt32(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(int32_t, SBData, GetSignedInt32, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); int32_t value = 0; if (!m_opaque_sp.get()) { @@ -307,6 +364,9 @@ } int64_t SBData::GetSignedInt64(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(int64_t, SBData, GetSignedInt64, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); int64_t value = 0; if (!m_opaque_sp.get()) { @@ -325,6 +385,9 @@ } const char *SBData::GetString(lldb::SBError &error, lldb::offset_t offset) { + SB_RECORD_METHOD(const char *, SBData, GetString, + (lldb::SBError &, lldb::offset_t), error, offset); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *value = 0; if (!m_opaque_sp.get()) { @@ -344,6 +407,9 @@ bool SBData::GetDescription(lldb::SBStream &description, lldb::addr_t base_addr) { + SB_RECORD_METHOD(bool, SBData, GetDescription, + (lldb::SBStream &, lldb::addr_t), description, base_addr); + Stream &strm = description.ref(); if (m_opaque_sp) { @@ -398,6 +464,8 @@ } bool SBData::Append(const SBData &rhs) { + SB_RECORD_METHOD(bool, SBData, Append, (const lldb::SBData &), rhs); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool value = false; if (m_opaque_sp.get() && rhs.m_opaque_sp.get()) @@ -411,6 +479,10 @@ lldb::SBData SBData::CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, const char *data) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromCString, + (lldb::ByteOrder, uint32_t, const char *), endian, + addr_byte_size, data); + if (!data || !data[0]) return SBData(); @@ -429,6 +501,10 @@ uint32_t addr_byte_size, uint64_t *array, size_t array_len) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt64Array, + (lldb::ByteOrder, uint32_t, uint64_t *, size_t), + endian, addr_byte_size, array, array_len); + if (!array || array_len == 0) return SBData(); @@ -447,6 +523,10 @@ uint32_t addr_byte_size, uint32_t *array, size_t array_len) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt32Array, + (lldb::ByteOrder, uint32_t, uint32_t *, size_t), + endian, addr_byte_size, array, array_len); + if (!array || array_len == 0) return SBData(); @@ -465,6 +545,10 @@ uint32_t addr_byte_size, int64_t *array, size_t array_len) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt64Array, + (lldb::ByteOrder, uint32_t, int64_t *, size_t), + endian, addr_byte_size, array, array_len); + if (!array || array_len == 0) return SBData(); @@ -483,6 +567,10 @@ uint32_t addr_byte_size, int32_t *array, size_t array_len) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt32Array, + (lldb::ByteOrder, uint32_t, int32_t *, size_t), + endian, addr_byte_size, array, array_len); + if (!array || array_len == 0) return SBData(); @@ -501,6 +589,10 @@ uint32_t addr_byte_size, double *array, size_t array_len) { + SB_RECORD_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromDoubleArray, + (lldb::ByteOrder, uint32_t, double *, size_t), endian, + addr_byte_size, array, array_len); + if (!array || array_len == 0) return SBData(); @@ -516,6 +608,8 @@ } bool SBData::SetDataFromCString(const char *data) { + SB_RECORD_METHOD(bool, SBData, SetDataFromCString, (const char *), data); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!data) { @@ -543,6 +637,9 @@ } bool SBData::SetDataFromUInt64Array(uint64_t *array, size_t array_len) { + SB_RECORD_METHOD(bool, SBData, SetDataFromUInt64Array, (uint64_t *, size_t), + array, array_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -575,6 +672,9 @@ } bool SBData::SetDataFromUInt32Array(uint32_t *array, size_t array_len) { + SB_RECORD_METHOD(bool, SBData, SetDataFromUInt32Array, (uint32_t *, size_t), + array, array_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -607,6 +707,9 @@ } bool SBData::SetDataFromSInt64Array(int64_t *array, size_t array_len) { + SB_RECORD_METHOD(bool, SBData, SetDataFromSInt64Array, (int64_t *, size_t), + array, array_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -639,6 +742,9 @@ } bool SBData::SetDataFromSInt32Array(int32_t *array, size_t array_len) { + SB_RECORD_METHOD(bool, SBData, SetDataFromSInt32Array, (int32_t *, size_t), + array, array_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -671,6 +777,9 @@ } bool SBData::SetDataFromDoubleArray(double *array, size_t array_len) { + SB_RECORD_METHOD(bool, SBData, SetDataFromDoubleArray, (double *, size_t), + array, array_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (!array || array_len == 0) { Index: source/API/SBDebugger.cpp =================================================================== --- source/API/SBDebugger.cpp +++ source/API/SBDebugger.cpp @@ -6,10 +6,11 @@ // //===----------------------------------------------------------------------===// - +#include "SBReproducerPrivate.h" #include "SystemInitializerFull.h" #include "lldb/API/SBDebugger.h" +#include "lldb/API/SBReproducer.h" #include "lldb/lldb-private.h" @@ -103,20 +104,32 @@ return SBError(); } -void SBInputReader::SetIsDone(bool) {} +void SBInputReader::SetIsDone(bool b) { + SB_RECORD_METHOD(void, SBInputReader, SetIsDone, (bool), b); +} -bool SBInputReader::IsActive() const { return false; } +bool SBInputReader::IsActive() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBInputReader, IsActive); + return false; +} -SBDebugger::SBDebugger() = default; +SBDebugger::SBDebugger() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBDebugger); } SBDebugger::SBDebugger(const lldb::DebuggerSP &debugger_sp) - : m_opaque_sp(debugger_sp) {} + : m_opaque_sp(debugger_sp) { + SB_RECORD_CONSTRUCTOR(SBDebugger, (const DebuggerSP &), debugger_sp); +} -SBDebugger::SBDebugger(const SBDebugger &rhs) : m_opaque_sp(rhs.m_opaque_sp) {} +SBDebugger::SBDebugger(const SBDebugger &rhs) : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBDebugger, (const SBDebugger &), rhs); +} -SBDebugger::~SBDebugger() = default; +SBDebugger::~SBDebugger() {} SBDebugger &SBDebugger::operator=(const SBDebugger &rhs) { + SB_RECORD_METHOD(lldb::SBDebugger &, + SBDebugger, operator=,(const lldb::SBDebugger &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -124,11 +137,16 @@ } void SBDebugger::Initialize() { + SB_RECORD_STATIC_METHOD_NO_ARGS(void, SBDebugger, Initialize); + SBInitializerOptions options; SBDebugger::Initialize(options); } lldb::SBError SBDebugger::Initialize(SBInitializerOptions &options) { + SB_RECORD_STATIC_METHOD(lldb::SBError, SBDebugger, Initialize, + (lldb::SBInitializerOptions &), options); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -143,9 +161,14 @@ return error; } -void SBDebugger::Terminate() { g_debugger_lifetime->Terminate(); } +void SBDebugger::Terminate() { + SB_RECORD_STATIC_METHOD_NO_ARGS(void, SBDebugger, Terminate); + g_debugger_lifetime->Terminate(); +} void SBDebugger::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBDebugger, Clear); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -159,17 +182,24 @@ } SBDebugger SBDebugger::Create() { - return SBDebugger::Create(false, nullptr, nullptr); + SB_RECORD_STATIC_METHOD_NO_ARGS(SBDebugger, SBDebugger, Create); + return SB_RECORD_RESULT(SBDebugger::Create(false, nullptr, nullptr)); } SBDebugger SBDebugger::Create(bool source_init_files) { - return SBDebugger::Create(source_init_files, nullptr, nullptr); + SB_RECORD_STATIC_METHOD(SBDebugger, SBDebugger, Create, (bool), + source_init_files); + return SB_RECORD_RESULT( + SBDebugger::Create(source_init_files, nullptr, nullptr)); } SBDebugger SBDebugger::Create(bool source_init_files, lldb::LogOutputCallback callback, void *baton) { + SB_RECORD_STATIC_METHOD(SBDebugger, SBDebugger, Create, + (bool, lldb::LogOutputCallback, void *), + source_init_files, callback, baton); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBDebugger debugger; @@ -202,10 +232,13 @@ interp.get()->SkipLLDBInitFiles(true); interp.get()->SkipAppInitFiles(true); } - return debugger; + return SB_RECORD_RESULT(debugger); } void SBDebugger::Destroy(SBDebugger &debugger) { + SB_RECORD_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &), + debugger); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { @@ -223,6 +256,8 @@ } void SBDebugger::MemoryPressureDetected() { + SB_RECORD_STATIC_METHOD_NO_ARGS(void, SBDebugger, MemoryPressureDetected); + // Since this function can be call asynchronously, we allow it to be non- // mandatory. We have seen deadlocks with this function when called so we // need to safeguard against this until we can determine what is causing the @@ -238,23 +273,30 @@ ModuleList::RemoveOrphanSharedModules(mandatory); } -bool SBDebugger::IsValid() const { return m_opaque_sp.get() != nullptr; } +bool SBDebugger::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, IsValid); + return m_opaque_sp.get() != nullptr; +} void SBDebugger::SetAsync(bool b) { + SB_RECORD_METHOD(void, SBDebugger, SetAsync, (bool), b); if (m_opaque_sp) m_opaque_sp->SetAsyncExecution(b); } bool SBDebugger::GetAsync() { + SB_RECORD_METHOD_NO_ARGS(bool, SBDebugger, GetAsync); return (m_opaque_sp ? m_opaque_sp->GetAsyncExecution() : false); } void SBDebugger::SkipLLDBInitFiles(bool b) { + SB_RECORD_METHOD(void, SBDebugger, SkipLLDBInitFiles, (bool), b); if (m_opaque_sp) m_opaque_sp->GetCommandInterpreter().SkipLLDBInitFiles(b); } void SBDebugger::SkipAppInitFiles(bool b) { + SB_RECORD_METHOD(void, SBDebugger, SkipAppInitFiles, (bool), b); if (m_opaque_sp) m_opaque_sp->GetCommandInterpreter().SkipAppInitFiles(b); } @@ -263,6 +305,8 @@ // of problems; don't want users trying to switch modes in the middle of a // debugging session. void SBDebugger::SetInputFileHandle(FILE *fh, bool transfer_ownership) { + SB_RECORD_METHOD(void, SBDebugger, SetInputFileHandle, (FILE *, bool), fh, + transfer_ownership); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -276,6 +320,8 @@ } void SBDebugger::SetOutputFileHandle(FILE *fh, bool transfer_ownership) { + SB_RECORD_METHOD(void, SBDebugger, SetOutputFileHandle, (FILE *, bool), fh, + transfer_ownership); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -289,6 +335,8 @@ } void SBDebugger::SetErrorFileHandle(FILE *fh, bool transfer_ownership) { + SB_RECORD_METHOD(void, SBDebugger, SetErrorFileHandle, (FILE *, bool), fh, + transfer_ownership); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -302,6 +350,8 @@ } FILE *SBDebugger::GetInputFileHandle() { + SB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetInputFileHandle); + if (m_opaque_sp) { StreamFileSP stream_file_sp(m_opaque_sp->GetInputFile()); if (stream_file_sp) @@ -311,6 +361,8 @@ } FILE *SBDebugger::GetOutputFileHandle() { + SB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetOutputFileHandle); + if (m_opaque_sp) { StreamFileSP stream_file_sp(m_opaque_sp->GetOutputFile()); if (stream_file_sp) @@ -320,6 +372,8 @@ } FILE *SBDebugger::GetErrorFileHandle() { + SB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetErrorFileHandle); + if (m_opaque_sp) { StreamFileSP stream_file_sp(m_opaque_sp->GetErrorFile()); if (stream_file_sp) @@ -329,15 +383,21 @@ } void SBDebugger::SaveInputTerminalState() { + SB_RECORD_METHOD_NO_ARGS(void, SBDebugger, SaveInputTerminalState); + if (m_opaque_sp) m_opaque_sp->SaveInputTerminalState(); } void SBDebugger::RestoreInputTerminalState() { + SB_RECORD_METHOD_NO_ARGS(void, SBDebugger, RestoreInputTerminalState); + if (m_opaque_sp) m_opaque_sp->RestoreInputTerminalState(); } SBCommandInterpreter SBDebugger::GetCommandInterpreter() { + SB_RECORD_METHOD_NO_ARGS(SBCommandInterpreter, SBDebugger, + GetCommandInterpreter); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBCommandInterpreter sb_interpreter; @@ -350,10 +410,12 @@ static_cast(m_opaque_sp.get()), static_cast(sb_interpreter.get())); - return sb_interpreter; + return SB_RECORD_RESULT(sb_interpreter); } void SBDebugger::HandleCommand(const char *command) { + SB_RECORD_METHOD(void, SBDebugger, HandleCommand, (const char *), command); + if (m_opaque_sp) { TargetSP target_sp(m_opaque_sp->GetSelectedTarget()); std::unique_lock lock; @@ -388,6 +450,8 @@ } SBListener SBDebugger::GetListener() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBDebugger, GetListener); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBListener sb_listener; @@ -405,6 +469,11 @@ void SBDebugger::HandleProcessEvent(const SBProcess &process, const SBEvent &event, FILE *out, FILE *err) { + SB_RECORD_METHOD( + void, SBDebugger, HandleProcessEvent, + (const lldb::SBProcess &, const lldb::SBEvent &, FILE *, FILE *), process, + event, out, err); + if (!process.IsValid()) return; @@ -447,11 +516,16 @@ } SBSourceManager SBDebugger::GetSourceManager() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSourceManager, SBDebugger, GetSourceManager); + SBSourceManager sb_source_manager(*this); return sb_source_manager; } bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) { + SB_RECORD_STATIC_METHOD(bool, SBDebugger, GetDefaultArchitecture, + (char *, size_t), arch_name, arch_name_len); + if (arch_name && arch_name_len) { ArchSpec default_arch = Target::GetDefaultArchitecture(); @@ -471,6 +545,9 @@ } bool SBDebugger::SetDefaultArchitecture(const char *arch_name) { + SB_RECORD_STATIC_METHOD(bool, SBDebugger, SetDefaultArchitecture, + (const char *), arch_name); + if (arch_name) { ArchSpec arch(arch_name); if (arch.IsValid()) { @@ -483,16 +560,24 @@ ScriptLanguage SBDebugger::GetScriptingLanguage(const char *script_language_name) { + SB_RECORD_METHOD(lldb::ScriptLanguage, SBDebugger, GetScriptingLanguage, + (const char *), script_language_name); + if (!script_language_name) return eScriptLanguageDefault; return OptionArgParser::ToScriptLanguage( llvm::StringRef(script_language_name), eScriptLanguageDefault, nullptr); } const char *SBDebugger::GetVersionString() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBDebugger, GetVersionString); + return lldb_private::GetVersion(); } const char *SBDebugger::StateAsCString(StateType state) { + SB_RECORD_STATIC_METHOD(const char *, SBDebugger, StateAsCString, + (lldb::StateType), state); + return lldb_private::StateAsCString(state); } @@ -517,6 +602,9 @@ } SBStructuredData SBDebugger::GetBuildConfiguration() { + SB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBStructuredData, SBDebugger, + GetBuildConfiguration); + auto config_up = llvm::make_unique(); AddBoolConfigEntry( *config_up, "xml", XMLDocument::XMLEnabled(), @@ -529,6 +617,9 @@ } bool SBDebugger::StateIsRunningState(StateType state) { + SB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsRunningState, + (lldb::StateType), state); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const bool result = lldb_private::StateIsRunningState(state); @@ -540,6 +631,9 @@ } bool SBDebugger::StateIsStoppedState(StateType state) { + SB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsStoppedState, + (lldb::StateType), state); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const bool result = lldb_private::StateIsStoppedState(state, false); @@ -555,6 +649,11 @@ const char *platform_name, bool add_dependent_modules, lldb::SBError &sb_error) { + SB_RECORD_METHOD( + lldb::SBTarget, SBDebugger, CreateTarget, + (const char *, const char *, const char *, bool, lldb::SBError &), + filename, target_triple, platform_name, add_dependent_modules, sb_error); + SBTarget sb_target; TargetSP target_sp; if (m_opaque_sp) { @@ -588,6 +687,10 @@ SBTarget SBDebugger::CreateTargetWithFileAndTargetTriple(const char *filename, const char *target_triple) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, + CreateTargetWithFileAndTargetTriple, + (const char *, const char *), filename, target_triple); + SBTarget sb_target; TargetSP target_sp; if (m_opaque_sp) { @@ -611,6 +714,9 @@ SBTarget SBDebugger::CreateTargetWithFileAndArch(const char *filename, const char *arch_cstr) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, CreateTargetWithFileAndArch, + (const char *, const char *), filename, arch_cstr); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBTarget sb_target; @@ -640,6 +746,9 @@ } SBTarget SBDebugger::CreateTarget(const char *filename) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, CreateTarget, (const char *), + filename); + SBTarget sb_target; TargetSP target_sp; if (m_opaque_sp) { @@ -665,6 +774,8 @@ } SBTarget SBDebugger::GetDummyTarget() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTarget, SBDebugger, GetDummyTarget); + SBTarget sb_target; if (m_opaque_sp) { sb_target.SetSP(m_opaque_sp->GetDummyTarget()->shared_from_this()); @@ -679,6 +790,8 @@ } bool SBDebugger::DeleteTarget(lldb::SBTarget &target) { + SB_RECORD_METHOD(bool, SBDebugger, DeleteTarget, (lldb::SBTarget &), target); + bool result = false; if (m_opaque_sp) { TargetSP target_sp(target.GetSP()); @@ -702,6 +815,9 @@ } SBTarget SBDebugger::GetTargetAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, GetTargetAtIndex, (uint32_t), + idx); + SBTarget sb_target; if (m_opaque_sp) { // No need to lock, the target list is thread safe @@ -711,6 +827,8 @@ } uint32_t SBDebugger::GetIndexOfTarget(lldb::SBTarget target) { + SB_RECORD_METHOD(uint32_t, SBDebugger, GetIndexOfTarget, (lldb::SBTarget), + target); lldb::TargetSP target_sp = target.GetSP(); if (!target_sp) @@ -723,6 +841,9 @@ } SBTarget SBDebugger::FindTargetWithProcessID(lldb::pid_t pid) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithProcessID, + (lldb::pid_t), pid); + SBTarget sb_target; if (m_opaque_sp) { // No need to lock, the target list is thread safe @@ -733,6 +854,9 @@ SBTarget SBDebugger::FindTargetWithFileAndArch(const char *filename, const char *arch_name) { + SB_RECORD_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithFileAndArch, + (const char *, const char *), filename, arch_name); + SBTarget sb_target; if (m_opaque_sp && filename && filename[0]) { // No need to lock, the target list is thread safe @@ -757,6 +881,8 @@ } uint32_t SBDebugger::GetNumTargets() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBDebugger, GetNumTargets); + if (m_opaque_sp) { // No need to lock, the target list is thread safe return m_opaque_sp->GetTargetList().GetNumTargets(); @@ -765,6 +891,8 @@ } SBTarget SBDebugger::GetSelectedTarget() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTarget, SBDebugger, GetSelectedTarget); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBTarget sb_target; @@ -787,6 +915,9 @@ } void SBDebugger::SetSelectedTarget(SBTarget &sb_target) { + SB_RECORD_METHOD(void, SBDebugger, SetSelectedTarget, (lldb::SBTarget &), + sb_target); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); TargetSP target_sp(sb_target.GetSP()); @@ -803,6 +934,8 @@ } SBPlatform SBDebugger::GetSelectedPlatform() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBPlatform, SBDebugger, GetSelectedPlatform); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBPlatform sb_platform; @@ -819,6 +952,9 @@ } void SBDebugger::SetSelectedPlatform(SBPlatform &sb_platform) { + SB_RECORD_METHOD(void, SBDebugger, SetSelectedPlatform, (lldb::SBPlatform &), + sb_platform); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); DebuggerSP debugger_sp(m_opaque_sp); @@ -834,6 +970,8 @@ } uint32_t SBDebugger::GetNumPlatforms() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBDebugger, GetNumPlatforms); + if (m_opaque_sp) { // No need to lock, the platform list is thread safe return m_opaque_sp->GetPlatformList().GetSize(); @@ -842,6 +980,9 @@ } SBPlatform SBDebugger::GetPlatformAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBPlatform, SBDebugger, GetPlatformAtIndex, (uint32_t), + idx); + SBPlatform sb_platform; if (m_opaque_sp) { // No need to lock, the platform list is thread safe @@ -851,6 +992,8 @@ } uint32_t SBDebugger::GetNumAvailablePlatforms() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBDebugger, GetNumAvailablePlatforms); + uint32_t idx = 0; while (true) { if (!PluginManager::GetPlatformPluginNameAtIndex(idx)) { @@ -863,6 +1006,9 @@ } SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBStructuredData, SBDebugger, + GetAvailablePlatformInfoAtIndex, (uint32_t), idx); + SBStructuredData data; auto platform_dict = llvm::make_unique(); llvm::StringRef name_str("name"), desc_str("description"); @@ -914,19 +1060,29 @@ } void SBDebugger::DispatchInputInterrupt() { + SB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputInterrupt); + if (m_opaque_sp) m_opaque_sp->DispatchInputInterrupt(); } void SBDebugger::DispatchInputEndOfFile() { + SB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputEndOfFile); + if (m_opaque_sp) m_opaque_sp->DispatchInputEndOfFile(); } -void SBDebugger::PushInputReader(SBInputReader &reader) {} +void SBDebugger::PushInputReader(SBInputReader &reader) { + SB_RECORD_METHOD(void, SBDebugger, PushInputReader, (lldb::SBInputReader &), + reader); +} void SBDebugger::RunCommandInterpreter(bool auto_handle_events, bool spawn_thread) { + SB_RECORD_METHOD(void, SBDebugger, RunCommandInterpreter, (bool, bool), + auto_handle_events, spawn_thread); + if (m_opaque_sp) { CommandInterpreterRunOptions options; @@ -942,6 +1098,11 @@ bool &stopped_for_crash) { + SB_RECORD_METHOD(void, SBDebugger, RunCommandInterpreter, + (bool, bool, lldb::SBCommandInterpreterRunOptions &, int &, + bool &, bool &), + auto_handle_events, spawn_thread, options, num_errors, + quit_requested, stopped_for_crash); if (m_opaque_sp) { CommandInterpreter &interp = m_opaque_sp->GetCommandInterpreter(); interp.RunCommandInterpreter(auto_handle_events, spawn_thread, @@ -954,6 +1115,9 @@ SBError SBDebugger::RunREPL(lldb::LanguageType language, const char *repl_options) { + SB_RECORD_METHOD(lldb::SBError, SBDebugger, RunREPL, + (lldb::LanguageType, const char *), language, repl_options); + SBError error; if (m_opaque_sp) error.ref() = m_opaque_sp->RunREPL(language, repl_options); @@ -976,6 +1140,9 @@ const lldb::DebuggerSP &SBDebugger::get_sp() const { return m_opaque_sp; } SBDebugger SBDebugger::FindDebuggerWithID(int id) { + SB_RECORD_STATIC_METHOD(lldb::SBDebugger, SBDebugger, FindDebuggerWithID, + (int), id); + // No need to lock, the debugger list is thread safe SBDebugger sb_debugger; DebuggerSP debugger_sp = Debugger::FindDebuggerWithID(id); @@ -985,11 +1152,17 @@ } const char *SBDebugger::GetInstanceName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBDebugger, GetInstanceName); + return (m_opaque_sp ? m_opaque_sp->GetInstanceName().AsCString() : nullptr); } SBError SBDebugger::SetInternalVariable(const char *var_name, const char *value, const char *debugger_instance_name) { + SB_RECORD_STATIC_METHOD(lldb::SBError, SBDebugger, SetInternalVariable, + (const char *, const char *, const char *), var_name, + value, debugger_instance_name); + SBError sb_error; DebuggerSP debugger_sp(Debugger::FindDebuggerWithInstanceName( ConstString(debugger_instance_name))); @@ -1011,6 +1184,10 @@ SBStringList SBDebugger::GetInternalVariableValue(const char *var_name, const char *debugger_instance_name) { + SB_RECORD_STATIC_METHOD( + lldb::SBStringList, SBDebugger, GetInternalVariableValue, + (const char *, const char *), var_name, debugger_instance_name); + SBStringList ret_value; DebuggerSP debugger_sp(Debugger::FindDebuggerWithInstanceName( ConstString(debugger_instance_name))); @@ -1035,15 +1212,21 @@ } uint32_t SBDebugger::GetTerminalWidth() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDebugger, GetTerminalWidth); + return (m_opaque_sp ? m_opaque_sp->GetTerminalWidth() : 0); } void SBDebugger::SetTerminalWidth(uint32_t term_width) { + SB_RECORD_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t), term_width); + if (m_opaque_sp) m_opaque_sp->SetTerminalWidth(term_width); } const char *SBDebugger::GetPrompt() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBDebugger, GetPrompt); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -1056,43 +1239,64 @@ } void SBDebugger::SetPrompt(const char *prompt) { + SB_RECORD_METHOD(void, SBDebugger, SetPrompt, (const char *), prompt); + if (m_opaque_sp) m_opaque_sp->SetPrompt(llvm::StringRef::withNullAsEmpty(prompt)); } const char *SBDebugger::GetReproducerPath() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBDebugger, GetReproducerPath); + return (m_opaque_sp ? ConstString(m_opaque_sp->GetReproducerPath()).GetCString() : nullptr); } ScriptLanguage SBDebugger::GetScriptLanguage() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::ScriptLanguage, SBDebugger, + GetScriptLanguage); + return (m_opaque_sp ? m_opaque_sp->GetScriptLanguage() : eScriptLanguageNone); } void SBDebugger::SetScriptLanguage(ScriptLanguage script_lang) { + SB_RECORD_METHOD(void, SBDebugger, SetScriptLanguage, (lldb::ScriptLanguage), + script_lang); + if (m_opaque_sp) { m_opaque_sp->SetScriptLanguage(script_lang); } } bool SBDebugger::SetUseExternalEditor(bool value) { + SB_RECORD_METHOD(bool, SBDebugger, SetUseExternalEditor, (bool), value); + return (m_opaque_sp ? m_opaque_sp->SetUseExternalEditor(value) : false); } bool SBDebugger::GetUseExternalEditor() { + SB_RECORD_METHOD_NO_ARGS(bool, SBDebugger, GetUseExternalEditor); + return (m_opaque_sp ? m_opaque_sp->GetUseExternalEditor() : false); } bool SBDebugger::SetUseColor(bool value) { + SB_RECORD_METHOD(bool, SBDebugger, SetUseColor, (bool), value); + return (m_opaque_sp ? m_opaque_sp->SetUseColor(value) : false); } bool SBDebugger::GetUseColor() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, GetUseColor); + return (m_opaque_sp ? m_opaque_sp->GetUseColor() : false); } bool SBDebugger::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBDebugger, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_sp) { @@ -1106,10 +1310,15 @@ } user_id_t SBDebugger::GetID() { + SB_RECORD_METHOD_NO_ARGS(lldb::user_id_t, SBDebugger, GetID); + return (m_opaque_sp ? m_opaque_sp->GetID() : LLDB_INVALID_UID); } SBError SBDebugger::SetCurrentPlatform(const char *platform_name_cstr) { + SB_RECORD_METHOD(lldb::SBError, SBDebugger, SetCurrentPlatform, + (const char *), platform_name_cstr); + SBError sb_error; if (m_opaque_sp) { if (platform_name_cstr && platform_name_cstr[0]) { @@ -1138,6 +1347,9 @@ } bool SBDebugger::SetCurrentPlatformSDKRoot(const char *sysroot) { + SB_RECORD_METHOD(bool, SBDebugger, SetCurrentPlatformSDKRoot, (const char *), + sysroot); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_opaque_sp) { PlatformSP platform_sp( @@ -1154,15 +1366,22 @@ } bool SBDebugger::GetCloseInputOnEOF() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, GetCloseInputOnEOF); + return (m_opaque_sp ? m_opaque_sp->GetCloseInputOnEOF() : false); } void SBDebugger::SetCloseInputOnEOF(bool b) { + SB_RECORD_METHOD(void, SBDebugger, SetCloseInputOnEOF, (bool), b); + if (m_opaque_sp) m_opaque_sp->SetCloseInputOnEOF(b); } SBTypeCategory SBDebugger::GetCategory(const char *category_name) { + SB_RECORD_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory, + (const char *), category_name); + if (!category_name || *category_name == 0) return SBTypeCategory(); @@ -1176,6 +1395,9 @@ } SBTypeCategory SBDebugger::GetCategory(lldb::LanguageType lang_type) { + SB_RECORD_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory, + (lldb::LanguageType), lang_type); + TypeCategoryImplSP category_sp; if (DataVisualization::Categories::GetCategory(lang_type, category_sp)) return SBTypeCategory(category_sp); @@ -1184,6 +1406,9 @@ } SBTypeCategory SBDebugger::CreateCategory(const char *category_name) { + SB_RECORD_METHOD(lldb::SBTypeCategory, SBDebugger, CreateCategory, + (const char *), category_name); + if (!category_name || *category_name == 0) return SBTypeCategory(); @@ -1197,6 +1422,9 @@ } bool SBDebugger::DeleteCategory(const char *category_name) { + SB_RECORD_METHOD(bool, SBDebugger, DeleteCategory, (const char *), + category_name); + if (!category_name || *category_name == 0) return false; @@ -1204,19 +1432,30 @@ } uint32_t SBDebugger::GetNumCategories() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBDebugger, GetNumCategories); + return DataVisualization::Categories::GetCount(); } SBTypeCategory SBDebugger::GetCategoryAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategoryAtIndex, + (uint32_t), index); + return SBTypeCategory( DataVisualization::Categories::GetCategoryAtIndex(index)); } SBTypeCategory SBDebugger::GetDefaultCategory() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeCategory, SBDebugger, + GetDefaultCategory); + return GetCategory("default"); } SBTypeFormat SBDebugger::GetFormatForType(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(lldb::SBTypeFormat, SBDebugger, GetFormatForType, + (lldb::SBTypeNameSpecifier), type_name); + SBTypeCategory default_category_sb = GetDefaultCategory(); if (default_category_sb.GetEnabled()) return default_category_sb.GetFormatForType(type_name); @@ -1225,6 +1464,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSummary SBDebugger::GetSummaryForType(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(lldb::SBTypeSummary, SBDebugger, GetSummaryForType, + (lldb::SBTypeNameSpecifier), type_name); + if (!type_name.IsValid()) return SBTypeSummary(); return SBTypeSummary(DataVisualization::GetSummaryForType(type_name.GetSP())); @@ -1232,6 +1474,9 @@ #endif // LLDB_DISABLE_PYTHON SBTypeFilter SBDebugger::GetFilterForType(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType, + (lldb::SBTypeNameSpecifier), type_name); + if (!type_name.IsValid()) return SBTypeFilter(); return SBTypeFilter(DataVisualization::GetFilterForType(type_name.GetSP())); @@ -1239,6 +1484,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSynthetic SBDebugger::GetSyntheticForType(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(lldb::SBTypeSynthetic, SBDebugger, GetSyntheticForType, + (lldb::SBTypeNameSpecifier), type_name); + if (!type_name.IsValid()) return SBTypeSynthetic(); return SBTypeSynthetic( @@ -1256,6 +1504,9 @@ } bool SBDebugger::EnableLog(const char *channel, const char **categories) { + SB_RECORD_METHOD(bool, SBDebugger, EnableLog, (const char *, const char **), + channel, categories); + if (m_opaque_sp) { uint32_t log_options = LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_THREAD_NAME; Index: source/API/SBDeclaration.cpp =================================================================== --- source/API/SBDeclaration.cpp +++ source/API/SBDeclaration.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBDeclaration.h" #include "lldb/API/SBStream.h" #include "lldb/Host/PosixApi.h" @@ -18,9 +20,13 @@ using namespace lldb; using namespace lldb_private; -SBDeclaration::SBDeclaration() : m_opaque_ap() {} +SBDeclaration::SBDeclaration() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBDeclaration); +} SBDeclaration::SBDeclaration(const SBDeclaration &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBDeclaration, (const lldb::SBDeclaration &), rhs); + if (rhs.IsValid()) ref() = rhs.ref(); } @@ -32,6 +38,9 @@ } const SBDeclaration &SBDeclaration::operator=(const SBDeclaration &rhs) { + SB_RECORD_METHOD(const lldb::SBDeclaration &, + SBDeclaration, operator=,(const lldb::SBDeclaration &), rhs); + if (this != &rhs) { if (rhs.IsValid()) ref() = rhs.ref(); @@ -49,10 +58,14 @@ SBDeclaration::~SBDeclaration() {} bool SBDeclaration::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDeclaration, IsValid); + return m_opaque_ap.get() && m_opaque_ap->IsValid(); } SBFileSpec SBDeclaration::GetFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBDeclaration, GetFileSpec); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFileSpec sb_file_spec; @@ -71,6 +84,8 @@ } uint32_t SBDeclaration::GetLine() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetLine); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t line = 0; @@ -85,22 +100,36 @@ } uint32_t SBDeclaration::GetColumn() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetColumn); + if (m_opaque_ap) return m_opaque_ap->GetColumn(); return 0; } void SBDeclaration::SetFileSpec(lldb::SBFileSpec filespec) { + SB_RECORD_METHOD(void, SBDeclaration, SetFileSpec, (lldb::SBFileSpec), + filespec); + if (filespec.IsValid()) ref().SetFile(filespec.ref()); else ref().SetFile(FileSpec()); } -void SBDeclaration::SetLine(uint32_t line) { ref().SetLine(line); } +void SBDeclaration::SetLine(uint32_t line) { + SB_RECORD_METHOD(void, SBDeclaration, SetLine, (uint32_t), line); + ref().SetLine(line); +} -void SBDeclaration::SetColumn(uint32_t column) { ref().SetColumn(column); } +void SBDeclaration::SetColumn(uint32_t column) { + SB_RECORD_METHOD(void, SBDeclaration, SetColumn, (uint32_t), column); + ref().SetColumn(column); +} bool SBDeclaration::operator==(const SBDeclaration &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBDeclaration, operator==,(const lldb::SBDeclaration &), rhs); + lldb_private::Declaration *lhs_ptr = m_opaque_ap.get(); lldb_private::Declaration *rhs_ptr = rhs.m_opaque_ap.get(); @@ -111,6 +140,9 @@ } bool SBDeclaration::operator!=(const SBDeclaration &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBDeclaration, operator!=,(const lldb::SBDeclaration &), rhs); + lldb_private::Declaration *lhs_ptr = m_opaque_ap.get(); lldb_private::Declaration *rhs_ptr = rhs.m_opaque_ap.get(); @@ -135,6 +167,9 @@ } bool SBDeclaration::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBDeclaration, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ap) { Index: source/API/SBError.cpp =================================================================== --- source/API/SBError.cpp +++ source/API/SBError.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" #include "lldb/Utility/Log.h" @@ -16,9 +18,11 @@ using namespace lldb; using namespace lldb_private; -SBError::SBError() : m_opaque_ap() {} +SBError::SBError() : m_opaque_ap() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBError); } SBError::SBError(const SBError &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBError, (const lldb::SBError &), rhs); + if (rhs.IsValid()) m_opaque_ap.reset(new Status(*rhs)); } @@ -26,6 +30,9 @@ SBError::~SBError() {} const SBError &SBError::operator=(const SBError &rhs) { + SB_RECORD_METHOD(const lldb::SBError &, + SBError, operator=,(const lldb::SBError &), rhs); + if (rhs.IsValid()) { if (m_opaque_ap) *m_opaque_ap = *rhs; @@ -38,17 +45,23 @@ } const char *SBError::GetCString() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBError, GetCString); + if (m_opaque_ap) return m_opaque_ap->AsCString(); return NULL; } void SBError::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBError, Clear); + if (m_opaque_ap) m_opaque_ap->Clear(); } bool SBError::Fail() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, Fail); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_value = false; @@ -63,6 +76,8 @@ } bool SBError::Success() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, Success); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_value = true; if (m_opaque_ap) @@ -76,6 +91,8 @@ } uint32_t SBError::GetError() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBError, GetError); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t err = 0; @@ -90,6 +107,8 @@ } ErrorType SBError::GetType() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::ErrorType, SBError, GetType); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ErrorType err_type = eErrorTypeInvalid; if (m_opaque_ap) @@ -103,6 +122,9 @@ } void SBError::SetError(uint32_t err, ErrorType type) { + SB_RECORD_METHOD(void, SBError, SetError, (uint32_t, lldb::ErrorType), err, + type); + CreateIfNeeded(); m_opaque_ap->SetError(err, type); } @@ -113,16 +135,22 @@ } void SBError::SetErrorToErrno() { + SB_RECORD_METHOD_NO_ARGS(void, SBError, SetErrorToErrno); + CreateIfNeeded(); m_opaque_ap->SetErrorToErrno(); } void SBError::SetErrorToGenericError() { + SB_RECORD_METHOD_NO_ARGS(void, SBError, SetErrorToGenericError); + CreateIfNeeded(); m_opaque_ap->SetErrorToErrno(); } void SBError::SetErrorString(const char *err_str) { + SB_RECORD_METHOD(void, SBError, SetErrorString, (const char *), err_str); + CreateIfNeeded(); m_opaque_ap->SetErrorString(err_str); } @@ -136,7 +164,10 @@ return num_chars; } -bool SBError::IsValid() const { return m_opaque_ap != NULL; } +bool SBError::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, IsValid); + return m_opaque_ap != NULL; +} void SBError::CreateIfNeeded() { if (m_opaque_ap == NULL) @@ -158,6 +189,9 @@ } bool SBError::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBError, GetDescription, (lldb::SBStream &), + description); + if (m_opaque_ap) { if (m_opaque_ap->Success()) description.Printf("success"); Index: source/API/SBEvent.cpp =================================================================== --- source/API/SBEvent.cpp +++ source/API/SBEvent.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBEvent.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBStream.h" @@ -21,21 +23,35 @@ using namespace lldb; using namespace lldb_private; -SBEvent::SBEvent() : m_event_sp(), m_opaque_ptr(NULL) {} +SBEvent::SBEvent() : m_event_sp(), m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBEvent); +} SBEvent::SBEvent(uint32_t event_type, const char *cstr, uint32_t cstr_len) : m_event_sp(new Event(event_type, new EventDataBytes(cstr, cstr_len))), - m_opaque_ptr(m_event_sp.get()) {} + m_opaque_ptr(m_event_sp.get()) { + SB_RECORD_CONSTRUCTOR(SBEvent, (uint32_t, const char *, uint32_t), event_type, + cstr, cstr_len); +} SBEvent::SBEvent(EventSP &event_sp) - : m_event_sp(event_sp), m_opaque_ptr(event_sp.get()) {} + : m_event_sp(event_sp), m_opaque_ptr(event_sp.get()) { + SB_RECORD_CONSTRUCTOR(SBEvent, (lldb::EventSP &), event_sp); +} -SBEvent::SBEvent(Event *event_ptr) : m_event_sp(), m_opaque_ptr(event_ptr) {} +SBEvent::SBEvent(Event *event_ptr) : m_event_sp(), m_opaque_ptr(event_ptr) { + SB_RECORD_CONSTRUCTOR(SBEvent, (lldb_private::Event *), event_ptr); +} SBEvent::SBEvent(const SBEvent &rhs) - : m_event_sp(rhs.m_event_sp), m_opaque_ptr(rhs.m_opaque_ptr) {} + : m_event_sp(rhs.m_event_sp), m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBEvent, (const lldb::SBEvent &), rhs); +} const SBEvent &SBEvent::operator=(const SBEvent &rhs) { + SB_RECORD_METHOD(const lldb::SBEvent &, + SBEvent, operator=,(const lldb::SBEvent &), rhs); + if (this != &rhs) { m_event_sp = rhs.m_event_sp; m_opaque_ptr = rhs.m_opaque_ptr; @@ -46,6 +62,8 @@ SBEvent::~SBEvent() {} const char *SBEvent::GetDataFlavor() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBEvent, GetDataFlavor); + Event *lldb_event = get(); if (lldb_event) { EventData *event_data = lldb_event->GetData(); @@ -56,6 +74,8 @@ } uint32_t SBEvent::GetType() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBEvent, GetType); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const Event *lldb_event = get(); @@ -78,6 +98,8 @@ } SBBroadcaster SBEvent::GetBroadcaster() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBEvent, GetBroadcaster); + SBBroadcaster broadcaster; const Event *lldb_event = get(); if (lldb_event) @@ -86,6 +108,8 @@ } const char *SBEvent::GetBroadcasterClass() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBEvent, GetBroadcasterClass); + const Event *lldb_event = get(); if (lldb_event) return lldb_event->GetBroadcaster()->GetBroadcasterClass().AsCString(); @@ -94,6 +118,9 @@ } bool SBEvent::BroadcasterMatchesPtr(const SBBroadcaster *broadcaster) { + SB_RECORD_METHOD(bool, SBEvent, BroadcasterMatchesPtr, + (const lldb::SBBroadcaster *), broadcaster); + if (broadcaster) return BroadcasterMatchesRef(*broadcaster); return false; @@ -116,6 +143,8 @@ } void SBEvent::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBEvent, Clear); + Event *lldb_event = get(); if (lldb_event) lldb_event->Clear(); @@ -145,12 +174,17 @@ } bool SBEvent::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBEvent, IsValid); + // Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get() accessor. // See comments in SBEvent::get().... return SBEvent::get() != NULL; } const char *SBEvent::GetCStringFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent, + (const lldb::SBEvent &), event); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -164,6 +198,9 @@ } bool SBEvent::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBEvent, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (get()) { @@ -175,6 +212,9 @@ } bool SBEvent::GetDescription(SBStream &description) const { + SB_RECORD_METHOD_CONST(bool, SBEvent, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (get()) { Index: source/API/SBExecutionContext.cpp =================================================================== --- source/API/SBExecutionContext.cpp +++ source/API/SBExecutionContext.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBExecutionContext.h" #include "lldb/API/SBFrame.h" @@ -19,32 +21,48 @@ using namespace lldb; using namespace lldb_private; -SBExecutionContext::SBExecutionContext() : m_exe_ctx_sp() {} +SBExecutionContext::SBExecutionContext() : m_exe_ctx_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBExecutionContext); +} SBExecutionContext::SBExecutionContext(const lldb::SBExecutionContext &rhs) - : m_exe_ctx_sp(rhs.m_exe_ctx_sp) {} + : m_exe_ctx_sp(rhs.m_exe_ctx_sp) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (const lldb::SBExecutionContext &), + rhs); +} SBExecutionContext::SBExecutionContext( lldb::ExecutionContextRefSP exe_ctx_ref_sp) - : m_exe_ctx_sp(exe_ctx_ref_sp) {} + : m_exe_ctx_sp(exe_ctx_ref_sp) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (lldb::ExecutionContextRefSP), + exe_ctx_ref_sp); +} SBExecutionContext::SBExecutionContext(const lldb::SBTarget &target) : m_exe_ctx_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (const lldb::SBTarget &), target); + m_exe_ctx_sp->SetTargetSP(target.GetSP()); } SBExecutionContext::SBExecutionContext(const lldb::SBProcess &process) : m_exe_ctx_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (const lldb::SBProcess &), process); + m_exe_ctx_sp->SetProcessSP(process.GetSP()); } SBExecutionContext::SBExecutionContext(lldb::SBThread thread) : m_exe_ctx_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (lldb::SBThread), thread); + m_exe_ctx_sp->SetThreadPtr(thread.get()); } SBExecutionContext::SBExecutionContext(const lldb::SBFrame &frame) : m_exe_ctx_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR(SBExecutionContext, (const lldb::SBFrame &), frame); + m_exe_ctx_sp->SetFrameSP(frame.GetFrameSP()); } @@ -52,6 +70,10 @@ const SBExecutionContext &SBExecutionContext:: operator=(const lldb::SBExecutionContext &rhs) { + SB_RECORD_METHOD( + const lldb::SBExecutionContext &, + SBExecutionContext, operator=,(const lldb::SBExecutionContext &), rhs); + m_exe_ctx_sp = rhs.m_exe_ctx_sp; return *this; } @@ -61,6 +83,8 @@ } SBTarget SBExecutionContext::GetTarget() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBTarget, SBExecutionContext, GetTarget); + SBTarget sb_target; if (m_exe_ctx_sp) { TargetSP target_sp(m_exe_ctx_sp->GetTargetSP()); @@ -71,6 +95,9 @@ } SBProcess SBExecutionContext::GetProcess() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBProcess, SBExecutionContext, + GetProcess); + SBProcess sb_process; if (m_exe_ctx_sp) { ProcessSP process_sp(m_exe_ctx_sp->GetProcessSP()); @@ -81,6 +108,8 @@ } SBThread SBExecutionContext::GetThread() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBExecutionContext, GetThread); + SBThread sb_thread; if (m_exe_ctx_sp) { ThreadSP thread_sp(m_exe_ctx_sp->GetThreadSP()); @@ -91,6 +120,8 @@ } SBFrame SBExecutionContext::GetFrame() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFrame, SBExecutionContext, GetFrame); + SBFrame sb_frame; if (m_exe_ctx_sp) { StackFrameSP frame_sp(m_exe_ctx_sp->GetFrameSP()); Index: source/API/SBExpressionOptions.cpp =================================================================== --- source/API/SBExpressionOptions.cpp +++ source/API/SBExpressionOptions.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBExpressionOptions.h" #include "lldb/API/SBStream.h" @@ -16,15 +18,24 @@ using namespace lldb_private; SBExpressionOptions::SBExpressionOptions() - : m_opaque_ap(new EvaluateExpressionOptions()) {} + : m_opaque_ap(new EvaluateExpressionOptions()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBExpressionOptions); +} SBExpressionOptions::SBExpressionOptions(const SBExpressionOptions &rhs) { + SB_RECORD_CONSTRUCTOR(SBExpressionOptions, + (const lldb::SBExpressionOptions &), rhs); + m_opaque_ap.reset(new EvaluateExpressionOptions()); *(m_opaque_ap.get()) = rhs.ref(); } const SBExpressionOptions &SBExpressionOptions:: operator=(const SBExpressionOptions &rhs) { + SB_RECORD_METHOD( + const lldb::SBExpressionOptions &, + SBExpressionOptions, operator=,(const lldb::SBExpressionOptions &), rhs); + if (this != &rhs) { this->ref() = rhs.ref(); } @@ -34,81 +45,133 @@ SBExpressionOptions::~SBExpressionOptions() {} bool SBExpressionOptions::GetCoerceResultToId() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, + GetCoerceResultToId); + return m_opaque_ap->DoesCoerceToId(); } void SBExpressionOptions::SetCoerceResultToId(bool coerce) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetCoerceResultToId, (bool), + coerce); + m_opaque_ap->SetCoerceToId(coerce); } bool SBExpressionOptions::GetUnwindOnError() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetUnwindOnError); + return m_opaque_ap->DoesUnwindOnError(); } void SBExpressionOptions::SetUnwindOnError(bool unwind) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetUnwindOnError, (bool), unwind); + m_opaque_ap->SetUnwindOnError(unwind); } bool SBExpressionOptions::GetIgnoreBreakpoints() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, + GetIgnoreBreakpoints); + return m_opaque_ap->DoesIgnoreBreakpoints(); } void SBExpressionOptions::SetIgnoreBreakpoints(bool ignore) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetIgnoreBreakpoints, (bool), + ignore); + m_opaque_ap->SetIgnoreBreakpoints(ignore); } lldb::DynamicValueType SBExpressionOptions::GetFetchDynamicValue() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::DynamicValueType, SBExpressionOptions, + GetFetchDynamicValue); + return m_opaque_ap->GetUseDynamic(); } void SBExpressionOptions::SetFetchDynamicValue(lldb::DynamicValueType dynamic) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetFetchDynamicValue, + (lldb::DynamicValueType), dynamic); + m_opaque_ap->SetUseDynamic(dynamic); } uint32_t SBExpressionOptions::GetTimeoutInMicroSeconds() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBExpressionOptions, + GetTimeoutInMicroSeconds); + return m_opaque_ap->GetTimeout() ? m_opaque_ap->GetTimeout()->count() : 0; } void SBExpressionOptions::SetTimeoutInMicroSeconds(uint32_t timeout) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetTimeoutInMicroSeconds, + (uint32_t), timeout); + m_opaque_ap->SetTimeout(timeout == 0 ? Timeout(llvm::None) : std::chrono::microseconds(timeout)); } uint32_t SBExpressionOptions::GetOneThreadTimeoutInMicroSeconds() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBExpressionOptions, + GetOneThreadTimeoutInMicroSeconds); + return m_opaque_ap->GetOneThreadTimeout() ? m_opaque_ap->GetOneThreadTimeout()->count() : 0; } void SBExpressionOptions::SetOneThreadTimeoutInMicroSeconds(uint32_t timeout) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetOneThreadTimeoutInMicroSeconds, + (uint32_t), timeout); + m_opaque_ap->SetOneThreadTimeout(timeout == 0 ? Timeout(llvm::None) : std::chrono::microseconds(timeout)); } bool SBExpressionOptions::GetTryAllThreads() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetTryAllThreads); + return m_opaque_ap->GetTryAllThreads(); } void SBExpressionOptions::SetTryAllThreads(bool run_others) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetTryAllThreads, (bool), + run_others); + m_opaque_ap->SetTryAllThreads(run_others); } bool SBExpressionOptions::GetStopOthers() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetStopOthers); + return m_opaque_ap->GetStopOthers(); } void SBExpressionOptions::SetStopOthers(bool run_others) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetStopOthers, (bool), + run_others); + m_opaque_ap->SetStopOthers(run_others); } bool SBExpressionOptions::GetTrapExceptions() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetTrapExceptions); + return m_opaque_ap->GetTrapExceptions(); } void SBExpressionOptions::SetTrapExceptions(bool trap_exceptions) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetTrapExceptions, (bool), + trap_exceptions); + m_opaque_ap->SetTrapExceptions(trap_exceptions); } void SBExpressionOptions::SetLanguage(lldb::LanguageType language) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetLanguage, (lldb::LanguageType), + language); + m_opaque_ap->SetLanguage(language); } @@ -118,51 +181,78 @@ } bool SBExpressionOptions::GetGenerateDebugInfo() { + SB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetGenerateDebugInfo); + return m_opaque_ap->GetGenerateDebugInfo(); } void SBExpressionOptions::SetGenerateDebugInfo(bool b) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetGenerateDebugInfo, (bool), b); + return m_opaque_ap->SetGenerateDebugInfo(b); } bool SBExpressionOptions::GetSuppressPersistentResult() { + SB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, + GetSuppressPersistentResult); + return m_opaque_ap->GetResultIsInternal(); } void SBExpressionOptions::SetSuppressPersistentResult(bool b) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetSuppressPersistentResult, + (bool), b); + return m_opaque_ap->SetResultIsInternal(b); } const char *SBExpressionOptions::GetPrefix() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBExpressionOptions, GetPrefix); + return m_opaque_ap->GetPrefix(); } void SBExpressionOptions::SetPrefix(const char *prefix) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetPrefix, (const char *), + prefix); + return m_opaque_ap->SetPrefix(prefix); } bool SBExpressionOptions::GetAutoApplyFixIts() { + SB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetAutoApplyFixIts); + return m_opaque_ap->GetAutoApplyFixIts(); } void SBExpressionOptions::SetAutoApplyFixIts(bool b) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetAutoApplyFixIts, (bool), b); + return m_opaque_ap->SetAutoApplyFixIts(b); } bool SBExpressionOptions::GetTopLevel() { + SB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetTopLevel); + return m_opaque_ap->GetExecutionPolicy() == eExecutionPolicyTopLevel; } void SBExpressionOptions::SetTopLevel(bool b) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetTopLevel, (bool), b); + m_opaque_ap->SetExecutionPolicy(b ? eExecutionPolicyTopLevel : m_opaque_ap->default_execution_policy); } bool SBExpressionOptions::GetAllowJIT() { + SB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetAllowJIT); + return m_opaque_ap->GetExecutionPolicy() != eExecutionPolicyNever; } void SBExpressionOptions::SetAllowJIT(bool allow) { + SB_RECORD_METHOD(void, SBExpressionOptions, SetAllowJIT, (bool), allow); + m_opaque_ap->SetExecutionPolicy(allow ? m_opaque_ap->default_execution_policy : eExecutionPolicyNever); } Index: source/API/SBFileSpec.cpp =================================================================== --- source/API/SBFileSpec.cpp +++ source/API/SBFileSpec.cpp @@ -9,7 +9,9 @@ #include #include +#include "SBReproducerPrivate.h" #include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBReproducer.h" #include "lldb/API/SBStream.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/PosixApi.h" @@ -22,21 +24,27 @@ using namespace lldb; using namespace lldb_private; -SBFileSpec::SBFileSpec() : m_opaque_ap(new lldb_private::FileSpec()) {} +SBFileSpec::SBFileSpec() : m_opaque_ap(new lldb_private::FileSpec()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBFileSpec); +} SBFileSpec::SBFileSpec(const SBFileSpec &rhs) - : m_opaque_ap(new lldb_private::FileSpec(*rhs.m_opaque_ap)) {} + : m_opaque_ap(new lldb_private::FileSpec(*rhs.m_opaque_ap)) { + SB_RECORD_CONSTRUCTOR(SBFileSpec, (const SBFileSpec &), rhs); +} SBFileSpec::SBFileSpec(const lldb_private::FileSpec &fspec) : m_opaque_ap(new lldb_private::FileSpec(fspec)) {} // Deprecated!!! SBFileSpec::SBFileSpec(const char *path) : m_opaque_ap(new FileSpec(path)) { + SB_RECORD_CONSTRUCTOR(SBFileSpec, (const char *), path); FileSystem::Instance().Resolve(*m_opaque_ap); } SBFileSpec::SBFileSpec(const char *path, bool resolve) : m_opaque_ap(new FileSpec(path)) { + SB_RECORD_CONSTRUCTOR(SBFileSpec, (const char *, bool), path, resolve); if (resolve) FileSystem::Instance().Resolve(*m_opaque_ap); } @@ -44,14 +52,20 @@ SBFileSpec::~SBFileSpec() {} const SBFileSpec &SBFileSpec::operator=(const SBFileSpec &rhs) { + SB_RECORD_METHOD(const SBFileSpec &, + SBFileSpec, operator=,(const SBFileSpec &), rhs); if (this != &rhs) *m_opaque_ap = *rhs.m_opaque_ap; return *this; } -bool SBFileSpec::IsValid() const { return m_opaque_ap->operator bool(); } +bool SBFileSpec::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFileSpec, IsValid); + return m_opaque_ap->operator bool(); +} bool SBFileSpec::Exists() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFileSpec, IsValid); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = FileSystem::Instance().Exists(*m_opaque_ap); @@ -65,11 +79,15 @@ } bool SBFileSpec::ResolveExecutableLocation() { + SB_RECORD_METHOD_NO_ARGS(bool, SBFileSpec, ResolveExecutableLocation); return FileSystem::Instance().ResolveExecutableLocation(*m_opaque_ap); } int SBFileSpec::ResolvePath(const char *src_path, char *dst_path, size_t dst_len) { + SB_RECORD_STATIC_METHOD(int, SBFileSpec, ResolvePath, + (const char *, char *, size_t), src_path, dst_path, + dst_len); llvm::SmallString<64> result(src_path); FileSystem::Instance().Resolve(result); ::snprintf(dst_path, dst_len, "%s", result.c_str()); @@ -77,6 +95,7 @@ } const char *SBFileSpec::GetFilename() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFileSpec, GetFilename); const char *s = m_opaque_ap->GetFilename().AsCString(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -93,6 +112,7 @@ } const char *SBFileSpec::GetDirectory() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFileSpec, GetDirectory); FileSpec directory{*m_opaque_ap}; directory.GetFilename().Clear(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -109,6 +129,7 @@ } void SBFileSpec::SetFilename(const char *filename) { + SB_RECORD_METHOD(void, SBFileSpec, SetFilename, (const char *), filename); if (filename && filename[0]) m_opaque_ap->GetFilename().SetCString(filename); else @@ -116,6 +137,7 @@ } void SBFileSpec::SetDirectory(const char *directory) { + SB_RECORD_METHOD(void, SBFileSpec, SetDirectory, (const char *), directory); if (directory && directory[0]) m_opaque_ap->GetDirectory().SetCString(directory); else @@ -123,6 +145,8 @@ } uint32_t SBFileSpec::GetPath(char *dst_path, size_t dst_len) const { + SB_RECORD_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t), + dst_path, dst_len); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t result = m_opaque_ap->GetPath(dst_path, dst_len); @@ -157,6 +181,8 @@ } bool SBFileSpec::GetDescription(SBStream &description) const { + SB_RECORD_METHOD_CONST(bool, SBFileSpec, GetDescription, (SBStream &), + description); Stream &strm = description.ref(); char path[PATH_MAX]; if (m_opaque_ap->GetPath(path, sizeof(path))) @@ -165,5 +191,6 @@ } void SBFileSpec::AppendPathComponent(const char *fn) { + SB_RECORD_METHOD(void, SBFileSpec, AppendPathComponent, (const char *), fn); m_opaque_ap->AppendPathComponent(fn); } Index: source/API/SBFileSpecList.cpp =================================================================== --- source/API/SBFileSpecList.cpp +++ source/API/SBFileSpecList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include #include "lldb/API/SBFileSpec.h" @@ -20,9 +22,13 @@ using namespace lldb; using namespace lldb_private; -SBFileSpecList::SBFileSpecList() : m_opaque_ap(new FileSpecList()) {} +SBFileSpecList::SBFileSpecList() : m_opaque_ap(new FileSpecList()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBFileSpecList); +} SBFileSpecList::SBFileSpecList(const SBFileSpecList &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBFileSpecList, (const lldb::SBFileSpecList &), rhs); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (rhs.m_opaque_ap) @@ -39,30 +45,53 @@ SBFileSpecList::~SBFileSpecList() {} const SBFileSpecList &SBFileSpecList::operator=(const SBFileSpecList &rhs) { + SB_RECORD_METHOD(const lldb::SBFileSpecList &, + SBFileSpecList, operator=,(const lldb::SBFileSpecList &), + rhs); + if (this != &rhs) { m_opaque_ap.reset(new lldb_private::FileSpecList(*(rhs.get()))); } return *this; } -uint32_t SBFileSpecList::GetSize() const { return m_opaque_ap->GetSize(); } +uint32_t SBFileSpecList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBFileSpecList, GetSize); + return m_opaque_ap->GetSize(); +} void SBFileSpecList::Append(const SBFileSpec &sb_file) { + SB_RECORD_METHOD(void, SBFileSpecList, Append, (const lldb::SBFileSpec &), + sb_file); + m_opaque_ap->Append(sb_file.ref()); } bool SBFileSpecList::AppendIfUnique(const SBFileSpec &sb_file) { + SB_RECORD_METHOD(bool, SBFileSpecList, AppendIfUnique, + (const lldb::SBFileSpec &), sb_file); + return m_opaque_ap->AppendIfUnique(sb_file.ref()); } -void SBFileSpecList::Clear() { m_opaque_ap->Clear(); } +void SBFileSpecList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBFileSpecList, Clear); + m_opaque_ap->Clear(); +} uint32_t SBFileSpecList::FindFileIndex(uint32_t idx, const SBFileSpec &sb_file, bool full) { + SB_RECORD_METHOD(uint32_t, SBFileSpecList, FindFileIndex, + (uint32_t, const lldb::SBFileSpec &, bool), idx, sb_file, + full); + return m_opaque_ap->FindFileIndex(idx, sb_file.ref(), full); } const SBFileSpec SBFileSpecList::GetFileSpecAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(const lldb::SBFileSpec, SBFileSpecList, + GetFileSpecAtIndex, (uint32_t), idx); + SBFileSpec new_spec; new_spec.SetFileSpec(m_opaque_ap->GetFileSpecAtIndex(idx)); return new_spec; @@ -85,6 +114,9 @@ } bool SBFileSpecList::GetDescription(SBStream &description) const { + SB_RECORD_METHOD_CONST(bool, SBFileSpecList, GetDescription, + (lldb::SBStream &), description); + Stream &strm = description.ref(); if (m_opaque_ap) { Index: source/API/SBFrame.cpp =================================================================== --- source/API/SBFrame.cpp +++ source/API/SBFrame.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include #include #include @@ -53,10 +55,14 @@ using namespace lldb; using namespace lldb_private; -SBFrame::SBFrame() : m_opaque_sp(new ExecutionContextRef()) {} +SBFrame::SBFrame() : m_opaque_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBFrame); +} SBFrame::SBFrame(const StackFrameSP &lldb_object_sp) : m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) { + SB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &), lldb_object_sp); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { @@ -69,11 +75,16 @@ } SBFrame::SBFrame(const SBFrame &rhs) - : m_opaque_sp(new ExecutionContextRef(*rhs.m_opaque_sp)) {} + : m_opaque_sp(new ExecutionContextRef(*rhs.m_opaque_sp)) { + SB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::SBFrame &), rhs); +} SBFrame::~SBFrame() = default; const SBFrame &SBFrame::operator=(const SBFrame &rhs) { + SB_RECORD_METHOD(const lldb::SBFrame &, + SBFrame, operator=,(const lldb::SBFrame &), rhs); + if (this != &rhs) *m_opaque_sp = *rhs.m_opaque_sp; return *this; @@ -88,6 +99,8 @@ } bool SBFrame::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsValid); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -104,6 +117,9 @@ } SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const { + SB_RECORD_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext, + (uint32_t), resolve_scope); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBSymbolContext sb_sym_ctx; std::unique_lock lock; @@ -140,6 +156,8 @@ } SBModule SBFrame::GetModule() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBModule, SBFrame, GetModule); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBModule sb_module; ModuleSP module_sp; @@ -176,6 +194,8 @@ } SBCompileUnit SBFrame::GetCompileUnit() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBCompileUnit, SBFrame, GetCompileUnit); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBCompileUnit sb_comp_unit; std::unique_lock lock; @@ -210,6 +230,8 @@ } SBFunction SBFrame::GetFunction() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFunction, SBFrame, GetFunction); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFunction sb_function; std::unique_lock lock; @@ -244,6 +266,8 @@ } SBSymbol SBFrame::GetSymbol() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBSymbol, SBFrame, GetSymbol); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBSymbol sb_symbol; std::unique_lock lock; @@ -276,6 +300,8 @@ } SBBlock SBFrame::GetBlock() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetBlock); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBlock sb_block; std::unique_lock lock; @@ -309,6 +335,8 @@ } SBBlock SBFrame::GetFrameBlock() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetFrameBlock); + SBBlock sb_block; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -341,6 +369,8 @@ } SBLineEntry SBFrame::GetLineEntry() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLineEntry, SBFrame, GetLineEntry); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBLineEntry sb_line_entry; std::unique_lock lock; @@ -374,6 +404,8 @@ } uint32_t SBFrame::GetFrameID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBFrame, GetFrameID); + uint32_t frame_idx = UINT32_MAX; std::unique_lock lock; @@ -391,6 +423,8 @@ } lldb::addr_t SBFrame::GetCFA() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetCFA); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -401,6 +435,8 @@ } addr_t SBFrame::GetPC() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetPC); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); addr_t addr = LLDB_INVALID_ADDRESS; std::unique_lock lock; @@ -435,6 +471,8 @@ } bool SBFrame::SetPC(addr_t new_pc) { + SB_RECORD_METHOD(bool, SBFrame, SetPC, (lldb::addr_t), new_pc); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_val = false; std::unique_lock lock; @@ -468,6 +506,8 @@ } addr_t SBFrame::GetSP() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetSP); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); addr_t addr = LLDB_INVALID_ADDRESS; std::unique_lock lock; @@ -500,6 +540,8 @@ } addr_t SBFrame::GetFP() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetFP); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); addr_t addr = LLDB_INVALID_ADDRESS; std::unique_lock lock; @@ -532,6 +574,8 @@ } SBAddress SBFrame::GetPCAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBFrame, GetPCAddress); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBAddress sb_addr; std::unique_lock lock; @@ -562,9 +606,15 @@ return sb_addr; } -void SBFrame::Clear() { m_opaque_sp->Clear(); } +void SBFrame::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBFrame, Clear); + m_opaque_sp->Clear(); +} lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath, + (const char *), var_path); + SBValue sb_value; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -581,6 +631,10 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path, DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath, + (const char *, lldb::DynamicValueType), var_path, + use_dynamic); + SBValue sb_value; Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (var_path == nullptr || var_path[0] == '\0') { @@ -624,6 +678,8 @@ } SBValue SBFrame::FindVariable(const char *name) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable, (const char *), name); + SBValue value; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -640,6 +696,9 @@ SBValue SBFrame::FindVariable(const char *name, lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable, + (const char *, lldb::DynamicValueType), name, use_dynamic); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); VariableSP var_sp; SBValue sb_value; @@ -686,6 +745,9 @@ } SBValue SBFrame::FindValue(const char *name, ValueType value_type) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, FindValue, + (const char *, lldb::ValueType), name, value_type); + SBValue value; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -702,6 +764,10 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, FindValue, + (const char *, lldb::ValueType, lldb::DynamicValueType), + name, value_type, use_dynamic); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBValue sb_value; @@ -836,16 +902,28 @@ } bool SBFrame::IsEqual(const SBFrame &that) const { + SB_RECORD_METHOD_CONST(bool, SBFrame, IsEqual, (const lldb::SBFrame &), that); + lldb::StackFrameSP this_sp = GetFrameSP(); lldb::StackFrameSP that_sp = that.GetFrameSP(); return (this_sp && that_sp && this_sp->GetStackID() == that_sp->GetStackID()); } -bool SBFrame::operator==(const SBFrame &rhs) const { return IsEqual(rhs); } +bool SBFrame::operator==(const SBFrame &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBFrame, operator==,(const lldb::SBFrame &), + rhs); + return IsEqual(rhs); +} -bool SBFrame::operator!=(const SBFrame &rhs) const { return !IsEqual(rhs); } +bool SBFrame::operator!=(const SBFrame &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBFrame, operator!=,(const lldb::SBFrame &), + rhs); + return !IsEqual(rhs); +} SBThread SBFrame::GetThread() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBFrame, GetThread); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -866,6 +944,8 @@ } const char *SBFrame::Disassemble() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, Disassemble); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *disassembly = nullptr; std::unique_lock lock; @@ -900,6 +980,10 @@ SBValueList SBFrame::GetVariables(bool arguments, bool locals, bool statics, bool in_scope_only) { + SB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (bool, bool, bool, bool), arguments, locals, statics, + in_scope_only); + SBValueList value_list; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -928,6 +1012,10 @@ lldb::SBValueList SBFrame::GetVariables(bool arguments, bool locals, bool statics, bool in_scope_only, lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (bool, bool, bool, bool, lldb::DynamicValueType), arguments, + locals, statics, in_scope_only, use_dynamic); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -945,6 +1033,9 @@ } SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) { + SB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (const lldb::SBVariablesOptions &), options); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBValueList value_list; @@ -1065,6 +1156,8 @@ } SBValueList SBFrame::GetRegisters() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValueList, SBFrame, GetRegisters); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBValueList value_list; @@ -1107,6 +1200,8 @@ } SBValue SBFrame::FindRegister(const char *name) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *), name); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBValue result; @@ -1158,6 +1253,9 @@ } bool SBFrame::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &), + description); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); Stream &strm = description.ref(); @@ -1190,6 +1288,9 @@ } SBValue SBFrame::EvaluateExpression(const char *expr) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, (const char *), + expr); + SBValue result; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1215,6 +1316,10 @@ SBValue SBFrame::EvaluateExpression(const char *expr, lldb::DynamicValueType fetch_dynamic_value) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, lldb::DynamicValueType), expr, + fetch_dynamic_value); + SBExpressionOptions options; options.SetFetchDynamicValue(fetch_dynamic_value); options.SetUnwindOnError(true); @@ -1234,6 +1339,10 @@ SBValue SBFrame::EvaluateExpression(const char *expr, lldb::DynamicValueType fetch_dynamic_value, bool unwind_on_error) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, lldb::DynamicValueType, bool), expr, + fetch_dynamic_value, unwind_on_error); + SBExpressionOptions options; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1252,6 +1361,10 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr, const SBExpressionOptions &options) { + SB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, const lldb::SBExpressionOptions &), expr, + options); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); #ifndef LLDB_DISABLE_PYTHON @@ -1328,10 +1441,14 @@ } bool SBFrame::IsInlined() { + SB_RECORD_METHOD_NO_ARGS(bool, SBFrame, IsInlined); + return static_cast(this)->IsInlined(); } bool SBFrame::IsInlined() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsInlined); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1362,10 +1479,14 @@ } bool SBFrame::IsArtificial() { + SB_RECORD_METHOD_NO_ARGS(bool, SBFrame, IsArtificial); + return static_cast(this)->IsArtificial(); } bool SBFrame::IsArtificial() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsArtificial); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1377,10 +1498,14 @@ } const char *SBFrame::GetFunctionName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetFunctionName); + return static_cast(this)->GetFunctionName(); } lldb::LanguageType SBFrame::GuessLanguage() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::LanguageType, SBFrame, GuessLanguage); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1400,6 +1525,8 @@ } const char *SBFrame::GetFunctionName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, GetFunctionName); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *name = nullptr; std::unique_lock lock; @@ -1449,6 +1576,8 @@ } const char *SBFrame::GetDisplayFunctionName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetDisplayFunctionName); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *name = nullptr; Index: source/API/SBFunction.cpp =================================================================== --- source/API/SBFunction.cpp +++ source/API/SBFunction.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBFunction.h" #include "lldb/API/SBProcess.h" #include "lldb/API/SBStream.h" @@ -22,24 +24,36 @@ using namespace lldb; using namespace lldb_private; -SBFunction::SBFunction() : m_opaque_ptr(NULL) {} +SBFunction::SBFunction() : m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBFunction); +} SBFunction::SBFunction(lldb_private::Function *lldb_object_ptr) : m_opaque_ptr(lldb_object_ptr) {} SBFunction::SBFunction(const lldb::SBFunction &rhs) - : m_opaque_ptr(rhs.m_opaque_ptr) {} + : m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBFunction, (const lldb::SBFunction &), rhs); +} const SBFunction &SBFunction::operator=(const SBFunction &rhs) { + SB_RECORD_METHOD(const lldb::SBFunction &, + SBFunction, operator=,(const lldb::SBFunction &), rhs); + m_opaque_ptr = rhs.m_opaque_ptr; return *this; } SBFunction::~SBFunction() { m_opaque_ptr = NULL; } -bool SBFunction::IsValid() const { return m_opaque_ptr != NULL; } +bool SBFunction::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFunction, IsValid); + return m_opaque_ptr != NULL; +} const char *SBFunction::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFunction, GetName); + const char *cstr = NULL; if (m_opaque_ptr) cstr = m_opaque_ptr->GetName().AsCString(); @@ -57,6 +71,8 @@ } const char *SBFunction::GetDisplayName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFunction, GetDisplayName); + const char *cstr = NULL; if (m_opaque_ptr) cstr = m_opaque_ptr->GetMangled() @@ -76,6 +92,8 @@ } const char *SBFunction::GetMangledName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFunction, GetMangledName); + const char *cstr = NULL; if (m_opaque_ptr) cstr = m_opaque_ptr->GetMangled().GetMangledName().AsCString(); @@ -92,14 +110,22 @@ } bool SBFunction::operator==(const SBFunction &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBFunction, operator==,(const lldb::SBFunction &), rhs); + return m_opaque_ptr == rhs.m_opaque_ptr; } bool SBFunction::operator!=(const SBFunction &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBFunction, operator!=,(const lldb::SBFunction &), rhs); + return m_opaque_ptr != rhs.m_opaque_ptr; } bool SBFunction::GetDescription(SBStream &s) { + SB_RECORD_METHOD(bool, SBFunction, GetDescription, (lldb::SBStream &), s); + if (m_opaque_ptr) { s.Printf("SBFunction: id = 0x%8.8" PRIx64 ", name = %s", m_opaque_ptr->GetID(), m_opaque_ptr->GetName().AsCString()); @@ -113,11 +139,17 @@ } SBInstructionList SBFunction::GetInstructions(SBTarget target) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions, + (lldb::SBTarget), target); + return GetInstructions(target, NULL); } SBInstructionList SBFunction::GetInstructions(SBTarget target, const char *flavor) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions, + (lldb::SBTarget, const char *), target, flavor); + SBInstructionList sb_instructions; if (m_opaque_ptr) { ExecutionContext exe_ctx; @@ -147,6 +179,8 @@ } SBAddress SBFunction::GetStartAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBFunction, GetStartAddress); + SBAddress addr; if (m_opaque_ptr) addr.SetAddress(&m_opaque_ptr->GetAddressRange().GetBaseAddress()); @@ -154,6 +188,8 @@ } SBAddress SBFunction::GetEndAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBFunction, GetEndAddress); + SBAddress addr; if (m_opaque_ptr) { addr_t byte_size = m_opaque_ptr->GetAddressRange().GetByteSize(); @@ -166,6 +202,9 @@ } const char *SBFunction::GetArgumentName(uint32_t arg_idx) { + SB_RECORD_METHOD(const char *, SBFunction, GetArgumentName, (uint32_t), + arg_idx); + if (m_opaque_ptr) { Block &block = m_opaque_ptr->GetBlock(true); VariableListSP variable_list_sp = block.GetBlockVariableList(true); @@ -182,12 +221,16 @@ } uint32_t SBFunction::GetPrologueByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBFunction, GetPrologueByteSize); + if (m_opaque_ptr) return m_opaque_ptr->GetPrologueByteSize(); return 0; } SBType SBFunction::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBFunction, GetType); + SBType sb_type; if (m_opaque_ptr) { Type *function_type = m_opaque_ptr->GetType(); @@ -198,6 +241,8 @@ } SBBlock SBFunction::GetBlock() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBFunction, GetBlock); + SBBlock sb_block; if (m_opaque_ptr) sb_block.SetPtr(&m_opaque_ptr->GetBlock(true)); @@ -205,6 +250,8 @@ } lldb::LanguageType SBFunction::GetLanguage() { + SB_RECORD_METHOD_NO_ARGS(lldb::LanguageType, SBFunction, GetLanguage); + if (m_opaque_ptr) { if (m_opaque_ptr->GetCompileUnit()) return m_opaque_ptr->GetCompileUnit()->GetLanguage(); @@ -213,6 +260,8 @@ } bool SBFunction::GetIsOptimized() { + SB_RECORD_METHOD_NO_ARGS(bool, SBFunction, GetIsOptimized); + if (m_opaque_ptr) { if (m_opaque_ptr->GetCompileUnit()) return m_opaque_ptr->GetCompileUnit()->GetIsOptimized(); Index: source/API/SBHostOS.cpp =================================================================== --- source/API/SBHostOS.cpp +++ source/API/SBHostOS.cpp @@ -10,8 +10,10 @@ #include "Plugins/ScriptInterpreter/Python/lldb-python.h" #endif +#include "SBReproducerPrivate.h" #include "lldb/API/SBError.h" #include "lldb/API/SBHostOS.h" +#include "lldb/API/SBReproducer.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" @@ -33,16 +35,25 @@ using namespace lldb_private; SBFileSpec SBHostOS::GetProgramFileSpec() { + SB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBFileSpec, SBHostOS, + GetProgramFileSpec); + SBFileSpec sb_filespec; sb_filespec.SetFileSpec(HostInfo::GetProgramFileSpec()); return sb_filespec; } SBFileSpec SBHostOS::GetLLDBPythonPath() { + SB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBFileSpec, SBHostOS, + GetLLDBPythonPath); + return GetLLDBPath(ePathTypePythonDir); } SBFileSpec SBHostOS::GetLLDBPath(lldb::PathType path_type) { + SB_RECORD_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetLLDBPath, + (lldb::PathType), path_type); + FileSpec fspec; switch (path_type) { case ePathTypeLLDBShlibDir: @@ -82,6 +93,7 @@ } SBFileSpec SBHostOS::GetUserHomeDirectory() { + SB_RECORD_STATIC_METHOD_NO_ARGS(SBFileSpec, SBHostOS, GetUserHomeDirectory); SBFileSpec sb_fspec; llvm::SmallString<64> home_dir_path; @@ -90,7 +102,7 @@ FileSystem::Instance().Resolve(homedir); sb_fspec.SetFileSpec(homedir); - return sb_fspec; + return SB_RECORD_RESULT(sb_fspec); } lldb::thread_t SBHostOS::ThreadCreate(const char *name, @@ -113,9 +125,14 @@ return thread.Release(); } -void SBHostOS::ThreadCreated(const char *name) {} +void SBHostOS::ThreadCreated(const char *name) { + SB_RECORD_STATIC_METHOD(void, SBHostOS, ThreadCreated, (const char *), name); +} bool SBHostOS::ThreadCancel(lldb::thread_t thread, SBError *error_ptr) { + SB_RECORD_STATIC_METHOD(bool, SBHostOS, ThreadCancel, + (lldb::thread_t, lldb::SBError *), thread, error_ptr); + Status error; HostThread host_thread(thread); error = host_thread.Cancel(); @@ -126,6 +143,9 @@ } bool SBHostOS::ThreadDetach(lldb::thread_t thread, SBError *error_ptr) { + SB_RECORD_STATIC_METHOD(bool, SBHostOS, ThreadDetach, + (lldb::thread_t, lldb::SBError *), thread, error_ptr); + Status error; #if defined(_WIN32) if (error_ptr) @@ -142,6 +162,11 @@ bool SBHostOS::ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result, SBError *error_ptr) { + SB_RECORD_STATIC_METHOD( + bool, SBHostOS, ThreadJoin, + (lldb::thread_t, lldb::thread_result_t *, lldb::SBError *), thread, + result, error_ptr); + Status error; HostThread host_thread(thread); error = host_thread.Join(result); Index: source/API/SBInitializerOptions.cpp =================================================================== --- source/API/SBInitializerOptions.cpp +++ source/API/SBInitializerOptions.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBInitializerOptions.h" #include "lldb/Initialization/SystemInitializer.h" @@ -13,12 +15,20 @@ using namespace lldb_private; SBInitializerOptions::SBInitializerOptions(const SBInitializerOptions &rhs) { + SB_RECORD_CONSTRUCTOR(SBInitializerOptions, + (const lldb::SBInitializerOptions &), rhs); + m_opaque_up.reset(new InitializerOptions()); *(m_opaque_up.get()) = rhs.ref(); } const SBInitializerOptions &SBInitializerOptions:: operator=(const SBInitializerOptions &rhs) { + SB_RECORD_METHOD( + const lldb::SBInitializerOptions &, + SBInitializerOptions, operator=,(const lldb::SBInitializerOptions &), + rhs); + if (this != &rhs) { this->ref() = rhs.ref(); } @@ -28,21 +38,33 @@ SBInitializerOptions::~SBInitializerOptions() {} SBInitializerOptions::SBInitializerOptions() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBInitializerOptions); + m_opaque_up.reset(new InitializerOptions()); } void SBInitializerOptions::SetCaptureReproducer(bool b) { + SB_RECORD_METHOD(void, SBInitializerOptions, SetCaptureReproducer, (bool), b); + m_opaque_up->reproducer_capture = b; } void SBInitializerOptions::SetReplayReproducer(bool b) { + SB_RECORD_METHOD(void, SBInitializerOptions, SetReplayReproducer, (bool), b); + m_opaque_up->reproducer_replay = b; } void SBInitializerOptions::SetReproducerPath(const char *path) { + SB_RECORD_METHOD(void, SBInitializerOptions, SetReproducerPath, + (const char *), path); + m_opaque_up->reproducer_path = path; } InitializerOptions &SBInitializerOptions::ref() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb_private::InitializerOptions &, + SBInitializerOptions, ref); + return *(m_opaque_up.get()); } Index: source/API/SBInstruction.cpp =================================================================== --- source/API/SBInstruction.cpp +++ source/API/SBInstruction.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBInstruction.h" #include "lldb/API/SBAddress.h" @@ -63,16 +65,23 @@ using namespace lldb; using namespace lldb_private; -SBInstruction::SBInstruction() : m_opaque_sp() {} +SBInstruction::SBInstruction() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBInstruction); +} SBInstruction::SBInstruction(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp) : m_opaque_sp(new InstructionImpl(disasm_sp, inst_sp)) {} SBInstruction::SBInstruction(const SBInstruction &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBInstruction, (const lldb::SBInstruction &), rhs); +} const SBInstruction &SBInstruction::operator=(const SBInstruction &rhs) { + SB_RECORD_METHOD(const lldb::SBInstruction &, + SBInstruction, operator=,(const lldb::SBInstruction &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -80,9 +89,14 @@ SBInstruction::~SBInstruction() {} -bool SBInstruction::IsValid() { return m_opaque_sp && m_opaque_sp->IsValid(); } +bool SBInstruction::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBInstruction, IsValid); + return m_opaque_sp && m_opaque_sp->IsValid(); +} SBAddress SBInstruction::GetAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBInstruction, GetAddress); + SBAddress sb_addr; lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp && inst_sp->GetAddress().IsValid()) @@ -91,6 +105,9 @@ } const char *SBInstruction::GetMnemonic(SBTarget target) { + SB_RECORD_METHOD(const char *, SBInstruction, GetMnemonic, (lldb::SBTarget), + target); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { ExecutionContext exe_ctx; @@ -108,6 +125,9 @@ } const char *SBInstruction::GetOperands(SBTarget target) { + SB_RECORD_METHOD(const char *, SBInstruction, GetOperands, (lldb::SBTarget), + target); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { ExecutionContext exe_ctx; @@ -125,6 +145,9 @@ } const char *SBInstruction::GetComment(SBTarget target) { + SB_RECORD_METHOD(const char *, SBInstruction, GetComment, (lldb::SBTarget), + target); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { ExecutionContext exe_ctx; @@ -142,6 +165,8 @@ } size_t SBInstruction::GetByteSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBInstruction, GetByteSize); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) return inst_sp->GetOpcode().GetByteSize(); @@ -149,6 +174,9 @@ } SBData SBInstruction::GetData(SBTarget target) { + SB_RECORD_METHOD(lldb::SBData, SBInstruction, GetData, (lldb::SBTarget), + target); + lldb::SBData sb_data; lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { @@ -161,6 +189,8 @@ } bool SBInstruction::DoesBranch() { + SB_RECORD_METHOD_NO_ARGS(bool, SBInstruction, DoesBranch); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) return inst_sp->DoesBranch(); @@ -168,13 +198,17 @@ } bool SBInstruction::HasDelaySlot() { + SB_RECORD_METHOD_NO_ARGS(bool, SBInstruction, HasDelaySlot); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) return inst_sp->HasDelaySlot(); return false; } -bool SBInstruction::CanSetBreakpoint () { +bool SBInstruction::CanSetBreakpoint() { + SB_RECORD_METHOD_NO_ARGS(bool, SBInstruction, CanSetBreakpoint); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) return inst_sp->CanSetBreakpoint(); @@ -194,6 +228,8 @@ } bool SBInstruction::GetDescription(lldb::SBStream &s) { + SB_RECORD_METHOD(bool, SBInstruction, GetDescription, (lldb::SBStream &), s); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { SymbolContext sc; @@ -213,6 +249,8 @@ } void SBInstruction::Print(FILE *out) { + SB_RECORD_METHOD(void, SBInstruction, Print, (FILE *), out); + if (out == NULL) return; @@ -233,6 +271,9 @@ bool SBInstruction::EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options) { + SB_RECORD_METHOD(bool, SBInstruction, EmulateWithFrame, + (lldb::SBFrame &, uint32_t), frame, evaluate_options); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp) { lldb::StackFrameSP frame_sp(frame.GetFrameSP()); @@ -255,6 +296,8 @@ } bool SBInstruction::DumpEmulation(const char *triple) { + SB_RECORD_METHOD(bool, SBInstruction, DumpEmulation, (const char *), triple); + lldb::InstructionSP inst_sp(GetOpaque()); if (inst_sp && triple) { return inst_sp->DumpEmulation(HostInfo::GetAugmentedArchSpec(triple)); @@ -264,6 +307,9 @@ bool SBInstruction::TestEmulation(lldb::SBStream &output_stream, const char *test_file) { + SB_RECORD_METHOD(bool, SBInstruction, TestEmulation, + (lldb::SBStream &, const char *), output_stream, test_file); + if (!m_opaque_sp) SetOpaque(lldb::DisassemblerSP(), lldb::InstructionSP(new PseudoInstruction())); Index: source/API/SBInstructionList.cpp =================================================================== --- source/API/SBInstructionList.cpp +++ source/API/SBInstructionList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBInstructionList.h" #include "lldb/API/SBInstruction.h" #include "lldb/API/SBAddress.h" @@ -18,13 +20,22 @@ using namespace lldb; using namespace lldb_private; -SBInstructionList::SBInstructionList() : m_opaque_sp() {} +SBInstructionList::SBInstructionList() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBInstructionList); +} SBInstructionList::SBInstructionList(const SBInstructionList &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBInstructionList, (const lldb::SBInstructionList &), + rhs); +} const SBInstructionList &SBInstructionList:: operator=(const SBInstructionList &rhs) { + SB_RECORD_METHOD( + const lldb::SBInstructionList &, + SBInstructionList, operator=,(const lldb::SBInstructionList &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -32,15 +43,23 @@ SBInstructionList::~SBInstructionList() {} -bool SBInstructionList::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBInstructionList::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBInstructionList, IsValid); + return m_opaque_sp.get() != NULL; +} size_t SBInstructionList::GetSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBInstructionList, GetSize); + if (m_opaque_sp) return m_opaque_sp->GetInstructionList().GetSize(); return 0; } SBInstruction SBInstructionList::GetInstructionAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBInstruction, SBInstructionList, + GetInstructionAtIndex, (uint32_t), idx); + SBInstruction inst; if (m_opaque_sp && idx < m_opaque_sp->GetInstructionList().GetSize()) inst.SetOpaque( @@ -50,8 +69,12 @@ } size_t SBInstructionList::GetInstructionsCount(const SBAddress &start, - const SBAddress &end, - bool canSetBreakpoint) { + const SBAddress &end, + bool canSetBreakpoint) { + SB_RECORD_METHOD(size_t, SBInstructionList, GetInstructionsCount, + (const lldb::SBAddress &, const lldb::SBAddress &, bool), + start, end, canSetBreakpoint); + size_t num_instructions = GetSize(); size_t i = 0; SBAddress addr; @@ -74,20 +97,31 @@ return upper_index - lower_index - instructions_to_skip; } -void SBInstructionList::Clear() { m_opaque_sp.reset(); } +void SBInstructionList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBInstructionList, Clear); + m_opaque_sp.reset(); +} -void SBInstructionList::AppendInstruction(SBInstruction insn) {} +void SBInstructionList::AppendInstruction(SBInstruction insn) { + SB_RECORD_METHOD(void, SBInstructionList, AppendInstruction, + (lldb::SBInstruction), insn); +} void SBInstructionList::SetDisassembler(const lldb::DisassemblerSP &opaque_sp) { m_opaque_sp = opaque_sp; } void SBInstructionList::Print(FILE *out) { + SB_RECORD_METHOD(void, SBInstructionList, Print, (FILE *), out); + if (out == NULL) return; } bool SBInstructionList::GetDescription(lldb::SBStream &description) { + SB_RECORD_METHOD(bool, SBInstructionList, GetDescription, (lldb::SBStream &), + description); + if (m_opaque_sp) { size_t num_instructions = GetSize(); if (num_instructions) { @@ -125,6 +159,9 @@ } bool SBInstructionList::DumpEmulationForAllInstructions(const char *triple) { + SB_RECORD_METHOD(bool, SBInstructionList, DumpEmulationForAllInstructions, + (const char *), triple); + if (m_opaque_sp) { size_t len = GetSize(); for (size_t i = 0; i < len; ++i) { Index: source/API/SBLanguageRuntime.cpp =================================================================== --- source/API/SBLanguageRuntime.cpp +++ source/API/SBLanguageRuntime.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBLanguageRuntime.h" #include "lldb/Target/Language.h" @@ -14,11 +16,18 @@ lldb::LanguageType SBLanguageRuntime::GetLanguageTypeFromString(const char *string) { + SB_RECORD_STATIC_METHOD(lldb::LanguageType, SBLanguageRuntime, + GetLanguageTypeFromString, (const char *), string); + return Language::GetLanguageTypeFromString( llvm::StringRef::withNullAsEmpty(string)); } const char * SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language) { + SB_RECORD_STATIC_METHOD(const char *, SBLanguageRuntime, + GetNameForLanguageType, (lldb::LanguageType), + language); + return Language::GetNameForLanguageType(language); } Index: source/API/SBLaunchInfo.cpp =================================================================== --- source/API/SBLaunchInfo.cpp +++ source/API/SBLaunchInfo.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBFileSpec.h" @@ -24,6 +26,11 @@ void RegenerateEnvp() { m_envp = GetEnvironment().getEnvp(); } SBLaunchInfoImpl &operator=(const ProcessLaunchInfo &rhs) { + SB_RECORD_METHOD( + lldb_private::SBLaunchInfoImpl &, + SBLaunchInfoImpl, operator=,(const lldb_private::ProcessLaunchInfo &), + rhs); + ProcessLaunchInfo::operator=(rhs); RegenerateEnvp(); return *this; @@ -35,6 +42,8 @@ SBLaunchInfo::SBLaunchInfo(const char **argv) : m_opaque_sp(new SBLaunchInfoImpl()) { + SB_RECORD_CONSTRUCTOR(SBLaunchInfo, (const char **), argv); + m_opaque_sp->GetFlags().Reset(eLaunchFlagDebug | eLaunchFlagDisableASLR); if (argv && argv[0]) m_opaque_sp->GetArguments().SetArguments(argv); @@ -50,46 +59,85 @@ *m_opaque_sp = info; } -lldb::pid_t SBLaunchInfo::GetProcessID() { return m_opaque_sp->GetProcessID(); } +lldb::pid_t SBLaunchInfo::GetProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBLaunchInfo, GetProcessID); + return m_opaque_sp->GetProcessID(); +} -uint32_t SBLaunchInfo::GetUserID() { return m_opaque_sp->GetUserID(); } +uint32_t SBLaunchInfo::GetUserID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetUserID); + return m_opaque_sp->GetUserID(); +} -uint32_t SBLaunchInfo::GetGroupID() { return m_opaque_sp->GetGroupID(); } +uint32_t SBLaunchInfo::GetGroupID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetGroupID); + return m_opaque_sp->GetGroupID(); +} -bool SBLaunchInfo::UserIDIsValid() { return m_opaque_sp->UserIDIsValid(); } +bool SBLaunchInfo::UserIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBLaunchInfo, UserIDIsValid); + return m_opaque_sp->UserIDIsValid(); +} -bool SBLaunchInfo::GroupIDIsValid() { return m_opaque_sp->GroupIDIsValid(); } +bool SBLaunchInfo::GroupIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBLaunchInfo, GroupIDIsValid); + return m_opaque_sp->GroupIDIsValid(); +} -void SBLaunchInfo::SetUserID(uint32_t uid) { m_opaque_sp->SetUserID(uid); } +void SBLaunchInfo::SetUserID(uint32_t uid) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetUserID, (uint32_t), uid); + m_opaque_sp->SetUserID(uid); +} -void SBLaunchInfo::SetGroupID(uint32_t gid) { m_opaque_sp->SetGroupID(gid); } +void SBLaunchInfo::SetGroupID(uint32_t gid) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetGroupID, (uint32_t), gid); + m_opaque_sp->SetGroupID(gid); +} SBFileSpec SBLaunchInfo::GetExecutableFile() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBLaunchInfo, GetExecutableFile); + return SBFileSpec(m_opaque_sp->GetExecutableFile()); } void SBLaunchInfo::SetExecutableFile(SBFileSpec exe_file, bool add_as_first_arg) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetExecutableFile, + (lldb::SBFileSpec, bool), exe_file, add_as_first_arg); + m_opaque_sp->SetExecutableFile(exe_file.ref(), add_as_first_arg); } SBListener SBLaunchInfo::GetListener() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBLaunchInfo, GetListener); + return SBListener(m_opaque_sp->GetListener()); } void SBLaunchInfo::SetListener(SBListener &listener) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetListener, (lldb::SBListener &), + listener); + m_opaque_sp->SetListener(listener.GetSP()); } uint32_t SBLaunchInfo::GetNumArguments() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetNumArguments); + return m_opaque_sp->GetArguments().GetArgumentCount(); } const char *SBLaunchInfo::GetArgumentAtIndex(uint32_t idx) { + SB_RECORD_METHOD(const char *, SBLaunchInfo, GetArgumentAtIndex, (uint32_t), + idx); + return m_opaque_sp->GetArguments().GetArgumentAtIndex(idx); } void SBLaunchInfo::SetArguments(const char **argv, bool append) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetArguments, (const char **, bool), + argv, append); + if (append) { if (argv) m_opaque_sp->GetArguments().AppendArguments(argv); @@ -102,16 +150,24 @@ } uint32_t SBLaunchInfo::GetNumEnvironmentEntries() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetNumEnvironmentEntries); + return m_opaque_sp->GetEnvironment().size(); } const char *SBLaunchInfo::GetEnvironmentEntryAtIndex(uint32_t idx) { + SB_RECORD_METHOD(const char *, SBLaunchInfo, GetEnvironmentEntryAtIndex, + (uint32_t), idx); + if (idx > GetNumEnvironmentEntries()) return nullptr; return m_opaque_sp->GetEnvp()[idx]; } void SBLaunchInfo::SetEnvironmentEntries(const char **envp, bool append) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetEnvironmentEntries, + (const char **, bool), envp, append); + Environment env(envp); if (append) m_opaque_sp->GetEnvironment().insert(env.begin(), env.end()); @@ -120,33 +176,53 @@ m_opaque_sp->RegenerateEnvp(); } -void SBLaunchInfo::Clear() { m_opaque_sp->Clear(); } +void SBLaunchInfo::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBLaunchInfo, Clear); + m_opaque_sp->Clear(); +} const char *SBLaunchInfo::GetWorkingDirectory() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBLaunchInfo, + GetWorkingDirectory); + return m_opaque_sp->GetWorkingDirectory().GetCString(); } void SBLaunchInfo::SetWorkingDirectory(const char *working_dir) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetWorkingDirectory, (const char *), + working_dir); + m_opaque_sp->SetWorkingDirectory(FileSpec(working_dir)); } uint32_t SBLaunchInfo::GetLaunchFlags() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetLaunchFlags); + return m_opaque_sp->GetFlags().Get(); } void SBLaunchInfo::SetLaunchFlags(uint32_t flags) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetLaunchFlags, (uint32_t), flags); + m_opaque_sp->GetFlags().Reset(flags); } const char *SBLaunchInfo::GetProcessPluginName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBLaunchInfo, GetProcessPluginName); + return m_opaque_sp->GetProcessPluginName(); } void SBLaunchInfo::SetProcessPluginName(const char *plugin_name) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetProcessPluginName, (const char *), + plugin_name); + return m_opaque_sp->SetProcessPluginName(plugin_name); } const char *SBLaunchInfo::GetShell() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBLaunchInfo, GetShell); + // Constify this string so that it is saved in the string pool. Otherwise it // would be freed when this function goes out of scope. ConstString shell(m_opaque_sp->GetShell().GetPath().c_str()); @@ -154,54 +230,85 @@ } void SBLaunchInfo::SetShell(const char *path) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetShell, (const char *), path); + m_opaque_sp->SetShell(FileSpec(path)); } bool SBLaunchInfo::GetShellExpandArguments() { + SB_RECORD_METHOD_NO_ARGS(bool, SBLaunchInfo, GetShellExpandArguments); + return m_opaque_sp->GetShellExpandArguments(); } void SBLaunchInfo::SetShellExpandArguments(bool expand) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetShellExpandArguments, (bool), expand); + m_opaque_sp->SetShellExpandArguments(expand); } uint32_t SBLaunchInfo::GetResumeCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBLaunchInfo, GetResumeCount); + return m_opaque_sp->GetResumeCount(); } void SBLaunchInfo::SetResumeCount(uint32_t c) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetResumeCount, (uint32_t), c); + m_opaque_sp->SetResumeCount(c); } bool SBLaunchInfo::AddCloseFileAction(int fd) { + SB_RECORD_METHOD(bool, SBLaunchInfo, AddCloseFileAction, (int), fd); + return m_opaque_sp->AppendCloseFileAction(fd); } bool SBLaunchInfo::AddDuplicateFileAction(int fd, int dup_fd) { + SB_RECORD_METHOD(bool, SBLaunchInfo, AddDuplicateFileAction, (int, int), fd, + dup_fd); + return m_opaque_sp->AppendDuplicateFileAction(fd, dup_fd); } bool SBLaunchInfo::AddOpenFileAction(int fd, const char *path, bool read, bool write) { + SB_RECORD_METHOD(bool, SBLaunchInfo, AddOpenFileAction, + (int, const char *, bool, bool), fd, path, read, write); + return m_opaque_sp->AppendOpenFileAction(fd, FileSpec(path), read, write); } bool SBLaunchInfo::AddSuppressFileAction(int fd, bool read, bool write) { + SB_RECORD_METHOD(bool, SBLaunchInfo, AddSuppressFileAction, (int, bool, bool), + fd, read, write); + return m_opaque_sp->AppendSuppressFileAction(fd, read, write); } void SBLaunchInfo::SetLaunchEventData(const char *data) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetLaunchEventData, (const char *), + data); + m_opaque_sp->SetLaunchEventData(data); } const char *SBLaunchInfo::GetLaunchEventData() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBLaunchInfo, + GetLaunchEventData); + return m_opaque_sp->GetLaunchEventData(); } void SBLaunchInfo::SetDetachOnError(bool enable) { + SB_RECORD_METHOD(void, SBLaunchInfo, SetDetachOnError, (bool), enable); + m_opaque_sp->SetDetachOnError(enable); } bool SBLaunchInfo::GetDetachOnError() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBLaunchInfo, GetDetachOnError); + return m_opaque_sp->GetDetachOnError(); } Index: source/API/SBLineEntry.cpp =================================================================== --- source/API/SBLineEntry.cpp +++ source/API/SBLineEntry.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include #include "lldb/API/SBLineEntry.h" @@ -18,9 +20,13 @@ using namespace lldb; using namespace lldb_private; -SBLineEntry::SBLineEntry() : m_opaque_ap() {} +SBLineEntry::SBLineEntry() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBLineEntry); +} SBLineEntry::SBLineEntry(const SBLineEntry &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBLineEntry, (const lldb::SBLineEntry &), rhs); + if (rhs.IsValid()) ref() = rhs.ref(); } @@ -32,6 +38,9 @@ } const SBLineEntry &SBLineEntry::operator=(const SBLineEntry &rhs) { + SB_RECORD_METHOD(const lldb::SBLineEntry &, + SBLineEntry, operator=,(const lldb::SBLineEntry &), rhs); + if (this != &rhs) { if (rhs.IsValid()) ref() = rhs.ref(); @@ -48,6 +57,8 @@ SBLineEntry::~SBLineEntry() {} SBAddress SBLineEntry::GetStartAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBLineEntry, GetStartAddress); + SBAddress sb_address; if (m_opaque_ap) sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress()); @@ -68,6 +79,8 @@ } SBAddress SBLineEntry::GetEndAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBLineEntry, GetEndAddress); + SBAddress sb_address; if (m_opaque_ap) { sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress()); @@ -88,10 +101,14 @@ } bool SBLineEntry::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBLineEntry, IsValid); + return m_opaque_ap.get() && m_opaque_ap->IsValid(); } SBFileSpec SBLineEntry::GetFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBLineEntry, GetFileSpec); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFileSpec sb_file_spec; @@ -110,6 +127,8 @@ } uint32_t SBLineEntry::GetLine() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBLineEntry, GetLine); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t line = 0; @@ -124,22 +143,36 @@ } uint32_t SBLineEntry::GetColumn() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBLineEntry, GetColumn); + if (m_opaque_ap) return m_opaque_ap->column; return 0; } void SBLineEntry::SetFileSpec(lldb::SBFileSpec filespec) { + SB_RECORD_METHOD(void, SBLineEntry, SetFileSpec, (lldb::SBFileSpec), + filespec); + if (filespec.IsValid()) ref().file = filespec.ref(); else ref().file.Clear(); } -void SBLineEntry::SetLine(uint32_t line) { ref().line = line; } +void SBLineEntry::SetLine(uint32_t line) { + SB_RECORD_METHOD(void, SBLineEntry, SetLine, (uint32_t), line); + ref().line = line; +} -void SBLineEntry::SetColumn(uint32_t column) { ref().line = column; } +void SBLineEntry::SetColumn(uint32_t column) { + SB_RECORD_METHOD(void, SBLineEntry, SetColumn, (uint32_t), column); + ref().line = column; +} bool SBLineEntry::operator==(const SBLineEntry &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBLineEntry, operator==,(const lldb::SBLineEntry &), rhs); + lldb_private::LineEntry *lhs_ptr = m_opaque_ap.get(); lldb_private::LineEntry *rhs_ptr = rhs.m_opaque_ap.get(); @@ -150,6 +183,9 @@ } bool SBLineEntry::operator!=(const SBLineEntry &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBLineEntry, operator!=,(const lldb::SBLineEntry &), rhs); + lldb_private::LineEntry *lhs_ptr = m_opaque_ap.get(); lldb_private::LineEntry *rhs_ptr = rhs.m_opaque_ap.get(); @@ -172,6 +208,9 @@ const lldb_private::LineEntry &SBLineEntry::ref() const { return *m_opaque_ap; } bool SBLineEntry::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBLineEntry, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ap) { Index: source/API/SBListener.cpp =================================================================== --- source/API/SBListener.cpp +++ source/API/SBListener.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBListener.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBDebugger.h" @@ -20,10 +22,14 @@ using namespace lldb; using namespace lldb_private; -SBListener::SBListener() : m_opaque_sp(), m_unused_ptr(NULL) {} +SBListener::SBListener() : m_opaque_sp(), m_unused_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBListener); +} SBListener::SBListener(const char *name) : m_opaque_sp(Listener::MakeListener(name)), m_unused_ptr(nullptr) { + SB_RECORD_CONSTRUCTOR(SBListener, (const char *), name); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -32,9 +38,14 @@ } SBListener::SBListener(const SBListener &rhs) - : m_opaque_sp(rhs.m_opaque_sp), m_unused_ptr(nullptr) {} + : m_opaque_sp(rhs.m_opaque_sp), m_unused_ptr(nullptr) { + SB_RECORD_CONSTRUCTOR(SBListener, (const lldb::SBListener &), rhs); +} const lldb::SBListener &SBListener::operator=(const lldb::SBListener &rhs) { + SB_RECORD_METHOD(const lldb::SBListener &, + SBListener, operator=,(const lldb::SBListener &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; m_unused_ptr = nullptr; @@ -47,15 +58,22 @@ SBListener::~SBListener() {} -bool SBListener::IsValid() const { return m_opaque_sp != nullptr; } +bool SBListener::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBListener, IsValid); + return m_opaque_sp != nullptr; +} void SBListener::AddEvent(const SBEvent &event) { + SB_RECORD_METHOD(void, SBListener, AddEvent, (const lldb::SBEvent &), event); + EventSP &event_sp = event.GetSP(); if (event_sp) m_opaque_sp->AddEvent(event_sp); } void SBListener::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBListener, Clear); + if (m_opaque_sp) m_opaque_sp->Clear(); } @@ -63,6 +81,10 @@ uint32_t SBListener::StartListeningForEventClass(SBDebugger &debugger, const char *broadcaster_class, uint32_t event_mask) { + SB_RECORD_METHOD(uint32_t, SBListener, StartListeningForEventClass, + (lldb::SBDebugger &, const char *, uint32_t), debugger, + broadcaster_class, event_mask); + if (m_opaque_sp) { Debugger *lldb_debugger = debugger.get(); if (!lldb_debugger) @@ -77,6 +99,10 @@ bool SBListener::StopListeningForEventClass(SBDebugger &debugger, const char *broadcaster_class, uint32_t event_mask) { + SB_RECORD_METHOD(bool, SBListener, StopListeningForEventClass, + (lldb::SBDebugger &, const char *, uint32_t), debugger, + broadcaster_class, event_mask); + if (m_opaque_sp) { Debugger *lldb_debugger = debugger.get(); if (!lldb_debugger) @@ -90,6 +116,10 @@ uint32_t SBListener::StartListeningForEvents(const SBBroadcaster &broadcaster, uint32_t event_mask) { + SB_RECORD_METHOD(uint32_t, SBListener, StartListeningForEvents, + (const lldb::SBBroadcaster &, uint32_t), broadcaster, + event_mask); + uint32_t acquired_event_mask = 0; if (m_opaque_sp && broadcaster.IsValid()) { acquired_event_mask = @@ -131,6 +161,10 @@ bool SBListener::StopListeningForEvents(const SBBroadcaster &broadcaster, uint32_t event_mask) { + SB_RECORD_METHOD(bool, SBListener, StopListeningForEvents, + (const lldb::SBBroadcaster &, uint32_t), broadcaster, + event_mask); + if (m_opaque_sp && broadcaster.IsValid()) { return m_opaque_sp->StopListeningForEvents(broadcaster.get(), event_mask); } @@ -138,6 +172,9 @@ } bool SBListener::WaitForEvent(uint32_t timeout_secs, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, WaitForEvent, (uint32_t, lldb::SBEvent &), + timeout_secs, event); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { if (timeout_secs == UINT32_MAX) { @@ -189,6 +226,10 @@ bool SBListener::WaitForEventForBroadcaster(uint32_t num_seconds, const SBBroadcaster &broadcaster, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, WaitForEventForBroadcaster, + (uint32_t, const lldb::SBBroadcaster &, lldb::SBEvent &), + num_seconds, broadcaster, event); + if (m_opaque_sp && broadcaster.IsValid()) { Timeout timeout(llvm::None); if (num_seconds != UINT32_MAX) @@ -207,6 +248,11 @@ bool SBListener::WaitForEventForBroadcasterWithType( uint32_t num_seconds, const SBBroadcaster &broadcaster, uint32_t event_type_mask, SBEvent &event) { + SB_RECORD_METHOD( + bool, SBListener, WaitForEventForBroadcasterWithType, + (uint32_t, const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &), + num_seconds, broadcaster, event_type_mask, event); + if (m_opaque_sp && broadcaster.IsValid()) { Timeout timeout(llvm::None); if (num_seconds != UINT32_MAX) @@ -223,6 +269,8 @@ } bool SBListener::PeekAtNextEvent(SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, PeekAtNextEvent, (lldb::SBEvent &), event); + if (m_opaque_sp) { event.reset(m_opaque_sp->PeekAtNextEvent()); return event.IsValid(); @@ -233,6 +281,10 @@ bool SBListener::PeekAtNextEventForBroadcaster(const SBBroadcaster &broadcaster, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, PeekAtNextEventForBroadcaster, + (const lldb::SBBroadcaster &, lldb::SBEvent &), broadcaster, + event); + if (m_opaque_sp && broadcaster.IsValid()) { event.reset(m_opaque_sp->PeekAtNextEventForBroadcaster(broadcaster.get())); return event.IsValid(); @@ -244,6 +296,10 @@ bool SBListener::PeekAtNextEventForBroadcasterWithType( const SBBroadcaster &broadcaster, uint32_t event_type_mask, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, PeekAtNextEventForBroadcasterWithType, + (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &), + broadcaster, event_type_mask, event); + if (m_opaque_sp && broadcaster.IsValid()) { event.reset(m_opaque_sp->PeekAtNextEventForBroadcasterWithType( broadcaster.get(), event_type_mask)); @@ -254,6 +310,8 @@ } bool SBListener::GetNextEvent(SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, GetNextEvent, (lldb::SBEvent &), event); + if (m_opaque_sp) { EventSP event_sp; if (m_opaque_sp->GetEvent(event_sp, std::chrono::seconds(0))) { @@ -267,6 +325,10 @@ bool SBListener::GetNextEventForBroadcaster(const SBBroadcaster &broadcaster, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, GetNextEventForBroadcaster, + (const lldb::SBBroadcaster &, lldb::SBEvent &), broadcaster, + event); + if (m_opaque_sp && broadcaster.IsValid()) { EventSP event_sp; if (m_opaque_sp->GetEventForBroadcaster(broadcaster.get(), event_sp, @@ -282,6 +344,10 @@ bool SBListener::GetNextEventForBroadcasterWithType( const SBBroadcaster &broadcaster, uint32_t event_type_mask, SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, GetNextEventForBroadcasterWithType, + (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &), + broadcaster, event_type_mask, event); + if (m_opaque_sp && broadcaster.IsValid()) { EventSP event_sp; if (m_opaque_sp->GetEventForBroadcasterWithType(broadcaster.get(), @@ -296,6 +362,9 @@ } bool SBListener::HandleBroadcastEvent(const SBEvent &event) { + SB_RECORD_METHOD(bool, SBListener, HandleBroadcastEvent, + (const lldb::SBEvent &), event); + if (m_opaque_sp) return m_opaque_sp->HandleBroadcastEvent(event.GetSP()); return false; Index: source/API/SBMemoryRegionInfo.cpp =================================================================== --- source/API/SBMemoryRegionInfo.cpp +++ source/API/SBMemoryRegionInfo.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBDefines.h" #include "lldb/API/SBError.h" @@ -16,8 +18,9 @@ using namespace lldb; using namespace lldb_private; -SBMemoryRegionInfo::SBMemoryRegionInfo() - : m_opaque_ap(new MemoryRegionInfo()) {} +SBMemoryRegionInfo::SBMemoryRegionInfo() : m_opaque_ap(new MemoryRegionInfo()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBMemoryRegionInfo); +} SBMemoryRegionInfo::SBMemoryRegionInfo(const MemoryRegionInfo *lldb_object_ptr) : m_opaque_ap(new MemoryRegionInfo()) { @@ -27,11 +30,18 @@ SBMemoryRegionInfo::SBMemoryRegionInfo(const SBMemoryRegionInfo &rhs) : m_opaque_ap(new MemoryRegionInfo()) { + SB_RECORD_CONSTRUCTOR(SBMemoryRegionInfo, (const lldb::SBMemoryRegionInfo &), + rhs); + ref() = rhs.ref(); } const SBMemoryRegionInfo &SBMemoryRegionInfo:: operator=(const SBMemoryRegionInfo &rhs) { + SB_RECORD_METHOD( + const lldb::SBMemoryRegionInfo &, + SBMemoryRegionInfo, operator=,(const lldb::SBMemoryRegionInfo &), rhs); + if (this != &rhs) { ref() = rhs.ref(); } @@ -40,13 +50,24 @@ SBMemoryRegionInfo::~SBMemoryRegionInfo() {} -void SBMemoryRegionInfo::Clear() { m_opaque_ap->Clear(); } +void SBMemoryRegionInfo::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBMemoryRegionInfo, Clear); + m_opaque_ap->Clear(); +} bool SBMemoryRegionInfo::operator==(const SBMemoryRegionInfo &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBMemoryRegionInfo, operator==,(const lldb::SBMemoryRegionInfo &), + rhs); + return ref() == rhs.ref(); } bool SBMemoryRegionInfo::operator!=(const SBMemoryRegionInfo &rhs) const { + SB_RECORD_METHOD_CONST( + bool, SBMemoryRegionInfo, operator!=,(const lldb::SBMemoryRegionInfo &), + rhs); + return ref() != rhs.ref(); } @@ -55,34 +76,51 @@ const MemoryRegionInfo &SBMemoryRegionInfo::ref() const { return *m_opaque_ap; } lldb::addr_t SBMemoryRegionInfo::GetRegionBase() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBMemoryRegionInfo, GetRegionBase); + return m_opaque_ap->GetRange().GetRangeBase(); } lldb::addr_t SBMemoryRegionInfo::GetRegionEnd() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBMemoryRegionInfo, GetRegionEnd); + return m_opaque_ap->GetRange().GetRangeEnd(); } bool SBMemoryRegionInfo::IsReadable() { + SB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, IsReadable); + return m_opaque_ap->GetReadable() == MemoryRegionInfo::eYes; } bool SBMemoryRegionInfo::IsWritable() { + SB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, IsWritable); + return m_opaque_ap->GetWritable() == MemoryRegionInfo::eYes; } bool SBMemoryRegionInfo::IsExecutable() { + SB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, IsExecutable); + return m_opaque_ap->GetExecutable() == MemoryRegionInfo::eYes; } bool SBMemoryRegionInfo::IsMapped() { + SB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, IsMapped); + return m_opaque_ap->GetMapped() == MemoryRegionInfo::eYes; } const char *SBMemoryRegionInfo::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBMemoryRegionInfo, GetName); + return m_opaque_ap->GetName().AsCString(); } bool SBMemoryRegionInfo::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBMemoryRegionInfo, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); const addr_t load_addr = m_opaque_ap->GetRange().base; Index: source/API/SBMemoryRegionInfoList.cpp =================================================================== --- source/API/SBMemoryRegionInfoList.cpp +++ source/API/SBMemoryRegionInfoList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBMemoryRegionInfoList.h" #include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBStream.h" @@ -73,16 +75,26 @@ } SBMemoryRegionInfoList::SBMemoryRegionInfoList() - : m_opaque_ap(new MemoryRegionInfoListImpl()) {} + : m_opaque_ap(new MemoryRegionInfoListImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBMemoryRegionInfoList); +} SBMemoryRegionInfoList::SBMemoryRegionInfoList( const SBMemoryRegionInfoList &rhs) - : m_opaque_ap(new MemoryRegionInfoListImpl(*rhs.m_opaque_ap)) {} + : m_opaque_ap(new MemoryRegionInfoListImpl(*rhs.m_opaque_ap)) { + SB_RECORD_CONSTRUCTOR(SBMemoryRegionInfoList, + (const lldb::SBMemoryRegionInfoList &), rhs); +} SBMemoryRegionInfoList::~SBMemoryRegionInfoList() {} const SBMemoryRegionInfoList &SBMemoryRegionInfoList:: operator=(const SBMemoryRegionInfoList &rhs) { + SB_RECORD_METHOD( + const lldb::SBMemoryRegionInfoList &, + SBMemoryRegionInfoList, operator=,(const lldb::SBMemoryRegionInfoList &), + rhs); + if (this != &rhs) { *m_opaque_ap = *rhs.m_opaque_ap; } @@ -90,11 +102,16 @@ } uint32_t SBMemoryRegionInfoList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBMemoryRegionInfoList, GetSize); + return m_opaque_ap->GetSize(); } bool SBMemoryRegionInfoList::GetMemoryRegionAtIndex( uint32_t idx, SBMemoryRegionInfo ®ion_info) { + SB_RECORD_METHOD(bool, SBMemoryRegionInfoList, GetMemoryRegionAtIndex, + (uint32_t, lldb::SBMemoryRegionInfo &), idx, region_info); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = m_opaque_ap->GetMemoryRegionInfoAtIndex(idx, region_info.ref()); @@ -112,13 +129,22 @@ return result; } -void SBMemoryRegionInfoList::Clear() { m_opaque_ap->Clear(); } +void SBMemoryRegionInfoList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBMemoryRegionInfoList, Clear); + m_opaque_ap->Clear(); +} void SBMemoryRegionInfoList::Append(SBMemoryRegionInfo &sb_region) { + SB_RECORD_METHOD(void, SBMemoryRegionInfoList, Append, + (lldb::SBMemoryRegionInfo &), sb_region); + m_opaque_ap->Append(sb_region.ref()); } void SBMemoryRegionInfoList::Append(SBMemoryRegionInfoList &sb_region_list) { + SB_RECORD_METHOD(void, SBMemoryRegionInfoList, Append, + (lldb::SBMemoryRegionInfoList &), sb_region_list); + m_opaque_ap->Append(*sb_region_list); } Index: source/API/SBModule.cpp =================================================================== --- source/API/SBModule.cpp +++ source/API/SBModule.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBModule.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBFileSpec.h" @@ -30,11 +32,15 @@ using namespace lldb; using namespace lldb_private; -SBModule::SBModule() : m_opaque_sp() {} +SBModule::SBModule() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBModule); +} SBModule::SBModule(const lldb::ModuleSP &module_sp) : m_opaque_sp(module_sp) {} SBModule::SBModule(const SBModuleSpec &module_spec) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBModule, (const lldb::SBModuleSpec &), module_spec); + ModuleSP module_sp; Status error = ModuleList::GetSharedModule(*module_spec.m_opaque_ap, module_sp, NULL, NULL, NULL); @@ -42,10 +48,15 @@ SetSP(module_sp); } -SBModule::SBModule(const SBModule &rhs) : m_opaque_sp(rhs.m_opaque_sp) {} +SBModule::SBModule(const SBModule &rhs) : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBModule, (const lldb::SBModule &), rhs); +} SBModule::SBModule(lldb::SBProcess &process, lldb::addr_t header_addr) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBModule, (lldb::SBProcess &, lldb::addr_t), process, + header_addr); + ProcessSP process_sp(process.GetSP()); if (process_sp) { m_opaque_sp = process_sp->ReadModuleFromMemory(FileSpec(), header_addr); @@ -59,6 +70,9 @@ } const SBModule &SBModule::operator=(const SBModule &rhs) { + SB_RECORD_METHOD(const lldb::SBModule &, + SBModule, operator=,(const lldb::SBModule &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -66,11 +80,19 @@ SBModule::~SBModule() {} -bool SBModule::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBModule::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModule, IsValid); + return m_opaque_sp.get() != NULL; +} -void SBModule::Clear() { m_opaque_sp.reset(); } +void SBModule::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBModule, Clear); + m_opaque_sp.reset(); +} SBFileSpec SBModule::GetFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule, GetFileSpec); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFileSpec file_spec; @@ -87,6 +109,9 @@ } lldb::SBFileSpec SBModule::GetPlatformFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule, + GetPlatformFileSpec); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFileSpec file_spec; @@ -103,6 +128,9 @@ } bool SBModule::SetPlatformFileSpec(const lldb::SBFileSpec &platform_file) { + SB_RECORD_METHOD(bool, SBModule, SetPlatformFileSpec, + (const lldb::SBFileSpec &), platform_file); + bool result = false; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -121,6 +149,9 @@ } lldb::SBFileSpec SBModule::GetRemoteInstallFileSpec() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModule, + GetRemoteInstallFileSpec); + SBFileSpec sb_file_spec; ModuleSP module_sp(GetSP()); if (module_sp) @@ -129,6 +160,9 @@ } bool SBModule::SetRemoteInstallFileSpec(lldb::SBFileSpec &file) { + SB_RECORD_METHOD(bool, SBModule, SetRemoteInstallFileSpec, + (lldb::SBFileSpec &), file); + ModuleSP module_sp(GetSP()); if (module_sp) { module_sp->SetRemoteInstallFileSpec(file.ref()); @@ -138,6 +172,8 @@ } const uint8_t *SBModule::GetUUIDBytes() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const uint8_t *, SBModule, GetUUIDBytes); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const uint8_t *uuid_bytes = NULL; @@ -159,6 +195,8 @@ } const char *SBModule::GetUUIDString() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBModule, GetUUIDString); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *uuid_cstr = NULL; @@ -185,12 +223,18 @@ } bool SBModule::operator==(const SBModule &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBModule, operator==,(const lldb::SBModule &), + rhs); + if (m_opaque_sp) return m_opaque_sp.get() == rhs.m_opaque_sp.get(); return false; } bool SBModule::operator!=(const SBModule &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBModule, operator!=,(const lldb::SBModule &), + rhs); + if (m_opaque_sp) return m_opaque_sp.get() != rhs.m_opaque_sp.get(); return false; @@ -201,6 +245,9 @@ void SBModule::SetSP(const ModuleSP &module_sp) { m_opaque_sp = module_sp; } SBAddress SBModule::ResolveFileAddress(lldb::addr_t vm_addr) { + SB_RECORD_METHOD(lldb::SBAddress, SBModule, ResolveFileAddress, + (lldb::addr_t), vm_addr); + lldb::SBAddress sb_addr; ModuleSP module_sp(GetSP()); if (module_sp) { @@ -214,6 +261,10 @@ SBSymbolContext SBModule::ResolveSymbolContextForAddress(const SBAddress &addr, uint32_t resolve_scope) { + SB_RECORD_METHOD(lldb::SBSymbolContext, SBModule, + ResolveSymbolContextForAddress, + (const lldb::SBAddress &, uint32_t), addr, resolve_scope); + SBSymbolContext sb_sc; ModuleSP module_sp(GetSP()); SymbolContextItem scope = static_cast(resolve_scope); @@ -223,6 +274,9 @@ } bool SBModule::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBModule, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); ModuleSP module_sp(GetSP()); @@ -235,6 +289,8 @@ } uint32_t SBModule::GetNumCompileUnits() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBModule, GetNumCompileUnits); + ModuleSP module_sp(GetSP()); if (module_sp) { return module_sp->GetNumCompileUnits(); @@ -243,6 +299,9 @@ } SBCompileUnit SBModule::GetCompileUnitAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBCompileUnit, SBModule, GetCompileUnitAtIndex, + (uint32_t), index); + SBCompileUnit sb_cu; ModuleSP module_sp(GetSP()); if (module_sp) { @@ -252,8 +311,10 @@ return sb_cu; } -SBSymbolContextList -SBModule::FindCompileUnits(const SBFileSpec &sb_file_spec) { +SBSymbolContextList SBModule::FindCompileUnits(const SBFileSpec &sb_file_spec) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBModule, FindCompileUnits, + (const lldb::SBFileSpec &), sb_file_spec); + SBSymbolContextList sb_sc_list; const ModuleSP module_sp(GetSP()); if (sb_file_spec.IsValid() && module_sp) { @@ -273,6 +334,8 @@ } size_t SBModule::GetNumSymbols() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBModule, GetNumSymbols); + ModuleSP module_sp(GetSP()); if (module_sp) { Symtab *symtab = GetUnifiedSymbolTable(module_sp); @@ -283,6 +346,8 @@ } SBSymbol SBModule::GetSymbolAtIndex(size_t idx) { + SB_RECORD_METHOD(lldb::SBSymbol, SBModule, GetSymbolAtIndex, (size_t), idx); + SBSymbol sb_symbol; ModuleSP module_sp(GetSP()); Symtab *symtab = GetUnifiedSymbolTable(module_sp); @@ -293,6 +358,9 @@ lldb::SBSymbol SBModule::FindSymbol(const char *name, lldb::SymbolType symbol_type) { + SB_RECORD_METHOD(lldb::SBSymbol, SBModule, FindSymbol, + (const char *, lldb::SymbolType), name, symbol_type); + SBSymbol sb_symbol; if (name && name[0]) { ModuleSP module_sp(GetSP()); @@ -307,6 +375,9 @@ lldb::SBSymbolContextList SBModule::FindSymbols(const char *name, lldb::SymbolType symbol_type) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBModule, FindSymbols, + (const char *, lldb::SymbolType), name, symbol_type); + SBSymbolContextList sb_sc_list; if (name && name[0]) { ModuleSP module_sp(GetSP()); @@ -331,6 +402,8 @@ } size_t SBModule::GetNumSections() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBModule, GetNumSections); + ModuleSP module_sp(GetSP()); if (module_sp) { // Give the symbol vendor a chance to add to the unified section list. @@ -343,6 +416,8 @@ } SBSection SBModule::GetSectionAtIndex(size_t idx) { + SB_RECORD_METHOD(lldb::SBSection, SBModule, GetSectionAtIndex, (size_t), idx); + SBSection sb_section; ModuleSP module_sp(GetSP()); if (module_sp) { @@ -358,6 +433,9 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name, uint32_t name_type_mask) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBModule, FindFunctions, + (const char *, uint32_t), name, name_type_mask); + lldb::SBSymbolContextList sb_sc_list; ModuleSP module_sp(GetSP()); if (name && module_sp) { @@ -373,6 +451,10 @@ SBValueList SBModule::FindGlobalVariables(SBTarget &target, const char *name, uint32_t max_matches) { + SB_RECORD_METHOD(lldb::SBValueList, SBModule, FindGlobalVariables, + (lldb::SBTarget &, const char *, uint32_t), target, name, + max_matches); + SBValueList sb_value_list; ModuleSP module_sp(GetSP()); if (name && module_sp) { @@ -397,6 +479,9 @@ lldb::SBValue SBModule::FindFirstGlobalVariable(lldb::SBTarget &target, const char *name) { + SB_RECORD_METHOD(lldb::SBValue, SBModule, FindFirstGlobalVariable, + (lldb::SBTarget &, const char *), target, name); + SBValueList sb_value_list(FindGlobalVariables(target, name, 1)); if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0) return sb_value_list.GetValueAtIndex(0); @@ -404,6 +489,9 @@ } lldb::SBType SBModule::FindFirstType(const char *name_cstr) { + SB_RECORD_METHOD(lldb::SBType, SBModule, FindFirstType, (const char *), + name_cstr); + SBType sb_type; ModuleSP module_sp(GetSP()); if (name_cstr && module_sp) { @@ -424,6 +512,9 @@ } lldb::SBType SBModule::GetBasicType(lldb::BasicType type) { + SB_RECORD_METHOD(lldb::SBType, SBModule, GetBasicType, (lldb::BasicType), + type); + ModuleSP module_sp(GetSP()); if (module_sp) { TypeSystem *type_system = @@ -435,6 +526,8 @@ } lldb::SBTypeList SBModule::FindTypes(const char *type) { + SB_RECORD_METHOD(lldb::SBTypeList, SBModule, FindTypes, (const char *), type); + SBTypeList retval; ModuleSP module_sp(GetSP()); @@ -467,6 +560,8 @@ } lldb::SBType SBModule::GetTypeByID(lldb::user_id_t uid) { + SB_RECORD_METHOD(lldb::SBType, SBModule, GetTypeByID, (lldb::user_id_t), uid); + ModuleSP module_sp(GetSP()); if (module_sp) { SymbolVendor *vendor = module_sp->GetSymbolVendor(); @@ -480,6 +575,8 @@ } lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) { + SB_RECORD_METHOD(lldb::SBTypeList, SBModule, GetTypes, (uint32_t), type_mask); + SBTypeList sb_type_list; ModuleSP module_sp(GetSP()); @@ -497,6 +594,9 @@ } SBSection SBModule::FindSection(const char *sect_name) { + SB_RECORD_METHOD(lldb::SBSection, SBModule, FindSection, (const char *), + sect_name); + SBSection sb_section; ModuleSP module_sp(GetSP()); @@ -516,6 +616,8 @@ } lldb::ByteOrder SBModule::GetByteOrder() { + SB_RECORD_METHOD_NO_ARGS(lldb::ByteOrder, SBModule, GetByteOrder); + ModuleSP module_sp(GetSP()); if (module_sp) return module_sp->GetArchitecture().GetByteOrder(); @@ -523,6 +625,8 @@ } const char *SBModule::GetTriple() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBModule, GetTriple); + ModuleSP module_sp(GetSP()); if (module_sp) { std::string triple(module_sp->GetArchitecture().GetTriple().str()); @@ -536,6 +640,8 @@ } uint32_t SBModule::GetAddressByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBModule, GetAddressByteSize); + ModuleSP module_sp(GetSP()); if (module_sp) return module_sp->GetArchitecture().GetAddressByteSize(); @@ -543,6 +649,9 @@ } uint32_t SBModule::GetVersion(uint32_t *versions, uint32_t num_versions) { + SB_RECORD_METHOD(uint32_t, SBModule, GetVersion, (uint32_t *, uint32_t), + versions, num_versions); + llvm::VersionTuple version; if (ModuleSP module_sp = GetSP()) version = module_sp->GetVersion(); @@ -569,6 +678,8 @@ } lldb::SBFileSpec SBModule::GetSymbolFileSpec() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule, GetSymbolFileSpec); + lldb::SBFileSpec sb_file_spec; ModuleSP module_sp(GetSP()); if (module_sp) { @@ -580,6 +691,9 @@ } lldb::SBAddress SBModule::GetObjectFileHeaderAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBModule, + GetObjectFileHeaderAddress); + lldb::SBAddress sb_addr; ModuleSP module_sp(GetSP()); if (module_sp) { @@ -591,6 +705,9 @@ } lldb::SBAddress SBModule::GetObjectFileEntryPointAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBModule, + GetObjectFileEntryPointAddress); + lldb::SBAddress sb_addr; ModuleSP module_sp(GetSP()); if (module_sp) { Index: source/API/SBModuleSpec.cpp =================================================================== --- source/API/SBModuleSpec.cpp +++ source/API/SBModuleSpec.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Module.h" @@ -17,12 +19,19 @@ using namespace lldb; using namespace lldb_private; -SBModuleSpec::SBModuleSpec() : m_opaque_ap(new lldb_private::ModuleSpec()) {} +SBModuleSpec::SBModuleSpec() : m_opaque_ap(new lldb_private::ModuleSpec()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBModuleSpec); +} SBModuleSpec::SBModuleSpec(const SBModuleSpec &rhs) - : m_opaque_ap(new lldb_private::ModuleSpec(*rhs.m_opaque_ap)) {} + : m_opaque_ap(new lldb_private::ModuleSpec(*rhs.m_opaque_ap)) { + SB_RECORD_CONSTRUCTOR(SBModuleSpec, (const lldb::SBModuleSpec &), rhs); +} const SBModuleSpec &SBModuleSpec::operator=(const SBModuleSpec &rhs) { + SB_RECORD_METHOD(const lldb::SBModuleSpec &, + SBModuleSpec, operator=,(const lldb::SBModuleSpec &), rhs); + if (this != &rhs) *m_opaque_ap = *(rhs.m_opaque_ap); return *this; @@ -30,44 +39,71 @@ SBModuleSpec::~SBModuleSpec() {} -bool SBModuleSpec::IsValid() const { return m_opaque_ap->operator bool(); } +bool SBModuleSpec::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModuleSpec, IsValid); + return m_opaque_ap->operator bool(); +} -void SBModuleSpec::Clear() { m_opaque_ap->Clear(); } +void SBModuleSpec::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBModuleSpec, Clear); + m_opaque_ap->Clear(); +} SBFileSpec SBModuleSpec::GetFileSpec() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec, GetFileSpec); + SBFileSpec sb_spec(m_opaque_ap->GetFileSpec()); return sb_spec; } void SBModuleSpec::SetFileSpec(const lldb::SBFileSpec &sb_spec) { + SB_RECORD_METHOD(void, SBModuleSpec, SetFileSpec, (const lldb::SBFileSpec &), + sb_spec); + m_opaque_ap->GetFileSpec() = *sb_spec; } lldb::SBFileSpec SBModuleSpec::GetPlatformFileSpec() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec, GetPlatformFileSpec); + return SBFileSpec(m_opaque_ap->GetPlatformFileSpec()); } void SBModuleSpec::SetPlatformFileSpec(const lldb::SBFileSpec &sb_spec) { + SB_RECORD_METHOD(void, SBModuleSpec, SetPlatformFileSpec, + (const lldb::SBFileSpec &), sb_spec); + m_opaque_ap->GetPlatformFileSpec() = *sb_spec; } lldb::SBFileSpec SBModuleSpec::GetSymbolFileSpec() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec, GetSymbolFileSpec); + return SBFileSpec(m_opaque_ap->GetSymbolFileSpec()); } void SBModuleSpec::SetSymbolFileSpec(const lldb::SBFileSpec &sb_spec) { + SB_RECORD_METHOD(void, SBModuleSpec, SetSymbolFileSpec, + (const lldb::SBFileSpec &), sb_spec); + m_opaque_ap->GetSymbolFileSpec() = *sb_spec; } const char *SBModuleSpec::GetObjectName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBModuleSpec, GetObjectName); + return m_opaque_ap->GetObjectName().GetCString(); } void SBModuleSpec::SetObjectName(const char *name) { + SB_RECORD_METHOD(void, SBModuleSpec, SetObjectName, (const char *), name); + m_opaque_ap->GetObjectName().SetCString(name); } const char *SBModuleSpec::GetTriple() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBModuleSpec, GetTriple); + std::string triple(m_opaque_ap->GetArchitecture().GetTriple().str()); // Unique the string so we don't run into ownership issues since the const // strings put the string into the string pool once and the strings never @@ -77,33 +113,54 @@ } void SBModuleSpec::SetTriple(const char *triple) { + SB_RECORD_METHOD(void, SBModuleSpec, SetTriple, (const char *), triple); + m_opaque_ap->GetArchitecture().SetTriple(triple); } const uint8_t *SBModuleSpec::GetUUIDBytes() { + SB_RECORD_METHOD_NO_ARGS(const uint8_t *, SBModuleSpec, GetUUIDBytes); + return m_opaque_ap->GetUUID().GetBytes().data(); } size_t SBModuleSpec::GetUUIDLength() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBModuleSpec, GetUUIDLength); + return m_opaque_ap->GetUUID().GetBytes().size(); } bool SBModuleSpec::SetUUIDBytes(const uint8_t *uuid, size_t uuid_len) { + SB_RECORD_METHOD(bool, SBModuleSpec, SetUUIDBytes, (const uint8_t *, size_t), + uuid, uuid_len); + m_opaque_ap->GetUUID() = UUID::fromOptionalData(uuid, uuid_len); return m_opaque_ap->GetUUID().IsValid(); } bool SBModuleSpec::GetDescription(lldb::SBStream &description) { + SB_RECORD_METHOD(bool, SBModuleSpec, GetDescription, (lldb::SBStream &), + description); + m_opaque_ap->Dump(description.ref()); return true; } -SBModuleSpecList::SBModuleSpecList() : m_opaque_ap(new ModuleSpecList()) {} +SBModuleSpecList::SBModuleSpecList() : m_opaque_ap(new ModuleSpecList()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBModuleSpecList); +} SBModuleSpecList::SBModuleSpecList(const SBModuleSpecList &rhs) - : m_opaque_ap(new ModuleSpecList(*rhs.m_opaque_ap)) {} + : m_opaque_ap(new ModuleSpecList(*rhs.m_opaque_ap)) { + SB_RECORD_CONSTRUCTOR(SBModuleSpecList, (const lldb::SBModuleSpecList &), + rhs); +} SBModuleSpecList &SBModuleSpecList::operator=(const SBModuleSpecList &rhs) { + SB_RECORD_METHOD(lldb::SBModuleSpecList &, + SBModuleSpecList, operator=,(const lldb::SBModuleSpecList &), + rhs); + if (this != &rhs) *m_opaque_ap = *rhs.m_opaque_ap; return *this; @@ -112,6 +169,9 @@ SBModuleSpecList::~SBModuleSpecList() {} SBModuleSpecList SBModuleSpecList::GetModuleSpecifications(const char *path) { + SB_RECORD_STATIC_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, + GetModuleSpecifications, (const char *), path); + SBModuleSpecList specs; FileSpec file_spec(path); FileSystem::Instance().Resolve(file_spec); @@ -121,16 +181,28 @@ } void SBModuleSpecList::Append(const SBModuleSpec &spec) { + SB_RECORD_METHOD(void, SBModuleSpecList, Append, (const lldb::SBModuleSpec &), + spec); + m_opaque_ap->Append(*spec.m_opaque_ap); } void SBModuleSpecList::Append(const SBModuleSpecList &spec_list) { + SB_RECORD_METHOD(void, SBModuleSpecList, Append, + (const lldb::SBModuleSpecList &), spec_list); + m_opaque_ap->Append(*spec_list.m_opaque_ap); } -size_t SBModuleSpecList::GetSize() { return m_opaque_ap->GetSize(); } +size_t SBModuleSpecList::GetSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBModuleSpecList, GetSize); + return m_opaque_ap->GetSize(); +} SBModuleSpec SBModuleSpecList::GetSpecAtIndex(size_t i) { + SB_RECORD_METHOD(lldb::SBModuleSpec, SBModuleSpecList, GetSpecAtIndex, + (size_t), i); + SBModuleSpec sb_module_spec; m_opaque_ap->GetModuleSpecAtIndex(i, *sb_module_spec.m_opaque_ap); return sb_module_spec; @@ -138,6 +210,9 @@ SBModuleSpec SBModuleSpecList::FindFirstMatchingSpec(const SBModuleSpec &match_spec) { + SB_RECORD_METHOD(lldb::SBModuleSpec, SBModuleSpecList, FindFirstMatchingSpec, + (const lldb::SBModuleSpec &), match_spec); + SBModuleSpec sb_module_spec; m_opaque_ap->FindMatchingModuleSpec(*match_spec.m_opaque_ap, *sb_module_spec.m_opaque_ap); @@ -146,6 +221,9 @@ SBModuleSpecList SBModuleSpecList::FindMatchingSpecs(const SBModuleSpec &match_spec) { + SB_RECORD_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, FindMatchingSpecs, + (const lldb::SBModuleSpec &), match_spec); + SBModuleSpecList specs; m_opaque_ap->FindMatchingModuleSpecs(*match_spec.m_opaque_ap, *specs.m_opaque_ap); @@ -153,6 +231,9 @@ } bool SBModuleSpecList::GetDescription(lldb::SBStream &description) { + SB_RECORD_METHOD(bool, SBModuleSpecList, GetDescription, (lldb::SBStream &), + description); + m_opaque_ap->Dump(description.ref()); return true; } Index: source/API/SBPlatform.cpp =================================================================== --- source/API/SBPlatform.cpp +++ source/API/SBPlatform.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBPlatform.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFileSpec.h" @@ -70,27 +72,42 @@ // SBPlatformConnectOptions //---------------------------------------------------------------------- SBPlatformConnectOptions::SBPlatformConnectOptions(const char *url) - : m_opaque_ptr(new PlatformConnectOptions(url)) {} + : m_opaque_ptr(new PlatformConnectOptions(url)) { + SB_RECORD_CONSTRUCTOR(SBPlatformConnectOptions, (const char *), url); +} SBPlatformConnectOptions::SBPlatformConnectOptions( const SBPlatformConnectOptions &rhs) : m_opaque_ptr(new PlatformConnectOptions()) { + SB_RECORD_CONSTRUCTOR(SBPlatformConnectOptions, + (const lldb::SBPlatformConnectOptions &), rhs); + *m_opaque_ptr = *rhs.m_opaque_ptr; } SBPlatformConnectOptions::~SBPlatformConnectOptions() { delete m_opaque_ptr; } void SBPlatformConnectOptions::operator=(const SBPlatformConnectOptions &rhs) { + SB_RECORD_METHOD( + void, + SBPlatformConnectOptions, operator=,( + const lldb::SBPlatformConnectOptions &), + rhs); + *m_opaque_ptr = *rhs.m_opaque_ptr; } const char *SBPlatformConnectOptions::GetURL() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatformConnectOptions, GetURL); + if (m_opaque_ptr->m_url.empty()) return NULL; return m_opaque_ptr->m_url.c_str(); } void SBPlatformConnectOptions::SetURL(const char *url) { + SB_RECORD_METHOD(void, SBPlatformConnectOptions, SetURL, (const char *), url); + if (url && url[0]) m_opaque_ptr->m_url = url; else @@ -98,12 +115,18 @@ } bool SBPlatformConnectOptions::GetRsyncEnabled() { + SB_RECORD_METHOD_NO_ARGS(bool, SBPlatformConnectOptions, GetRsyncEnabled); + return m_opaque_ptr->m_rsync_enabled; } void SBPlatformConnectOptions::EnableRsync( const char *options, const char *remote_path_prefix, bool omit_hostname_from_remote_path) { + SB_RECORD_METHOD(void, SBPlatformConnectOptions, EnableRsync, + (const char *, const char *, bool), options, + remote_path_prefix, omit_hostname_from_remote_path); + m_opaque_ptr->m_rsync_enabled = true; m_opaque_ptr->m_rsync_omit_hostname_from_remote_path = omit_hostname_from_remote_path; @@ -119,14 +142,22 @@ } void SBPlatformConnectOptions::DisableRsync() { + SB_RECORD_METHOD_NO_ARGS(void, SBPlatformConnectOptions, DisableRsync); + m_opaque_ptr->m_rsync_enabled = false; } const char *SBPlatformConnectOptions::GetLocalCacheDirectory() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatformConnectOptions, + GetLocalCacheDirectory); + return m_opaque_ptr->m_local_cache_directory.GetCString(); } void SBPlatformConnectOptions::SetLocalCacheDirectory(const char *path) { + SB_RECORD_METHOD(void, SBPlatformConnectOptions, SetLocalCacheDirectory, + (const char *), path); + if (path && path[0]) m_opaque_ptr->m_local_cache_directory.SetCString(path); else @@ -137,29 +168,41 @@ // SBPlatformShellCommand //---------------------------------------------------------------------- SBPlatformShellCommand::SBPlatformShellCommand(const char *shell_command) - : m_opaque_ptr(new PlatformShellCommand(shell_command)) {} + : m_opaque_ptr(new PlatformShellCommand(shell_command)) { + SB_RECORD_CONSTRUCTOR(SBPlatformShellCommand, (const char *), shell_command); +} SBPlatformShellCommand::SBPlatformShellCommand( const SBPlatformShellCommand &rhs) : m_opaque_ptr(new PlatformShellCommand()) { + SB_RECORD_CONSTRUCTOR(SBPlatformShellCommand, + (const lldb::SBPlatformShellCommand &), rhs); + *m_opaque_ptr = *rhs.m_opaque_ptr; } SBPlatformShellCommand::~SBPlatformShellCommand() { delete m_opaque_ptr; } void SBPlatformShellCommand::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBPlatformShellCommand, Clear); + m_opaque_ptr->m_output = std::string(); m_opaque_ptr->m_status = 0; m_opaque_ptr->m_signo = 0; } const char *SBPlatformShellCommand::GetCommand() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatformShellCommand, GetCommand); + if (m_opaque_ptr->m_command.empty()) return NULL; return m_opaque_ptr->m_command.c_str(); } void SBPlatformShellCommand::SetCommand(const char *shell_command) { + SB_RECORD_METHOD(void, SBPlatformShellCommand, SetCommand, (const char *), + shell_command); + if (shell_command && shell_command[0]) m_opaque_ptr->m_command = shell_command; else @@ -167,12 +210,18 @@ } const char *SBPlatformShellCommand::GetWorkingDirectory() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatformShellCommand, + GetWorkingDirectory); + if (m_opaque_ptr->m_working_dir.empty()) return NULL; return m_opaque_ptr->m_working_dir.c_str(); } void SBPlatformShellCommand::SetWorkingDirectory(const char *path) { + SB_RECORD_METHOD(void, SBPlatformShellCommand, SetWorkingDirectory, + (const char *), path); + if (path && path[0]) m_opaque_ptr->m_working_dir = path; else @@ -180,23 +229,36 @@ } uint32_t SBPlatformShellCommand::GetTimeoutSeconds() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBPlatformShellCommand, GetTimeoutSeconds); + if (m_opaque_ptr->m_timeout) return m_opaque_ptr->m_timeout->count(); return UINT32_MAX; } void SBPlatformShellCommand::SetTimeoutSeconds(uint32_t sec) { + SB_RECORD_METHOD(void, SBPlatformShellCommand, SetTimeoutSeconds, (uint32_t), + sec); + if (sec == UINT32_MAX) m_opaque_ptr->m_timeout = llvm::None; else m_opaque_ptr->m_timeout = std::chrono::seconds(sec); } -int SBPlatformShellCommand::GetSignal() { return m_opaque_ptr->m_signo; } +int SBPlatformShellCommand::GetSignal() { + SB_RECORD_METHOD_NO_ARGS(int, SBPlatformShellCommand, GetSignal); + return m_opaque_ptr->m_signo; +} -int SBPlatformShellCommand::GetStatus() { return m_opaque_ptr->m_status; } +int SBPlatformShellCommand::GetStatus() { + SB_RECORD_METHOD_NO_ARGS(int, SBPlatformShellCommand, GetStatus); + return m_opaque_ptr->m_status; +} const char *SBPlatformShellCommand::GetOutput() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatformShellCommand, GetOutput); + if (m_opaque_ptr->m_output.empty()) return NULL; return m_opaque_ptr->m_output.c_str(); @@ -205,9 +267,13 @@ //---------------------------------------------------------------------- // SBPlatform //---------------------------------------------------------------------- -SBPlatform::SBPlatform() : m_opaque_sp() {} +SBPlatform::SBPlatform() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBPlatform); +} SBPlatform::SBPlatform(const char *platform_name) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBPlatform, (const char *), platform_name); + Status error; if (platform_name && platform_name[0]) m_opaque_sp = Platform::Create(ConstString(platform_name), error); @@ -215,11 +281,19 @@ SBPlatform::~SBPlatform() {} -bool SBPlatform::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBPlatform::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBPlatform, IsValid); + return m_opaque_sp.get() != NULL; +} -void SBPlatform::Clear() { m_opaque_sp.reset(); } +void SBPlatform::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBPlatform, Clear); + m_opaque_sp.reset(); +} const char *SBPlatform::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetName); + PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetName().GetCString(); @@ -233,6 +307,8 @@ } const char *SBPlatform::GetWorkingDirectory() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetWorkingDirectory); + PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetWorkingDirectory().GetCString(); @@ -240,6 +316,8 @@ } bool SBPlatform::SetWorkingDirectory(const char *path) { + SB_RECORD_METHOD(bool, SBPlatform, SetWorkingDirectory, (const char *), path); + PlatformSP platform_sp(GetSP()); if (platform_sp) { if (path) @@ -252,6 +330,9 @@ } SBError SBPlatform::ConnectRemote(SBPlatformConnectOptions &connect_options) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, ConnectRemote, + (lldb::SBPlatformConnectOptions &), connect_options); + SBError sb_error; PlatformSP platform_sp(GetSP()); if (platform_sp && connect_options.GetURL()) { @@ -266,12 +347,16 @@ } void SBPlatform::DisconnectRemote() { + SB_RECORD_METHOD_NO_ARGS(void, SBPlatform, DisconnectRemote); + PlatformSP platform_sp(GetSP()); if (platform_sp) platform_sp->DisconnectRemote(); } bool SBPlatform::IsConnected() { + SB_RECORD_METHOD_NO_ARGS(bool, SBPlatform, IsConnected); + PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->IsConnected(); @@ -279,6 +364,8 @@ } const char *SBPlatform::GetTriple() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetTriple); + PlatformSP platform_sp(GetSP()); if (platform_sp) { ArchSpec arch(platform_sp->GetSystemArchitecture()); @@ -292,6 +379,8 @@ } const char *SBPlatform::GetOSBuild() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetOSBuild); + PlatformSP platform_sp(GetSP()); if (platform_sp) { std::string s; @@ -307,6 +396,8 @@ } const char *SBPlatform::GetOSDescription() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetOSDescription); + PlatformSP platform_sp(GetSP()); if (platform_sp) { std::string s; @@ -322,6 +413,8 @@ } const char *SBPlatform::GetHostname() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBPlatform, GetHostname); + PlatformSP platform_sp(GetSP()); if (platform_sp) return platform_sp->GetHostname(); @@ -329,6 +422,8 @@ } uint32_t SBPlatform::GetOSMajorVersion() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBPlatform, GetOSMajorVersion); + llvm::VersionTuple version; if (PlatformSP platform_sp = GetSP()) version = platform_sp->GetOSVersion(); @@ -336,6 +431,8 @@ } uint32_t SBPlatform::GetOSMinorVersion() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBPlatform, GetOSMinorVersion); + llvm::VersionTuple version; if (PlatformSP platform_sp = GetSP()) version = platform_sp->GetOSVersion(); @@ -343,6 +440,8 @@ } uint32_t SBPlatform::GetOSUpdateVersion() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBPlatform, GetOSUpdateVersion); + llvm::VersionTuple version; if (PlatformSP platform_sp = GetSP()) version = platform_sp->GetOSVersion(); @@ -350,6 +449,9 @@ } SBError SBPlatform::Get(SBFileSpec &src, SBFileSpec &dst) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Get, + (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst); + SBError sb_error; PlatformSP platform_sp(GetSP()); if (platform_sp) { @@ -361,6 +463,9 @@ } SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Put, + (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst); + return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { if (src.Exists()) { uint32_t permissions = FileSystem::Instance().GetPermissions(src.ref()); @@ -382,6 +487,9 @@ } SBError SBPlatform::Install(SBFileSpec &src, SBFileSpec &dst) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Install, + (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst); + return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { if (src.Exists()) return platform_sp->Install(src.ref(), dst.ref()); @@ -394,6 +502,9 @@ } SBError SBPlatform::Run(SBPlatformShellCommand &shell_command) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Run, + (lldb::SBPlatformShellCommand &), shell_command); + return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { const char *command = shell_command.GetCommand(); if (!command) @@ -414,6 +525,9 @@ } SBError SBPlatform::Launch(SBLaunchInfo &launch_info) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Launch, (lldb::SBLaunchInfo &), + launch_info); + return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { ProcessLaunchInfo info = launch_info.ref(); Status error = platform_sp->LaunchProcess(info); @@ -423,6 +537,8 @@ } SBError SBPlatform::Kill(const lldb::pid_t pid) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, Kill, (const lldb::pid_t), pid); + return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { return platform_sp->KillProcess(pid); }); @@ -444,6 +560,9 @@ } SBError SBPlatform::MakeDirectory(const char *path, uint32_t file_permissions) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, MakeDirectory, + (const char *, uint32_t), path, file_permissions); + SBError sb_error; PlatformSP platform_sp(GetSP()); if (platform_sp) { @@ -456,6 +575,9 @@ } uint32_t SBPlatform::GetFilePermissions(const char *path) { + SB_RECORD_METHOD(uint32_t, SBPlatform, GetFilePermissions, (const char *), + path); + PlatformSP platform_sp(GetSP()); if (platform_sp) { uint32_t file_permissions = 0; @@ -467,6 +589,9 @@ SBError SBPlatform::SetFilePermissions(const char *path, uint32_t file_permissions) { + SB_RECORD_METHOD(lldb::SBError, SBPlatform, SetFilePermissions, + (const char *, uint32_t), path, file_permissions); + SBError sb_error; PlatformSP platform_sp(GetSP()); if (platform_sp) { @@ -479,6 +604,9 @@ } SBUnixSignals SBPlatform::GetUnixSignals() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBUnixSignals, SBPlatform, + GetUnixSignals); + if (auto platform_sp = GetSP()) return SBUnixSignals{platform_sp}; Index: source/API/SBProcess.cpp =================================================================== --- source/API/SBProcess.cpp +++ source/API/SBProcess.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBProcess.h" #include @@ -48,18 +50,27 @@ using namespace lldb; using namespace lldb_private; -SBProcess::SBProcess() : m_opaque_wp() {} +SBProcess::SBProcess() : m_opaque_wp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBProcess); +} //---------------------------------------------------------------------- // SBProcess constructor //---------------------------------------------------------------------- -SBProcess::SBProcess(const SBProcess &rhs) : m_opaque_wp(rhs.m_opaque_wp) {} +SBProcess::SBProcess(const SBProcess &rhs) : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBProcess, (const lldb::SBProcess &), rhs); +} SBProcess::SBProcess(const lldb::ProcessSP &process_sp) - : m_opaque_wp(process_sp) {} + : m_opaque_wp(process_sp) { + SB_RECORD_CONSTRUCTOR(SBProcess, (const lldb::ProcessSP &), process_sp); +} const SBProcess &SBProcess::operator=(const SBProcess &rhs) { + SB_RECORD_METHOD(const lldb::SBProcess &, + SBProcess, operator=,(const lldb::SBProcess &), rhs); + if (this != &rhs) m_opaque_wp = rhs.m_opaque_wp; return *this; @@ -71,10 +82,15 @@ SBProcess::~SBProcess() {} const char *SBProcess::GetBroadcasterClassName() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBProcess, + GetBroadcasterClassName); + return Process::GetStaticBroadcasterClass().AsCString(); } const char *SBProcess::GetPluginName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBProcess, GetPluginName); + ProcessSP process_sp(GetSP()); if (process_sp) { return process_sp->GetPluginName().GetCString(); @@ -83,6 +99,8 @@ } const char *SBProcess::GetShortPluginName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBProcess, GetShortPluginName); + ProcessSP process_sp(GetSP()); if (process_sp) { return process_sp->GetPluginName().GetCString(); @@ -94,9 +112,14 @@ void SBProcess::SetSP(const ProcessSP &process_sp) { m_opaque_wp = process_sp; } -void SBProcess::Clear() { m_opaque_wp.reset(); } +void SBProcess::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBProcess, Clear); + m_opaque_wp.reset(); +} bool SBProcess::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcess, IsValid); + ProcessSP process_sp(m_opaque_wp.lock()); return ((bool)process_sp && process_sp->IsValid()); } @@ -107,6 +130,13 @@ const char *working_directory, uint32_t launch_flags, bool stop_at_entry, lldb::SBError &error) { + SB_RECORD_METHOD(bool, SBProcess, RemoteLaunch, + (const char **, const char **, const char *, const char *, + const char *, const char *, uint32_t, bool, + lldb::SBError &), + argv, envp, stdin_path, stdout_path, stderr_path, + working_directory, launch_flags, stop_at_entry, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBProcess(%p)::RemoteLaunch (argv=%p, envp=%p, stdin=%s, " @@ -158,6 +188,9 @@ bool SBProcess::RemoteAttachToProcessWithID(lldb::pid_t pid, lldb::SBError &error) { + SB_RECORD_METHOD(bool, SBProcess, RemoteAttachToProcessWithID, + (lldb::pid_t, lldb::SBError &), pid, error); + ProcessSP process_sp(GetSP()); if (process_sp) { std::lock_guard guard( @@ -188,6 +221,8 @@ } uint32_t SBProcess::GetNumThreads() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetNumThreads); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t num_threads = 0; @@ -209,6 +244,8 @@ } SBThread SBProcess::GetSelectedThread() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBProcess, GetSelectedThread); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBThread sb_thread; @@ -231,6 +268,9 @@ SBThread SBProcess::CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context) { + SB_RECORD_METHOD(lldb::SBThread, SBProcess, CreateOSPluginThread, + (lldb::tid_t, lldb::addr_t), tid, context); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBThread sb_thread; @@ -253,6 +293,8 @@ } SBTarget SBProcess::GetTarget() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBTarget, SBProcess, GetTarget); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBTarget sb_target; @@ -272,6 +314,9 @@ } size_t SBProcess::PutSTDIN(const char *src, size_t src_len) { + SB_RECORD_METHOD(size_t, SBProcess, PutSTDIN, (const char *, size_t), src, + src_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); size_t ret_val = 0; @@ -291,6 +336,9 @@ } size_t SBProcess::GetSTDOUT(char *dst, size_t dst_len) const { + SB_RECORD_METHOD_CONST(size_t, SBProcess, GetSTDOUT, (char *, size_t), dst, + dst_len); + size_t bytes_read = 0; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -310,6 +358,9 @@ } size_t SBProcess::GetSTDERR(char *dst, size_t dst_len) const { + SB_RECORD_METHOD_CONST(size_t, SBProcess, GetSTDERR, (char *, size_t), dst, + dst_len); + size_t bytes_read = 0; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -329,6 +380,9 @@ } size_t SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const { + SB_RECORD_METHOD_CONST(size_t, SBProcess, GetAsyncProfileData, + (char *, size_t), dst, dst_len); + size_t bytes_read = 0; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -349,6 +403,9 @@ lldb::SBTrace SBProcess::StartTrace(SBTraceOptions &options, lldb::SBError &error) { + SB_RECORD_METHOD(lldb::SBTrace, SBProcess, StartTrace, + (lldb::SBTraceOptions &, lldb::SBError &), options, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ProcessSP process_sp(GetSP()); error.Clear(); @@ -367,6 +424,9 @@ } void SBProcess::ReportEventState(const SBEvent &event, FILE *out) const { + SB_RECORD_METHOD_CONST(void, SBProcess, ReportEventState, + (const lldb::SBEvent &, FILE *), event, out); + if (out == NULL) return; @@ -385,6 +445,10 @@ void SBProcess::AppendEventStateReport(const SBEvent &event, SBCommandReturnObject &result) { + SB_RECORD_METHOD(void, SBProcess, AppendEventStateReport, + (const lldb::SBEvent &, lldb::SBCommandReturnObject &), + event, result); + ProcessSP process_sp(GetSP()); if (process_sp) { const StateType event_state = SBProcess::GetStateFromEvent(event); @@ -397,6 +461,9 @@ } bool SBProcess::SetSelectedThread(const SBThread &thread) { + SB_RECORD_METHOD(bool, SBProcess, SetSelectedThread, (const lldb::SBThread &), + thread); + ProcessSP process_sp(GetSP()); if (process_sp) { std::lock_guard guard( @@ -408,6 +475,8 @@ } bool SBProcess::SetSelectedThreadByID(lldb::tid_t tid) { + SB_RECORD_METHOD(bool, SBProcess, SetSelectedThreadByID, (lldb::tid_t), tid); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_val = false; @@ -428,6 +497,9 @@ } bool SBProcess::SetSelectedThreadByIndexID(uint32_t index_id) { + SB_RECORD_METHOD(bool, SBProcess, SetSelectedThreadByIndexID, (uint32_t), + index_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_val = false; @@ -447,6 +519,9 @@ } SBThread SBProcess::GetThreadAtIndex(size_t index) { + SB_RECORD_METHOD(lldb::SBThread, SBProcess, GetThreadAtIndex, (size_t), + index); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBThread sb_thread; @@ -471,6 +546,8 @@ } uint32_t SBProcess::GetNumQueues() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetNumQueues); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t num_queues = 0; @@ -492,6 +569,8 @@ } SBQueue SBProcess::GetQueueAtIndex(size_t index) { + SB_RECORD_METHOD(lldb::SBQueue, SBProcess, GetQueueAtIndex, (size_t), index); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBQueue sb_queue; @@ -517,6 +596,9 @@ } uint32_t SBProcess::GetStopID(bool include_expression_stops) { + SB_RECORD_METHOD(uint32_t, SBProcess, GetStopID, (bool), + include_expression_stops); + ProcessSP process_sp(GetSP()); if (process_sp) { std::lock_guard guard( @@ -530,6 +612,9 @@ } SBEvent SBProcess::GetStopEventForStopID(uint32_t stop_id) { + SB_RECORD_METHOD(lldb::SBEvent, SBProcess, GetStopEventForStopID, (uint32_t), + stop_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBEvent sb_event; @@ -552,6 +637,7 @@ } StateType SBProcess::GetState() { + SB_RECORD_METHOD_NO_ARGS(lldb::StateType, SBProcess, GetState); StateType ret_val = eStateInvalid; ProcessSP process_sp(GetSP()); @@ -571,6 +657,8 @@ } int SBProcess::GetExitStatus() { + SB_RECORD_METHOD_NO_ARGS(int, SBProcess, GetExitStatus); + int exit_status = 0; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -588,6 +676,8 @@ } const char *SBProcess::GetExitDescription() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBProcess, GetExitDescription); + const char *exit_desc = NULL; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -603,6 +693,8 @@ } lldb::pid_t SBProcess::GetProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBProcess, GetProcessID); + lldb::pid_t ret_val = LLDB_INVALID_PROCESS_ID; ProcessSP process_sp(GetSP()); if (process_sp) @@ -617,6 +709,8 @@ } uint32_t SBProcess::GetUniqueID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetUniqueID); + uint32_t ret_val = 0; ProcessSP process_sp(GetSP()); if (process_sp) @@ -629,6 +723,8 @@ } ByteOrder SBProcess::GetByteOrder() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::ByteOrder, SBProcess, GetByteOrder); + ByteOrder byteOrder = eByteOrderInvalid; ProcessSP process_sp(GetSP()); if (process_sp) @@ -643,6 +739,8 @@ } uint32_t SBProcess::GetAddressByteSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBProcess, GetAddressByteSize); + uint32_t size = 0; ProcessSP process_sp(GetSP()); if (process_sp) @@ -657,6 +755,8 @@ } SBError SBProcess::Continue() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Continue); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBError sb_error; @@ -689,6 +789,8 @@ } SBError SBProcess::Destroy() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Destroy); + SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -711,6 +813,8 @@ } SBError SBProcess::Stop() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Stop); + SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -733,6 +837,8 @@ } SBError SBProcess::Kill() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Kill); + SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -755,12 +861,16 @@ } SBError SBProcess::Detach() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Detach); + // FIXME: This should come from a process default. bool keep_stopped = false; return Detach(keep_stopped); } SBError SBProcess::Detach(bool keep_stopped) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, Detach, (bool), keep_stopped); + SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -774,6 +884,8 @@ } SBError SBProcess::Signal(int signo) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, Signal, (int), signo); + SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -794,6 +906,8 @@ } SBUnixSignals SBProcess::GetUnixSignals() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBUnixSignals, SBProcess, GetUnixSignals); + if (auto process_sp = GetSP()) return SBUnixSignals{process_sp}; @@ -801,6 +915,8 @@ } void SBProcess::SendAsyncInterrupt() { + SB_RECORD_METHOD_NO_ARGS(void, SBProcess, SendAsyncInterrupt); + ProcessSP process_sp(GetSP()); if (process_sp) { process_sp->SendAsyncInterrupt(); @@ -808,6 +924,9 @@ } SBThread SBProcess::GetThreadByID(tid_t tid) { + SB_RECORD_METHOD(lldb::SBThread, SBProcess, GetThreadByID, (lldb::tid_t), + tid); + SBThread sb_thread; ThreadSP thread_sp; ProcessSP process_sp(GetSP()); @@ -831,6 +950,9 @@ } SBThread SBProcess::GetThreadByIndexID(uint32_t index_id) { + SB_RECORD_METHOD(lldb::SBThread, SBProcess, GetThreadByIndexID, (uint32_t), + index_id); + SBThread sb_thread; ThreadSP thread_sp; ProcessSP process_sp(GetSP()); @@ -854,6 +976,9 @@ } StateType SBProcess::GetStateFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::StateType, SBProcess, GetStateFromEvent, + (const lldb::SBEvent &), event); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); StateType ret_val = Process::ProcessEventData::GetStateFromEvent(event.get()); @@ -867,6 +992,9 @@ } bool SBProcess::GetRestartedFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBProcess, GetRestartedFromEvent, + (const lldb::SBEvent &), event); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool ret_val = Process::ProcessEventData::GetRestartedFromEvent(event.get()); @@ -879,16 +1007,26 @@ } size_t SBProcess::GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(size_t, SBProcess, GetNumRestartedReasonsFromEvent, + (const lldb::SBEvent &), event); + return Process::ProcessEventData::GetNumRestartedReasons(event.get()); } const char * SBProcess::GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event, size_t idx) { + SB_RECORD_STATIC_METHOD(const char *, SBProcess, + GetRestartedReasonAtIndexFromEvent, + (const lldb::SBEvent &, size_t), event, idx); + return Process::ProcessEventData::GetRestartedReasonAtIndex(event.get(), idx); } SBProcess SBProcess::GetProcessFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBProcess, SBProcess, GetProcessFromEvent, + (const lldb::SBEvent &), event); + ProcessSP process_sp = Process::ProcessEventData::GetProcessFromEvent(event.get()); if (!process_sp) { @@ -900,20 +1038,33 @@ } bool SBProcess::GetInterruptedFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBProcess, GetInterruptedFromEvent, + (const lldb::SBEvent &), event); + return Process::ProcessEventData::GetInterruptedFromEvent(event.get()); } lldb::SBStructuredData SBProcess::GetStructuredDataFromEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBStructuredData, SBProcess, + GetStructuredDataFromEvent, (const lldb::SBEvent &), + event); + return SBStructuredData(event.GetSP()); } bool SBProcess::EventIsProcessEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBProcess, EventIsProcessEvent, + (const lldb::SBEvent &), event); + return (event.GetBroadcasterClass() == SBProcess::GetBroadcasterClass()) && !EventIsStructuredDataEvent(event); } bool SBProcess::EventIsStructuredDataEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBProcess, EventIsStructuredDataEvent, + (const lldb::SBEvent &), event); + EventSP event_sp = event.GetSP(); EventData *event_data = event_sp ? event_sp->GetData() : nullptr; return event_data && (event_data->GetFlavor() == @@ -921,6 +1072,9 @@ } SBBroadcaster SBProcess::GetBroadcaster() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBProcess, + GetBroadcaster); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ProcessSP process_sp(GetSP()); @@ -936,6 +1090,8 @@ } const char *SBProcess::GetBroadcasterClass() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBProcess, GetBroadcasterClass); + return Process::GetStaticBroadcasterClass().AsCString(); } @@ -1011,6 +1167,10 @@ uint64_t SBProcess::ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size, lldb::SBError &sb_error) { + SB_RECORD_METHOD(uint64_t, SBProcess, ReadUnsignedFromMemory, + (lldb::addr_t, uint32_t, lldb::SBError &), addr, byte_size, + sb_error); + uint64_t value = 0; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1036,6 +1196,9 @@ lldb::addr_t SBProcess::ReadPointerFromMemory(addr_t addr, lldb::SBError &sb_error) { + SB_RECORD_METHOD(lldb::addr_t, SBProcess, ReadPointerFromMemory, + (lldb::addr_t, lldb::SBError &), addr, sb_error); + lldb::addr_t ptr = LLDB_INVALID_ADDRESS; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1103,6 +1266,9 @@ } bool SBProcess::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBProcess, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); ProcessSP process_sp(GetSP()); @@ -1126,6 +1292,10 @@ uint32_t SBProcess::GetNumSupportedHardwareWatchpoints(lldb::SBError &sb_error) const { + SB_RECORD_METHOD_CONST(uint32_t, SBProcess, + GetNumSupportedHardwareWatchpoints, (lldb::SBError &), + sb_error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t num = 0; @@ -1145,12 +1315,21 @@ uint32_t SBProcess::LoadImage(lldb::SBFileSpec &sb_remote_image_spec, lldb::SBError &sb_error) { + SB_RECORD_METHOD(uint32_t, SBProcess, LoadImage, + (lldb::SBFileSpec &, lldb::SBError &), sb_remote_image_spec, + sb_error); + return LoadImage(SBFileSpec(), sb_remote_image_spec, sb_error); } uint32_t SBProcess::LoadImage(const lldb::SBFileSpec &sb_local_image_spec, const lldb::SBFileSpec &sb_remote_image_spec, lldb::SBError &sb_error) { + SB_RECORD_METHOD( + uint32_t, SBProcess, LoadImage, + (const lldb::SBFileSpec &, const lldb::SBFileSpec &, lldb::SBError &), + sb_local_image_spec, sb_remote_image_spec, sb_error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1185,8 +1364,13 @@ uint32_t SBProcess::LoadImageUsingPaths(const lldb::SBFileSpec &image_spec, SBStringList &paths, - lldb::SBFileSpec &loaded_path, + lldb::SBFileSpec &loaded_path, lldb::SBError &error) { + SB_RECORD_METHOD(uint32_t, SBProcess, LoadImageUsingPaths, + (const lldb::SBFileSpec &, lldb::SBStringList &, + lldb::SBFileSpec &, lldb::SBError &), + image_spec, paths, loaded_path, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1235,6 +1419,9 @@ } lldb::SBError SBProcess::UnloadImage(uint32_t image_token) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, UnloadImage, (uint32_t), + image_token); + lldb::SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1258,6 +1445,9 @@ } lldb::SBError SBProcess::SendEventData(const char *event_data) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, SendEventData, (const char *), + event_data); + lldb::SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1280,6 +1470,8 @@ } uint32_t SBProcess::GetNumExtendedBacktraceTypes() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetNumExtendedBacktraceTypes); + ProcessSP process_sp(GetSP()); if (process_sp && process_sp->GetSystemRuntime()) { SystemRuntime *runtime = process_sp->GetSystemRuntime(); @@ -1289,6 +1481,9 @@ } const char *SBProcess::GetExtendedBacktraceTypeAtIndex(uint32_t idx) { + SB_RECORD_METHOD(const char *, SBProcess, GetExtendedBacktraceTypeAtIndex, + (uint32_t), idx); + ProcessSP process_sp(GetSP()); if (process_sp && process_sp->GetSystemRuntime()) { SystemRuntime *runtime = process_sp->GetSystemRuntime(); @@ -1308,6 +1503,9 @@ } SBThreadCollection SBProcess::GetHistoryThreads(addr_t addr) { + SB_RECORD_METHOD(lldb::SBThreadCollection, SBProcess, GetHistoryThreads, + (lldb::addr_t), addr); + ProcessSP process_sp(GetSP()); SBThreadCollection threads; if (process_sp) { @@ -1318,6 +1516,9 @@ bool SBProcess::IsInstrumentationRuntimePresent( InstrumentationRuntimeType type) { + SB_RECORD_METHOD(bool, SBProcess, IsInstrumentationRuntimePresent, + (lldb::InstrumentationRuntimeType), type); + ProcessSP process_sp(GetSP()); if (!process_sp) return false; @@ -1332,6 +1533,9 @@ } lldb::SBError SBProcess::SaveCore(const char *file_name) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, SaveCore, (const char *), + file_name); + lldb::SBError error; ProcessSP process_sp(GetSP()); if (!process_sp) { @@ -1355,6 +1559,10 @@ lldb::SBError SBProcess::GetMemoryRegionInfo(lldb::addr_t load_addr, SBMemoryRegionInfo &sb_region_info) { + SB_RECORD_METHOD(lldb::SBError, SBProcess, GetMemoryRegionInfo, + (lldb::addr_t, lldb::SBMemoryRegionInfo &), load_addr, + sb_region_info); + lldb::SBError sb_error; ProcessSP process_sp(GetSP()); if (process_sp) { @@ -1380,6 +1588,9 @@ } lldb::SBMemoryRegionInfoList SBProcess::GetMemoryRegions() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBMemoryRegionInfoList, SBProcess, + GetMemoryRegions); + lldb::SBMemoryRegionInfoList sb_region_list; ProcessSP process_sp(GetSP()); @@ -1401,6 +1612,8 @@ } lldb::SBProcessInfo SBProcess::GetProcessInfo() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcessInfo, SBProcess, GetProcessInfo); + lldb::SBProcessInfo sb_proc_info; ProcessSP process_sp(GetSP()); ProcessInstanceInfo proc_info; Index: source/API/SBProcessInfo.cpp =================================================================== --- source/API/SBProcessInfo.cpp +++ source/API/SBProcessInfo.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBProcessInfo.h" #include "lldb/API/SBFileSpec.h" @@ -14,9 +16,13 @@ using namespace lldb; using namespace lldb_private; -SBProcessInfo::SBProcessInfo() : m_opaque_ap() {} +SBProcessInfo::SBProcessInfo() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBProcessInfo); +} SBProcessInfo::SBProcessInfo(const SBProcessInfo &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBProcessInfo, (const lldb::SBProcessInfo &), rhs); + if (rhs.IsValid()) { ref() = *rhs.m_opaque_ap; } @@ -25,6 +31,9 @@ SBProcessInfo::~SBProcessInfo() {} SBProcessInfo &SBProcessInfo::operator=(const SBProcessInfo &rhs) { + SB_RECORD_METHOD(lldb::SBProcessInfo &, + SBProcessInfo, operator=,(const lldb::SBProcessInfo &), rhs); + if (this != &rhs) { if (rhs.IsValid()) ref() = *rhs.m_opaque_ap; @@ -45,9 +54,14 @@ ref() = proc_info_ref; } -bool SBProcessInfo::IsValid() const { return m_opaque_ap != nullptr; } +bool SBProcessInfo::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcessInfo, IsValid); + return m_opaque_ap != nullptr; +} const char *SBProcessInfo::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBProcessInfo, GetName); + const char *name = nullptr; if (m_opaque_ap) { name = m_opaque_ap->GetName(); @@ -56,6 +70,8 @@ } SBFileSpec SBProcessInfo::GetExecutableFile() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBProcessInfo, GetExecutableFile); + SBFileSpec file_spec; if (m_opaque_ap) { file_spec.SetFileSpec(m_opaque_ap->GetExecutableFile()); @@ -64,6 +80,8 @@ } lldb::pid_t SBProcessInfo::GetProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBProcessInfo, GetProcessID); + lldb::pid_t proc_id = LLDB_INVALID_PROCESS_ID; if (m_opaque_ap) { proc_id = m_opaque_ap->GetProcessID(); @@ -72,6 +90,8 @@ } uint32_t SBProcessInfo::GetUserID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcessInfo, GetUserID); + uint32_t user_id = UINT32_MAX; if (m_opaque_ap) { user_id = m_opaque_ap->GetUserID(); @@ -80,6 +100,8 @@ } uint32_t SBProcessInfo::GetGroupID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcessInfo, GetGroupID); + uint32_t group_id = UINT32_MAX; if (m_opaque_ap) { group_id = m_opaque_ap->GetGroupID(); @@ -88,6 +110,8 @@ } bool SBProcessInfo::UserIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBProcessInfo, UserIDIsValid); + bool is_valid = false; if (m_opaque_ap) { is_valid = m_opaque_ap->UserIDIsValid(); @@ -96,6 +120,8 @@ } bool SBProcessInfo::GroupIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBProcessInfo, GroupIDIsValid); + bool is_valid = false; if (m_opaque_ap) { is_valid = m_opaque_ap->GroupIDIsValid(); @@ -104,6 +130,8 @@ } uint32_t SBProcessInfo::GetEffectiveUserID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcessInfo, GetEffectiveUserID); + uint32_t user_id = UINT32_MAX; if (m_opaque_ap) { user_id = m_opaque_ap->GetEffectiveUserID(); @@ -112,6 +140,8 @@ } uint32_t SBProcessInfo::GetEffectiveGroupID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcessInfo, GetEffectiveGroupID); + uint32_t group_id = UINT32_MAX; if (m_opaque_ap) { group_id = m_opaque_ap->GetEffectiveGroupID(); @@ -120,6 +150,8 @@ } bool SBProcessInfo::EffectiveUserIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBProcessInfo, EffectiveUserIDIsValid); + bool is_valid = false; if (m_opaque_ap) { is_valid = m_opaque_ap->EffectiveUserIDIsValid(); @@ -128,6 +160,8 @@ } bool SBProcessInfo::EffectiveGroupIDIsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBProcessInfo, EffectiveGroupIDIsValid); + bool is_valid = false; if (m_opaque_ap) { is_valid = m_opaque_ap->EffectiveGroupIDIsValid(); @@ -136,6 +170,8 @@ } lldb::pid_t SBProcessInfo::GetParentProcessID() { + SB_RECORD_METHOD_NO_ARGS(lldb::pid_t, SBProcessInfo, GetParentProcessID); + lldb::pid_t proc_id = LLDB_INVALID_PROCESS_ID; if (m_opaque_ap) { proc_id = m_opaque_ap->GetParentProcessID(); Index: source/API/SBQueue.cpp =================================================================== --- source/API/SBQueue.cpp +++ source/API/SBQueue.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include #include "lldb/API/SBQueue.h" @@ -231,12 +233,18 @@ }; } -SBQueue::SBQueue() : m_opaque_sp(new QueueImpl()) {} +SBQueue::SBQueue() : m_opaque_sp(new QueueImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBQueue); +} SBQueue::SBQueue(const QueueSP &queue_sp) - : m_opaque_sp(new QueueImpl(queue_sp)) {} + : m_opaque_sp(new QueueImpl(queue_sp)) { + SB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &), queue_sp); +} SBQueue::SBQueue(const SBQueue &rhs) { + SB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &), rhs); + if (&rhs == this) return; @@ -244,6 +252,9 @@ } const lldb::SBQueue &SBQueue::operator=(const lldb::SBQueue &rhs) { + SB_RECORD_METHOD(const lldb::SBQueue &, + SBQueue, operator=,(const lldb::SBQueue &), rhs); + m_opaque_sp = rhs.m_opaque_sp; return *this; } @@ -251,6 +262,8 @@ SBQueue::~SBQueue() {} bool SBQueue::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, IsValid); + bool is_valid = m_opaque_sp->IsValid(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -260,6 +273,8 @@ } void SBQueue::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBQueue, Clear); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBQueue(0x%" PRIx64 ")::Clear()", m_opaque_sp->GetQueueID()); @@ -271,6 +286,8 @@ } lldb::queue_id_t SBQueue::GetQueueID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::queue_id_t, SBQueue, GetQueueID); + lldb::queue_id_t qid = m_opaque_sp->GetQueueID(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -280,6 +297,8 @@ } uint32_t SBQueue::GetIndexID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBQueue, GetIndexID); + uint32_t index_id = m_opaque_sp->GetIndexID(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -289,6 +308,8 @@ } const char *SBQueue::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBQueue, GetName); + const char *name = m_opaque_sp->GetName(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -298,6 +319,8 @@ } uint32_t SBQueue::GetNumThreads() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumThreads); + uint32_t numthreads = m_opaque_sp->GetNumThreads(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -307,6 +330,8 @@ } SBThread SBQueue::GetThreadAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t), idx); + SBThread th = m_opaque_sp->GetThreadAtIndex(idx); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -316,6 +341,8 @@ } uint32_t SBQueue::GetNumPendingItems() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumPendingItems); + uint32_t pending_items = m_opaque_sp->GetNumPendingItems(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -325,6 +352,9 @@ } SBQueueItem SBQueue::GetPendingItemAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex, + (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBQueue(0x%" PRIx64 ")::GetPendingItemAtIndex(%d)", @@ -333,6 +363,8 @@ } uint32_t SBQueue::GetNumRunningItems() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumRunningItems); + uint32_t running_items = m_opaque_sp->GetNumRunningItems(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -341,6 +373,12 @@ return running_items; } -SBProcess SBQueue::GetProcess() { return m_opaque_sp->GetProcess(); } +SBProcess SBQueue::GetProcess() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBQueue, GetProcess); + return m_opaque_sp->GetProcess(); +} -lldb::QueueKind SBQueue::GetKind() { return m_opaque_sp->GetKind(); } +lldb::QueueKind SBQueue::GetKind() { + SB_RECORD_METHOD_NO_ARGS(lldb::QueueKind, SBQueue, GetKind); + return m_opaque_sp->GetKind(); +} Index: source/API/SBQueueItem.cpp =================================================================== --- source/API/SBQueueItem.cpp +++ source/API/SBQueueItem.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/lldb-forward.h" #include "lldb/API/SBAddress.h" @@ -23,10 +25,15 @@ //---------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------- -SBQueueItem::SBQueueItem() : m_queue_item_sp() {} +SBQueueItem::SBQueueItem() : m_queue_item_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBQueueItem); +} SBQueueItem::SBQueueItem(const QueueItemSP &queue_item_sp) - : m_queue_item_sp(queue_item_sp) {} + : m_queue_item_sp(queue_item_sp) { + SB_RECORD_CONSTRUCTOR(SBQueueItem, (const lldb::QueueItemSP &), + queue_item_sp); +} //---------------------------------------------------------------------- // Destructor @@ -34,6 +41,8 @@ SBQueueItem::~SBQueueItem() { m_queue_item_sp.reset(); } bool SBQueueItem::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueueItem, IsValid); + bool is_valid = m_queue_item_sp.get() != NULL; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -44,6 +53,8 @@ } void SBQueueItem::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBQueueItem, Clear); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBQueueItem(%p)::Clear()", @@ -52,10 +63,15 @@ } void SBQueueItem::SetQueueItem(const QueueItemSP &queue_item_sp) { + SB_RECORD_METHOD(void, SBQueueItem, SetQueueItem, (const lldb::QueueItemSP &), + queue_item_sp); + m_queue_item_sp = queue_item_sp; } lldb::QueueItemKind SBQueueItem::GetKind() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::QueueItemKind, SBQueueItem, GetKind); + QueueItemKind result = eQueueItemKindUnknown; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_queue_item_sp) { @@ -69,12 +85,16 @@ } void SBQueueItem::SetKind(lldb::QueueItemKind kind) { + SB_RECORD_METHOD(void, SBQueueItem, SetKind, (lldb::QueueItemKind), kind); + if (m_queue_item_sp) { m_queue_item_sp->SetKind(kind); } } SBAddress SBQueueItem::GetAddress() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBQueueItem, GetAddress); + SBAddress result; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_queue_item_sp) { @@ -94,12 +114,17 @@ } void SBQueueItem::SetAddress(SBAddress addr) { + SB_RECORD_METHOD(void, SBQueueItem, SetAddress, (lldb::SBAddress), addr); + if (m_queue_item_sp) { m_queue_item_sp->SetAddress(addr.ref()); } } SBThread SBQueueItem::GetExtendedBacktraceThread(const char *type) { + SB_RECORD_METHOD(lldb::SBThread, SBQueueItem, GetExtendedBacktraceThread, + (const char *), type); + SBThread result; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (m_queue_item_sp) { Index: source/API/SBReproducer.cpp =================================================================== --- source/API/SBReproducer.cpp +++ source/API/SBReproducer.cpp @@ -62,7 +62,2877 @@ // Do nothing. } -void SBRegistry::Init() {} +void SBRegistry::Init() { + // SBAddress + { + SB_REGISTER_CONSTRUCTOR(SBAddress, ()); + SB_REGISTER_CONSTRUCTOR(SBAddress, (const lldb::SBAddress &)); + SB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::SBSection, lldb::addr_t)); + SB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::addr_t, lldb::SBTarget &)); + SB_REGISTER_METHOD(const lldb::SBAddress &, + SBAddress, operator=,(const lldb::SBAddress &)); + SB_REGISTER_METHOD_CONST(bool, SBAddress, IsValid, ()); + SB_REGISTER_METHOD(void, SBAddress, Clear, ()); + SB_REGISTER_METHOD(void, SBAddress, SetAddress, + (lldb::SBSection, lldb::addr_t)); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetFileAddress, ()); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress, + (const lldb::SBTarget &)); + SB_REGISTER_METHOD(void, SBAddress, SetLoadAddress, + (lldb::addr_t, lldb::SBTarget &)); + SB_REGISTER_METHOD(bool, SBAddress, OffsetAddress, (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBSection, SBAddress, GetSection, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBAddress, GetOffset, ()); + SB_REGISTER_METHOD(bool, SBAddress, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::SBModule, SBAddress, GetModule, ()); + SB_REGISTER_METHOD(lldb::SBSymbolContext, SBAddress, GetSymbolContext, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBCompileUnit, SBAddress, GetCompileUnit, ()); + SB_REGISTER_METHOD(lldb::SBFunction, SBAddress, GetFunction, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBAddress, GetBlock, ()); + SB_REGISTER_METHOD(lldb::SBSymbol, SBAddress, GetSymbol, ()); + SB_REGISTER_METHOD(lldb::SBLineEntry, SBAddress, GetLineEntry, ()); + } + + // SBAttachInfo + { + SB_REGISTER_CONSTRUCTOR(SBAttachInfo, ()); + SB_REGISTER_CONSTRUCTOR(SBAttachInfo, (lldb::pid_t)); + SB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const char *, bool)); + SB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const char *, bool, bool)); + SB_REGISTER_CONSTRUCTOR(SBAttachInfo, (const lldb::SBAttachInfo &)); + SB_REGISTER_METHOD(lldb::SBAttachInfo &, + SBAttachInfo, operator=,(const lldb::SBAttachInfo &)); + SB_REGISTER_METHOD(lldb::pid_t, SBAttachInfo, GetProcessID, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetProcessID, (lldb::pid_t)); + SB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetResumeCount, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetResumeCount, (uint32_t)); + SB_REGISTER_METHOD(const char *, SBAttachInfo, GetProcessPluginName, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetProcessPluginName, + (const char *)); + SB_REGISTER_METHOD(void, SBAttachInfo, SetExecutable, (const char *)); + SB_REGISTER_METHOD(void, SBAttachInfo, SetExecutable, (lldb::SBFileSpec)); + SB_REGISTER_METHOD(bool, SBAttachInfo, GetWaitForLaunch, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool)); + SB_REGISTER_METHOD(void, SBAttachInfo, SetWaitForLaunch, (bool, bool)); + SB_REGISTER_METHOD(bool, SBAttachInfo, GetIgnoreExisting, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetIgnoreExisting, (bool)); + SB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetUserID, ()); + SB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetGroupID, ()); + SB_REGISTER_METHOD(bool, SBAttachInfo, UserIDIsValid, ()); + SB_REGISTER_METHOD(bool, SBAttachInfo, GroupIDIsValid, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetUserID, (uint32_t)); + SB_REGISTER_METHOD(void, SBAttachInfo, SetGroupID, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetEffectiveUserID, ()); + SB_REGISTER_METHOD(uint32_t, SBAttachInfo, GetEffectiveGroupID, ()); + SB_REGISTER_METHOD(bool, SBAttachInfo, EffectiveUserIDIsValid, ()); + SB_REGISTER_METHOD(bool, SBAttachInfo, EffectiveGroupIDIsValid, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetEffectiveUserID, (uint32_t)); + SB_REGISTER_METHOD(void, SBAttachInfo, SetEffectiveGroupID, (uint32_t)); + SB_REGISTER_METHOD(lldb::pid_t, SBAttachInfo, GetParentProcessID, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetParentProcessID, (lldb::pid_t)); + SB_REGISTER_METHOD(bool, SBAttachInfo, ParentProcessIDIsValid, ()); + SB_REGISTER_METHOD(lldb::SBListener, SBAttachInfo, GetListener, ()); + SB_REGISTER_METHOD(void, SBAttachInfo, SetListener, (lldb::SBListener &)); + } + + // SBBlock + { + SB_REGISTER_CONSTRUCTOR(SBBlock, ()); + SB_REGISTER_CONSTRUCTOR(SBBlock, (const lldb::SBBlock &)); + SB_REGISTER_METHOD(const lldb::SBBlock &, + SBBlock, operator=,(const lldb::SBBlock &)); + SB_REGISTER_METHOD_CONST(bool, SBBlock, IsValid, ()); + SB_REGISTER_METHOD_CONST(bool, SBBlock, IsInlined, ()); + SB_REGISTER_METHOD_CONST(const char *, SBBlock, GetInlinedName, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBBlock, GetInlinedCallSiteFile, + ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBBlock, GetInlinedCallSiteLine, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBBlock, GetInlinedCallSiteColumn, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetParent, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetContainingInlinedBlock, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetSibling, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBBlock, GetFirstChild, ()); + SB_REGISTER_METHOD(bool, SBBlock, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(uint32_t, SBBlock, GetNumRanges, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBBlock, GetRangeStartAddress, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBAddress, SBBlock, GetRangeEndAddress, + (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBBlock, GetRangeIndexForBlockAddress, + (lldb::SBAddress)); + SB_REGISTER_METHOD( + lldb::SBValueList, SBBlock, GetVariables, + (lldb::SBFrame &, bool, bool, bool, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValueList, SBBlock, GetVariables, + (lldb::SBTarget &, bool, bool, bool)); + } + + // SBBreakpoint + { + SB_REGISTER_CONSTRUCTOR(SBBreakpoint, ()); + SB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::SBBreakpoint &)); + SB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::BreakpointSP &)); + SB_REGISTER_METHOD(const lldb::SBBreakpoint &, + SBBreakpoint, operator=,(const lldb::SBBreakpoint &)); + SB_REGISTER_METHOD(bool, + SBBreakpoint, operator==,(const lldb::SBBreakpoint &)); + SB_REGISTER_METHOD(bool, + SBBreakpoint, operator!=,(const lldb::SBBreakpoint &)); + SB_REGISTER_METHOD_CONST(lldb::break_id_t, SBBreakpoint, GetID, ()); + SB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsValid, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, ClearAllBreakpointSites, ()); + SB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, + FindLocationByAddress, (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::break_id_t, SBBreakpoint, FindLocationIDByAddress, + (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, + FindLocationByID, (lldb::break_id_t)); + SB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, + GetLocationAtIndex, (uint32_t)); + SB_REGISTER_METHOD(void, SBBreakpoint, SetEnabled, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpoint, IsEnabled, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetOneShot, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsOneShot, ()); + SB_REGISTER_METHOD(bool, SBBreakpoint, IsInternal, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t)); + SB_REGISTER_METHOD(void, SBBreakpoint, SetCondition, (const char *)); + SB_REGISTER_METHOD(const char *, SBBreakpoint, GetCondition, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetAutoContinue, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpoint, GetAutoContinue, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetHitCount, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetIgnoreCount, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetThreadID, (lldb::tid_t)); + SB_REGISTER_METHOD(lldb::tid_t, SBBreakpoint, GetThreadID, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetThreadIndex, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetThreadName, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetThreadName, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetQueueName, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetQueueName, ()); + SB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumResolvedLocations, ()); + SB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumLocations, ()); + SB_REGISTER_METHOD(void, SBBreakpoint, SetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(bool, SBBreakpoint, GetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription, + (lldb::SBStream &, bool)); + SB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, AddLocation, + (lldb::SBAddress &)); + SB_REGISTER_METHOD(void, SBBreakpoint, SetScriptCallbackFunction, + (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody, + (const char *)); + SB_REGISTER_METHOD(bool, SBBreakpoint, AddName, (const char *)); + SB_REGISTER_METHOD(void, SBBreakpoint, RemoveName, (const char *)); + SB_REGISTER_METHOD(bool, SBBreakpoint, MatchesName, (const char *)); + SB_REGISTER_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &)); + SB_REGISTER_STATIC_METHOD(bool, SBBreakpoint, EventIsBreakpointEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::BreakpointEventType, SBBreakpoint, + GetBreakpointEventTypeFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBBreakpoint, SBBreakpoint, + GetBreakpointFromEvent, (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(uint32_t, SBBreakpoint, + GetNumBreakpointLocationsFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsHardware, ()); + } + + // SBBreakpointLocation + { + SB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, ()); + SB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, + (const lldb::BreakpointLocationSP &)); + SB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, + (const lldb::SBBreakpointLocation &)); + SB_REGISTER_METHOD( + const lldb::SBBreakpointLocation &, + SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBBreakpointLocation, GetAddress, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBBreakpointLocation, GetLoadAddress, ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetEnabled, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointLocation, IsEnabled, ()); + SB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetHitCount, ()); + SB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetIgnoreCount, ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetIgnoreCount, (uint32_t)); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetCondition, + (const char *)); + SB_REGISTER_METHOD(const char *, SBBreakpointLocation, GetCondition, ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetAutoContinue, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointLocation, GetAutoContinue, ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction, + (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBBreakpointLocation, + SetScriptCallbackBody, (const char *)); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(bool, SBBreakpointLocation, GetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadID, (lldb::tid_t)); + SB_REGISTER_METHOD(lldb::tid_t, SBBreakpointLocation, GetThreadID, ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadIndex, (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointLocation, GetThreadIndex, + ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadName, + (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation, GetThreadName, + ()); + SB_REGISTER_METHOD(void, SBBreakpointLocation, SetQueueName, + (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation, GetQueueName, + ()); + SB_REGISTER_METHOD(bool, SBBreakpointLocation, IsResolved, ()); + SB_REGISTER_METHOD(bool, SBBreakpointLocation, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(lldb::break_id_t, SBBreakpointLocation, GetID, ()); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointLocation, GetBreakpoint, + ()); + } + + // SBBreakpointList + { + SB_REGISTER_CONSTRUCTOR(SBBreakpointList, (lldb::SBTarget &)); + SB_REGISTER_METHOD_CONST(size_t, SBBreakpointList, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList, + GetBreakpointAtIndex, (size_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList, FindBreakpointByID, + (lldb::break_id_t)); + SB_REGISTER_METHOD(void, SBBreakpointList, Append, + (const lldb::SBBreakpoint &)); + SB_REGISTER_METHOD(void, SBBreakpointList, AppendByID, (lldb::break_id_t)); + SB_REGISTER_METHOD(bool, SBBreakpointList, AppendIfUnique, + (const lldb::SBBreakpoint &)); + SB_REGISTER_METHOD(void, SBBreakpointList, Clear, ()); + } + + // SBBreakpointName + { + + SB_REGISTER_CONSTRUCTOR(SBBreakpointName, ()); + SB_REGISTER_CONSTRUCTOR(SBBreakpointName, (lldb::SBTarget &, const char *)); + SB_REGISTER_CONSTRUCTOR(SBBreakpointName, + (lldb::SBBreakpoint &, const char *)); + SB_REGISTER_CONSTRUCTOR(SBBreakpointName, (const lldb::SBBreakpointName &)); + SB_REGISTER_METHOD( + const lldb::SBBreakpointName &, + SBBreakpointName, operator=,(const lldb::SBBreakpointName &)); + SB_REGISTER_METHOD( + bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &)); + SB_REGISTER_METHOD( + bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ()); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetName, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetEnabled, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointName, IsEnabled, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetOneShot, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsOneShot, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetIgnoreCount, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetCondition, (const char *)); + SB_REGISTER_METHOD(const char *, SBBreakpointName, GetCondition, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetAutoContinue, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointName, GetAutoContinue, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t)); + SB_REGISTER_METHOD(lldb::tid_t, SBBreakpointName, GetThreadID, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetThreadIndex, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetThreadName, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetThreadName, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetQueueName, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetQueueName, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(bool, SBBreakpointName, GetCommandLineCommands, + (lldb::SBStringList &)); + SB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetHelpString, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetHelpString, (const char *)); + SB_REGISTER_METHOD(bool, SBBreakpointName, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBBreakpointName, SetScriptCallbackFunction, + (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody, + (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBBreakpointName, GetAllowList, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetAllowList, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDelete, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDelete, (bool)); + SB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDisable, ()); + SB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDisable, (bool)); + } + + // SBBroadcaster + { + SB_REGISTER_CONSTRUCTOR(SBBroadcaster, ()); + SB_REGISTER_CONSTRUCTOR(SBBroadcaster, (const char *)); + SB_REGISTER_CONSTRUCTOR(SBBroadcaster, (const lldb::SBBroadcaster &)); + SB_REGISTER_METHOD(const lldb::SBBroadcaster &, + SBBroadcaster, operator=,(const lldb::SBBroadcaster &)); + SB_REGISTER_METHOD(void, SBBroadcaster, BroadcastEventByType, + (uint32_t, bool)); + SB_REGISTER_METHOD(void, SBBroadcaster, BroadcastEvent, + (const lldb::SBEvent &, bool)); + SB_REGISTER_METHOD(void, SBBroadcaster, AddInitialEventsToListener, + (const lldb::SBListener &, uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBBroadcaster, AddListener, + (const lldb::SBListener &, uint32_t)); + SB_REGISTER_METHOD_CONST(const char *, SBBroadcaster, GetName, ()); + SB_REGISTER_METHOD(bool, SBBroadcaster, EventTypeHasListeners, (uint32_t)); + SB_REGISTER_METHOD(bool, SBBroadcaster, RemoveListener, + (const lldb::SBListener &, uint32_t)); + SB_REGISTER_METHOD_CONST(bool, SBBroadcaster, IsValid, ()); + SB_REGISTER_METHOD(void, SBBroadcaster, Clear, ()); + SB_REGISTER_METHOD_CONST( + bool, SBBroadcaster, operator==,(const lldb::SBBroadcaster &)); + SB_REGISTER_METHOD_CONST( + bool, SBBroadcaster, operator!=,(const lldb::SBBroadcaster &)); + SB_REGISTER_METHOD_CONST( + bool, SBBroadcaster, operator<,(const lldb::SBBroadcaster &)); + } + // SBFileSpec + { + SB_REGISTER_CONSTRUCTOR(SBFileSpec, ()); + SB_REGISTER_CONSTRUCTOR(SBFileSpec, (const lldb::SBFileSpec &)); + SB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *)); + SB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *, bool)); + SB_REGISTER_METHOD(const lldb::SBFileSpec &, + SBFileSpec, operator=,(const lldb::SBFileSpec &)); + SB_REGISTER_METHOD_CONST(bool, SBFileSpec, IsValid, ()); + SB_REGISTER_METHOD_CONST(bool, SBFileSpec, Exists, ()); + SB_REGISTER_METHOD(bool, SBFileSpec, ResolveExecutableLocation, ()); + SB_REGISTER_STATIC_METHOD(int, SBFileSpec, ResolvePath, + (const char *, char *, size_t)); + SB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetFilename, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetDirectory, ()); + SB_REGISTER_METHOD(void, SBFileSpec, SetFilename, (const char *)); + SB_REGISTER_METHOD(void, SBFileSpec, SetDirectory, (const char *)); + SB_REGISTER_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t)); + SB_REGISTER_METHOD_CONST(bool, SBFileSpec, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBFileSpec, AppendPathComponent, (const char *)); + } + + // SBHostOS + { + SB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetProgramFileSpec, + ()); + SB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetLLDBPythonPath, + ()); + SB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetLLDBPath, + (lldb::PathType)); + SB_REGISTER_STATIC_METHOD(lldb::SBFileSpec, SBHostOS, GetUserHomeDirectory, + ()); + SB_REGISTER_STATIC_METHOD(void, SBHostOS, ThreadCreated, (const char *)); + SB_REGISTER_STATIC_METHOD(bool, SBHostOS, ThreadCancel, + (lldb::thread_t, lldb::SBError *)); + SB_REGISTER_STATIC_METHOD(bool, SBHostOS, ThreadDetach, + (lldb::thread_t, lldb::SBError *)); + SB_REGISTER_STATIC_METHOD( + bool, SBHostOS, ThreadJoin, + (lldb::thread_t, lldb::thread_result_t *, lldb::SBError *)); + } + + // SBInputReader + { + SB_REGISTER_METHOD(void, SBInputReader, SetIsDone, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBInputReader, IsActive, ()); + } + + // SBDebugger + { + SB_REGISTER_CONSTRUCTOR(SBDebugger, ()); + SB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::DebuggerSP &)); + SB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::SBDebugger &)); + SB_REGISTER_METHOD(lldb::SBDebugger &, + SBDebugger, operator=,(const lldb::SBDebugger &)); + SB_REGISTER_STATIC_METHOD(void, SBDebugger, Initialize, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBError, SBDebugger, Initialize, + (lldb::SBInitializerOptions &)); + SB_REGISTER_STATIC_METHOD(void, SBDebugger, Terminate, ()); + SB_REGISTER_METHOD(void, SBDebugger, Clear, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, (bool)); + SB_REGISTER_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &)); + SB_REGISTER_STATIC_METHOD(void, SBDebugger, MemoryPressureDetected, ()); + SB_REGISTER_METHOD_CONST(bool, SBDebugger, IsValid, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetAsync, (bool)); + SB_REGISTER_METHOD(bool, SBDebugger, GetAsync, ()); + SB_REGISTER_METHOD(void, SBDebugger, SkipLLDBInitFiles, (bool)); + SB_REGISTER_METHOD(void, SBDebugger, SkipAppInitFiles, (bool)); + SB_REGISTER_METHOD(FILE *, SBDebugger, GetInputFileHandle, ()); + SB_REGISTER_METHOD(FILE *, SBDebugger, GetOutputFileHandle, ()); + SB_REGISTER_METHOD(FILE *, SBDebugger, GetErrorFileHandle, ()); + SB_REGISTER_METHOD(void, SBDebugger, SaveInputTerminalState, ()); + SB_REGISTER_METHOD(void, SBDebugger, RestoreInputTerminalState, ()); + SB_REGISTER_METHOD(lldb::SBCommandInterpreter, SBDebugger, + GetCommandInterpreter, ()); + SB_REGISTER_METHOD(void, SBDebugger, HandleCommand, (const char *)); + SB_REGISTER_METHOD(lldb::SBListener, SBDebugger, GetListener, ()); + SB_REGISTER_METHOD( + void, SBDebugger, HandleProcessEvent, + (const lldb::SBProcess &, const lldb::SBEvent &, FILE *, FILE *)); + SB_REGISTER_METHOD(lldb::SBSourceManager, SBDebugger, GetSourceManager, ()); + SB_REGISTER_STATIC_METHOD(bool, SBDebugger, GetDefaultArchitecture, + (char *, size_t)); + SB_REGISTER_STATIC_METHOD(bool, SBDebugger, SetDefaultArchitecture, + (const char *)); + SB_REGISTER_METHOD(lldb::ScriptLanguage, SBDebugger, GetScriptingLanguage, + (const char *)); + SB_REGISTER_STATIC_METHOD(const char *, SBDebugger, GetVersionString, ()); + SB_REGISTER_STATIC_METHOD(const char *, SBDebugger, StateAsCString, + (lldb::StateType)); + SB_REGISTER_STATIC_METHOD(lldb::SBStructuredData, SBDebugger, + GetBuildConfiguration, ()); + SB_REGISTER_STATIC_METHOD(bool, SBDebugger, StateIsRunningState, + (lldb::StateType)); + SB_REGISTER_STATIC_METHOD(bool, SBDebugger, StateIsStoppedState, + (lldb::StateType)); + SB_REGISTER_METHOD( + lldb::SBTarget, SBDebugger, CreateTarget, + (const char *, const char *, const char *, bool, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, + CreateTargetWithFileAndTargetTriple, + (const char *, const char *)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTargetWithFileAndArch, + (const char *, const char *)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTarget, + (const char *)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetDummyTarget, ()); + SB_REGISTER_METHOD(bool, SBDebugger, DeleteTarget, (lldb::SBTarget &)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetTargetAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBDebugger, GetIndexOfTarget, + (lldb::SBTarget)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithProcessID, + (lldb::pid_t)); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, FindTargetWithFileAndArch, + (const char *, const char *)); + SB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumTargets, ()); + SB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetSelectedTarget, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetSelectedTarget, (lldb::SBTarget &)); + SB_REGISTER_METHOD(lldb::SBPlatform, SBDebugger, GetSelectedPlatform, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetSelectedPlatform, + (lldb::SBPlatform &)); + SB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumPlatforms, ()); + SB_REGISTER_METHOD(lldb::SBPlatform, SBDebugger, GetPlatformAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumAvailablePlatforms, ()); + SB_REGISTER_METHOD(lldb::SBStructuredData, SBDebugger, + GetAvailablePlatformInfoAtIndex, (uint32_t)); + SB_REGISTER_METHOD(void, SBDebugger, DispatchInputInterrupt, ()); + SB_REGISTER_METHOD(void, SBDebugger, DispatchInputEndOfFile, ()); + SB_REGISTER_METHOD(void, SBDebugger, PushInputReader, + (lldb::SBInputReader &)); + SB_REGISTER_METHOD(void, SBDebugger, RunCommandInterpreter, (bool, bool)); + SB_REGISTER_METHOD(void, SBDebugger, RunCommandInterpreter, + (bool, bool, lldb::SBCommandInterpreterRunOptions &, + int &, bool &, bool &)); + SB_REGISTER_METHOD(lldb::SBError, SBDebugger, RunREPL, + (lldb::LanguageType, const char *)); + SB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, FindDebuggerWithID, + (int)); + SB_REGISTER_METHOD(const char *, SBDebugger, GetInstanceName, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBError, SBDebugger, SetInternalVariable, + (const char *, const char *, const char *)); + SB_REGISTER_STATIC_METHOD(lldb::SBStringList, SBDebugger, + GetInternalVariableValue, + (const char *, const char *)); + SB_REGISTER_METHOD_CONST(uint32_t, SBDebugger, GetTerminalWidth, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t)); + SB_REGISTER_METHOD_CONST(const char *, SBDebugger, GetPrompt, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetPrompt, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBDebugger, GetReproducerPath, ()); + SB_REGISTER_METHOD_CONST(lldb::ScriptLanguage, SBDebugger, + GetScriptLanguage, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetScriptLanguage, + (lldb::ScriptLanguage)); + SB_REGISTER_METHOD(bool, SBDebugger, SetUseExternalEditor, (bool)); + SB_REGISTER_METHOD(bool, SBDebugger, GetUseExternalEditor, ()); + SB_REGISTER_METHOD(bool, SBDebugger, SetUseColor, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBDebugger, GetUseColor, ()); + SB_REGISTER_METHOD(bool, SBDebugger, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::user_id_t, SBDebugger, GetID, ()); + SB_REGISTER_METHOD(lldb::SBError, SBDebugger, SetCurrentPlatform, + (const char *)); + SB_REGISTER_METHOD(bool, SBDebugger, SetCurrentPlatformSDKRoot, + (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBDebugger, GetCloseInputOnEOF, ()); + SB_REGISTER_METHOD(void, SBDebugger, SetCloseInputOnEOF, (bool)); + SB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory, + (const char *)); + SB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategory, + (lldb::LanguageType)); + SB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, CreateCategory, + (const char *)); + SB_REGISTER_METHOD(bool, SBDebugger, DeleteCategory, (const char *)); + SB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumCategories, ()); + SB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategoryAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeCategory, SBDebugger, GetDefaultCategory, + ()); + SB_REGISTER_METHOD(lldb::SBTypeFormat, SBDebugger, GetFormatForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeSummary, SBDebugger, GetSummaryForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBDebugger, GetSyntheticForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(bool, SBDebugger, EnableLog, + (const char *, const char **)); + + // Custom implementation. + Register(&invoke::method<&SBDebugger::SetInputFileHandle>::doit, + m_id++, &SetInputFileHandleRedirect); + Register(&invoke::method<&SBDebugger::SetErrorFileHandle>::doit, + m_id++, &SetFileHandleRedirect); + Register(&invoke::method<&SBDebugger::SetOutputFileHandle>::doit, + m_id++, &SetFileHandleRedirect); + } + + // SBCommandInterpreter + { + SB_REGISTER_CONSTRUCTOR(SBCommandInterpreter, + (lldb_private::CommandInterpreter *)); + SB_REGISTER_CONSTRUCTOR(SBCommandInterpreter, + (const lldb::SBCommandInterpreter &)); + SB_REGISTER_METHOD( + const lldb::SBCommandInterpreter &, + SBCommandInterpreter, operator=,(const lldb::SBCommandInterpreter &)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, IsValid, ()); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, CommandExists, + (const char *)); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, AliasExists, (const char *)); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, IsActive, ()); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, WasInterrupted, ()); + SB_REGISTER_METHOD(const char *, SBCommandInterpreter, + GetIOHandlerControlSequence, (char)); + SB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandInterpreter, HandleCommand, + (const char *, lldb::SBCommandReturnObject &, bool)); + SB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandInterpreter, HandleCommand, + (const char *, lldb::SBExecutionContext &, + lldb::SBCommandReturnObject &, bool)); + SB_REGISTER_METHOD(void, SBCommandInterpreter, HandleCommandsFromFile, + (lldb::SBFileSpec &, lldb::SBExecutionContext &, + lldb::SBCommandInterpreterRunOptions &, + lldb::SBCommandReturnObject)); + SB_REGISTER_METHOD(int, SBCommandInterpreter, HandleCompletion, + (const char *, const char *, const char *, int, int, + lldb::SBStringList &)); + SB_REGISTER_METHOD(int, SBCommandInterpreter, + HandleCompletionWithDescriptions, + (const char *, const char *, const char *, int, int, + lldb::SBStringList &, lldb::SBStringList &)); + SB_REGISTER_METHOD(int, SBCommandInterpreter, + HandleCompletionWithDescriptions, + (const char *, uint32_t, int, int, lldb::SBStringList &, + lldb::SBStringList &)); + SB_REGISTER_METHOD( + int, SBCommandInterpreter, HandleCompletion, + (const char *, uint32_t, int, int, lldb::SBStringList &)); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, HasCommands, ()); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, HasAliases, ()); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, HasAliasOptions, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBCommandInterpreter, GetProcess, ()); + SB_REGISTER_METHOD(lldb::SBDebugger, SBCommandInterpreter, GetDebugger, ()); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, GetPromptOnQuit, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreter, SetPromptOnQuit, (bool)); + SB_REGISTER_METHOD(void, SBCommandInterpreter, AllowExitCodeOnQuit, (bool)); + SB_REGISTER_METHOD(bool, SBCommandInterpreter, HasCustomQuitExitCode, ()); + SB_REGISTER_METHOD(int, SBCommandInterpreter, GetQuitStatus, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreter, ResolveCommand, + (const char *, lldb::SBCommandReturnObject &)); + SB_REGISTER_METHOD(void, SBCommandInterpreter, + SourceInitFileInHomeDirectory, + (lldb::SBCommandReturnObject &)); + SB_REGISTER_METHOD(void, SBCommandInterpreter, + SourceInitFileInCurrentWorkingDirectory, + (lldb::SBCommandReturnObject &)); + SB_REGISTER_METHOD(lldb::SBBroadcaster, SBCommandInterpreter, + GetBroadcaster, ()); + SB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter, + GetBroadcasterClass, ()); + SB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter, + GetArgumentTypeAsCString, + (const lldb::CommandArgumentType)); + SB_REGISTER_STATIC_METHOD(const char *, SBCommandInterpreter, + GetArgumentDescriptionAsCString, + (const lldb::CommandArgumentType)); + SB_REGISTER_STATIC_METHOD(bool, SBCommandInterpreter, + EventIsCommandInterpreterEvent, + (const lldb::SBEvent &)); + SB_REGISTER_METHOD(lldb::SBCommand, SBCommandInterpreter, + AddMultiwordCommand, (const char *, const char *)); + SB_REGISTER_METHOD( + lldb::SBCommand, SBCommandInterpreter, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, const char *)); + SB_REGISTER_METHOD(lldb::SBCommand, SBCommandInterpreter, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, + const char *, const char *)); + SB_REGISTER_CONSTRUCTOR(SBCommand, ()); + SB_REGISTER_METHOD(bool, SBCommand, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBCommand, GetName, ()); + SB_REGISTER_METHOD(const char *, SBCommand, GetHelp, ()); + SB_REGISTER_METHOD(const char *, SBCommand, GetHelpLong, ()); + SB_REGISTER_METHOD(void, SBCommand, SetHelp, (const char *)); + SB_REGISTER_METHOD(void, SBCommand, SetHelpLong, (const char *)); + SB_REGISTER_METHOD(lldb::SBCommand, SBCommand, AddMultiwordCommand, + (const char *, const char *)); + SB_REGISTER_METHOD( + lldb::SBCommand, SBCommand, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, const char *)); + SB_REGISTER_METHOD(lldb::SBCommand, SBCommand, AddCommand, + (const char *, lldb::SBCommandPluginInterface *, + const char *, const char *)); + SB_REGISTER_METHOD(uint32_t, SBCommand, GetFlags, ()); + SB_REGISTER_METHOD(void, SBCommand, SetFlags, (uint32_t)); + } + + // SBCommandInterpreterRunOptions + { + SB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunOptions, ()); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetStopOnContinue, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnContinue, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetStopOnError, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnError, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetStopOnCrash, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnCrash, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetEchoCommands, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetEchoCommands, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetEchoCommentCommands, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, + SetEchoCommentCommands, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetPrintResults, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetPrintResults, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetAddToHistory, ()); + SB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetAddToHistory, + (bool)); + } + + // SBCommandReturnObject + { + SB_REGISTER_CONSTRUCTOR(SBCommandReturnObject, ()); + SB_REGISTER_CONSTRUCTOR(SBCommandReturnObject, + (const lldb::SBCommandReturnObject &)); + SB_REGISTER_CONSTRUCTOR(SBCommandReturnObject, + (lldb_private::CommandReturnObject *)); + SB_REGISTER_METHOD(lldb_private::CommandReturnObject *, + SBCommandReturnObject, Release, ()); + SB_REGISTER_METHOD( + const lldb::SBCommandReturnObject &, + SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &)); + SB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetOutput, ()); + SB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetError, ()); + SB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetOutputSize, ()); + SB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetErrorSize, ()); + SB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *)); + SB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, Clear, ()); + SB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandReturnObject, GetStatus, + ()); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetStatus, + (lldb::ReturnStatus)); + SB_REGISTER_METHOD(bool, SBCommandReturnObject, Succeeded, ()); + SB_REGISTER_METHOD(bool, SBCommandReturnObject, HasResult, ()); + SB_REGISTER_METHOD(void, SBCommandReturnObject, AppendMessage, + (const char *)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, AppendWarning, + (const char *)); + SB_REGISTER_METHOD(bool, SBCommandReturnObject, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile, + (FILE *)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile, + (FILE *)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile, + (FILE *, bool)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile, + (FILE *, bool)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, PutCString, + (const char *, int)); + SB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetOutput, (bool)); + SB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetError, (bool)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetError, + (lldb::SBError &, const char *)); + SB_REGISTER_METHOD(void, SBCommandReturnObject, SetError, (const char *)); + } + + // SBCommunication + { + SB_REGISTER_CONSTRUCTOR(SBCommunication, ()); + SB_REGISTER_CONSTRUCTOR(SBCommunication, (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBCommunication, IsValid, ()); + SB_REGISTER_METHOD(bool, SBCommunication, GetCloseOnEOF, ()); + SB_REGISTER_METHOD(void, SBCommunication, SetCloseOnEOF, (bool)); + SB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, Connect, + (const char *)); + SB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, + AdoptFileDesriptor, (int, bool)); + SB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, Disconnect, ()); + SB_REGISTER_METHOD_CONST(bool, SBCommunication, IsConnected, ()); + SB_REGISTER_METHOD(bool, SBCommunication, ReadThreadStart, ()); + SB_REGISTER_METHOD(bool, SBCommunication, ReadThreadStop, ()); + SB_REGISTER_METHOD(bool, SBCommunication, ReadThreadIsRunning, ()); + SB_REGISTER_METHOD(lldb::SBBroadcaster, SBCommunication, GetBroadcaster, + ()); + SB_REGISTER_STATIC_METHOD(const char *, SBCommunication, + GetBroadcasterClass, ()); + } + + { + SB_REGISTER_CONSTRUCTOR(SBCompileUnit, ()); + SB_REGISTER_CONSTRUCTOR(SBCompileUnit, (const lldb::SBCompileUnit &)); + SB_REGISTER_METHOD(const lldb::SBCompileUnit &, + SBCompileUnit, operator=,(const lldb::SBCompileUnit &)); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit, GetFileSpec, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, GetNumLineEntries, ()); + SB_REGISTER_METHOD_CONST(lldb::SBLineEntry, SBCompileUnit, + GetLineEntryAtIndex, (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex, + (uint32_t, uint32_t, lldb::SBFileSpec *)); + SB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, FindLineEntryIndex, + (uint32_t, uint32_t, lldb::SBFileSpec *, bool)); + SB_REGISTER_METHOD_CONST(uint32_t, SBCompileUnit, GetNumSupportFiles, ()); + SB_REGISTER_METHOD(lldb::SBTypeList, SBCompileUnit, GetTypes, (uint32_t)); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit, + GetSupportFileAtIndex, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBCompileUnit, FindSupportFileIndex, + (uint32_t, const lldb::SBFileSpec &, bool)); + SB_REGISTER_METHOD(lldb::LanguageType, SBCompileUnit, GetLanguage, ()); + SB_REGISTER_METHOD_CONST(bool, SBCompileUnit, IsValid, ()); + SB_REGISTER_METHOD_CONST( + bool, SBCompileUnit, operator==,(const lldb::SBCompileUnit &)); + SB_REGISTER_METHOD_CONST( + bool, SBCompileUnit, operator!=,(const lldb::SBCompileUnit &)); + SB_REGISTER_METHOD(bool, SBCompileUnit, GetDescription, (lldb::SBStream &)); + } + + // SBData + { + SB_REGISTER_CONSTRUCTOR(SBData, ()); + SB_REGISTER_CONSTRUCTOR(SBData, (const lldb::SBData &)); + SB_REGISTER_METHOD(const lldb::SBData &, + SBData, operator=,(const lldb::SBData &)); + SB_REGISTER_METHOD(bool, SBData, IsValid, ()); + SB_REGISTER_METHOD(uint8_t, SBData, GetAddressByteSize, ()); + SB_REGISTER_METHOD(void, SBData, SetAddressByteSize, (uint8_t)); + SB_REGISTER_METHOD(void, SBData, Clear, ()); + SB_REGISTER_METHOD(size_t, SBData, GetByteSize, ()); + SB_REGISTER_METHOD(lldb::ByteOrder, SBData, GetByteOrder, ()); + SB_REGISTER_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder)); + SB_REGISTER_METHOD(float, SBData, GetFloat, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(double, SBData, GetDouble, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(long double, SBData, GetLongDouble, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(lldb::addr_t, SBData, GetAddress, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(uint8_t, SBData, GetUnsignedInt8, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(uint16_t, SBData, GetUnsignedInt16, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(uint32_t, SBData, GetUnsignedInt32, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(uint64_t, SBData, GetUnsignedInt64, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(int8_t, SBData, GetSignedInt8, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(int16_t, SBData, GetSignedInt16, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(int32_t, SBData, GetSignedInt32, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(int64_t, SBData, GetSignedInt64, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(const char *, SBData, GetString, + (lldb::SBError &, lldb::offset_t)); + SB_REGISTER_METHOD(bool, SBData, GetDescription, + (lldb::SBStream &, lldb::addr_t)); + SB_REGISTER_METHOD(bool, SBData, Append, (const lldb::SBData &)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromCString, + (lldb::ByteOrder, uint32_t, const char *)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt64Array, + (lldb::ByteOrder, uint32_t, uint64_t *, size_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromUInt32Array, + (lldb::ByteOrder, uint32_t, uint32_t *, size_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt64Array, + (lldb::ByteOrder, uint32_t, int64_t *, size_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromSInt32Array, + (lldb::ByteOrder, uint32_t, int32_t *, size_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBData, SBData, CreateDataFromDoubleArray, + (lldb::ByteOrder, uint32_t, double *, size_t)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromCString, (const char *)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromUInt64Array, + (uint64_t *, size_t)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromUInt32Array, + (uint32_t *, size_t)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromSInt64Array, + (int64_t *, size_t)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromSInt32Array, + (int32_t *, size_t)); + SB_REGISTER_METHOD(bool, SBData, SetDataFromDoubleArray, + (double *, size_t)); + } + + // SBDeclaration + { + SB_REGISTER_CONSTRUCTOR(SBDeclaration, ()); + SB_REGISTER_CONSTRUCTOR(SBDeclaration, (const lldb::SBDeclaration &)); + SB_REGISTER_METHOD(const lldb::SBDeclaration &, + SBDeclaration, operator=,(const lldb::SBDeclaration &)); + SB_REGISTER_METHOD_CONST(bool, SBDeclaration, IsValid, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBDeclaration, GetFileSpec, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBDeclaration, GetLine, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBDeclaration, GetColumn, ()); + SB_REGISTER_METHOD(void, SBDeclaration, SetFileSpec, (lldb::SBFileSpec)); + SB_REGISTER_METHOD(void, SBDeclaration, SetLine, (uint32_t)); + SB_REGISTER_METHOD(void, SBDeclaration, SetColumn, (uint32_t)); + SB_REGISTER_METHOD_CONST( + bool, SBDeclaration, operator==,(const lldb::SBDeclaration &)); + SB_REGISTER_METHOD_CONST( + bool, SBDeclaration, operator!=,(const lldb::SBDeclaration &)); + SB_REGISTER_METHOD(bool, SBDeclaration, GetDescription, (lldb::SBStream &)); + } + + // SBError + { + SB_REGISTER_CONSTRUCTOR(SBError, ()); + SB_REGISTER_CONSTRUCTOR(SBError, (const lldb::SBError &)); + SB_REGISTER_METHOD(const lldb::SBError &, + SBError, operator=,(const lldb::SBError &)); + SB_REGISTER_METHOD_CONST(const char *, SBError, GetCString, ()); + SB_REGISTER_METHOD(void, SBError, Clear, ()); + SB_REGISTER_METHOD_CONST(bool, SBError, Fail, ()); + SB_REGISTER_METHOD_CONST(bool, SBError, Success, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBError, GetError, ()); + SB_REGISTER_METHOD_CONST(lldb::ErrorType, SBError, GetType, ()); + SB_REGISTER_METHOD(void, SBError, SetError, (uint32_t, lldb::ErrorType)); + SB_REGISTER_METHOD(void, SBError, SetErrorToErrno, ()); + SB_REGISTER_METHOD(void, SBError, SetErrorToGenericError, ()); + SB_REGISTER_METHOD(void, SBError, SetErrorString, (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBError, IsValid, ()); + SB_REGISTER_METHOD(bool, SBError, GetDescription, (lldb::SBStream &)); + } + + // SBEvent + { + SB_REGISTER_CONSTRUCTOR(SBEvent, ()); + SB_REGISTER_CONSTRUCTOR(SBEvent, (uint32_t, const char *, uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBEvent, (lldb::EventSP &)); + SB_REGISTER_CONSTRUCTOR(SBEvent, (lldb_private::Event *)); + SB_REGISTER_CONSTRUCTOR(SBEvent, (const lldb::SBEvent &)); + SB_REGISTER_METHOD(const lldb::SBEvent &, + SBEvent, operator=,(const lldb::SBEvent &)); + SB_REGISTER_METHOD(const char *, SBEvent, GetDataFlavor, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBEvent, GetType, ()); + SB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBEvent, GetBroadcaster, ()); + SB_REGISTER_METHOD_CONST(const char *, SBEvent, GetBroadcasterClass, ()); + SB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesPtr, + (const lldb::SBBroadcaster *)); + SB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesRef, + (const lldb::SBBroadcaster &)); + SB_REGISTER_METHOD(void, SBEvent, Clear, ()); + SB_REGISTER_METHOD_CONST(bool, SBEvent, IsValid, ()); + SB_REGISTER_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBEvent, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(bool, SBEvent, GetDescription, (lldb::SBStream &)); + } + + // SBExecutionContext + { + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, ()); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, + (const lldb::SBExecutionContext &)); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, (lldb::ExecutionContextRefSP)); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBTarget &)); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBProcess &)); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, (lldb::SBThread)); + SB_REGISTER_CONSTRUCTOR(SBExecutionContext, (const lldb::SBFrame &)); + SB_REGISTER_METHOD( + const lldb::SBExecutionContext &, + SBExecutionContext, operator=,(const lldb::SBExecutionContext &)); + SB_REGISTER_METHOD_CONST(lldb::SBTarget, SBExecutionContext, GetTarget, ()); + SB_REGISTER_METHOD_CONST(lldb::SBProcess, SBExecutionContext, GetProcess, + ()); + SB_REGISTER_METHOD_CONST(lldb::SBThread, SBExecutionContext, GetThread, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFrame, SBExecutionContext, GetFrame, ()); + } + + // SBExpressionOptions + { + SB_REGISTER_CONSTRUCTOR(SBExpressionOptions, ()); + SB_REGISTER_CONSTRUCTOR(SBExpressionOptions, + (const lldb::SBExpressionOptions &)); + SB_REGISTER_METHOD( + const lldb::SBExpressionOptions &, + SBExpressionOptions, operator=,(const lldb::SBExpressionOptions &)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetCoerceResultToId, + ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetCoerceResultToId, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetUnwindOnError, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetUnwindOnError, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetIgnoreBreakpoints, + ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetIgnoreBreakpoints, (bool)); + SB_REGISTER_METHOD_CONST(lldb::DynamicValueType, SBExpressionOptions, + GetFetchDynamicValue, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetFetchDynamicValue, + (lldb::DynamicValueType)); + SB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions, + GetTimeoutInMicroSeconds, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetTimeoutInMicroSeconds, + (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions, + GetOneThreadTimeoutInMicroSeconds, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, + SetOneThreadTimeoutInMicroSeconds, (uint32_t)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTryAllThreads, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetTryAllThreads, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetStopOthers, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetStopOthers, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTrapExceptions, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetTrapExceptions, (bool)); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetLanguage, + (lldb::LanguageType)); + SB_REGISTER_METHOD(bool, SBExpressionOptions, GetGenerateDebugInfo, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetGenerateDebugInfo, (bool)); + SB_REGISTER_METHOD(bool, SBExpressionOptions, GetSuppressPersistentResult, + ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetSuppressPersistentResult, + (bool)); + SB_REGISTER_METHOD_CONST(const char *, SBExpressionOptions, GetPrefix, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetPrefix, (const char *)); + SB_REGISTER_METHOD(bool, SBExpressionOptions, GetAutoApplyFixIts, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetAutoApplyFixIts, (bool)); + SB_REGISTER_METHOD(bool, SBExpressionOptions, GetTopLevel, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetTopLevel, (bool)); + SB_REGISTER_METHOD(bool, SBExpressionOptions, GetAllowJIT, ()); + SB_REGISTER_METHOD(void, SBExpressionOptions, SetAllowJIT, (bool)); + } + + // SBFileSpecList + { + SB_REGISTER_CONSTRUCTOR(SBFileSpecList, ()); + SB_REGISTER_CONSTRUCTOR(SBFileSpecList, (const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD( + const lldb::SBFileSpecList &, + SBFileSpecList, operator=,(const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBFileSpecList, GetSize, ()); + SB_REGISTER_METHOD(void, SBFileSpecList, Append, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(bool, SBFileSpecList, AppendIfUnique, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(void, SBFileSpecList, Clear, ()); + SB_REGISTER_METHOD(uint32_t, SBFileSpecList, FindFileIndex, + (uint32_t, const lldb::SBFileSpec &, bool)); + SB_REGISTER_METHOD_CONST(const lldb::SBFileSpec, SBFileSpecList, + GetFileSpecAtIndex, (uint32_t)); + SB_REGISTER_METHOD_CONST(bool, SBFileSpecList, GetDescription, + (lldb::SBStream &)); + } + + // SBFrame + { + SB_REGISTER_CONSTRUCTOR(SBFrame, ()); + SB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &)); + SB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::SBFrame &)); + SB_REGISTER_METHOD(const lldb::SBFrame &, + SBFrame, operator=,(const lldb::SBFrame &)); + SB_REGISTER_METHOD_CONST(bool, SBFrame, IsValid, ()); + SB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext, + (uint32_t)); + SB_REGISTER_METHOD_CONST(lldb::SBModule, SBFrame, GetModule, ()); + SB_REGISTER_METHOD_CONST(lldb::SBCompileUnit, SBFrame, GetCompileUnit, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFunction, SBFrame, GetFunction, ()); + SB_REGISTER_METHOD_CONST(lldb::SBSymbol, SBFrame, GetSymbol, ()); + SB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetBlock, ()); + SB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetFrameBlock, ()); + SB_REGISTER_METHOD_CONST(lldb::SBLineEntry, SBFrame, GetLineEntry, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBFrame, GetFrameID, ()); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetCFA, ()); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetPC, ()); + SB_REGISTER_METHOD(bool, SBFrame, SetPC, (lldb::addr_t)); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetSP, ()); + SB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetFP, ()); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBFrame, GetPCAddress, ()); + SB_REGISTER_METHOD(void, SBFrame, Clear, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath, + (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath, + (const char *, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable, (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable, + (const char *, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindValue, + (const char *, lldb::ValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindValue, + (const char *, lldb::ValueType, lldb::DynamicValueType)); + SB_REGISTER_METHOD_CONST(bool, SBFrame, IsEqual, (const lldb::SBFrame &)); + SB_REGISTER_METHOD_CONST(bool, SBFrame, operator==,(const lldb::SBFrame &)); + SB_REGISTER_METHOD_CONST(bool, SBFrame, operator!=,(const lldb::SBFrame &)); + SB_REGISTER_METHOD_CONST(lldb::SBThread, SBFrame, GetThread, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFrame, Disassemble, ()); + SB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (bool, bool, bool, bool)); + SB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (bool, bool, bool, bool, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables, + (const lldb::SBVariablesOptions &)); + SB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetRegisters, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *)); + SB_REGISTER_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, lldb::DynamicValueType, bool)); + SB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, + (const char *, const lldb::SBExpressionOptions &)); + SB_REGISTER_METHOD(bool, SBFrame, IsInlined, ()); + SB_REGISTER_METHOD_CONST(bool, SBFrame, IsInlined, ()); + SB_REGISTER_METHOD(bool, SBFrame, IsArtificial, ()); + SB_REGISTER_METHOD_CONST(bool, SBFrame, IsArtificial, ()); + SB_REGISTER_METHOD(const char *, SBFrame, GetFunctionName, ()); + SB_REGISTER_METHOD_CONST(lldb::LanguageType, SBFrame, GuessLanguage, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFrame, GetFunctionName, ()); + SB_REGISTER_METHOD(const char *, SBFrame, GetDisplayFunctionName, ()); + } + + // SBFunction + { + SB_REGISTER_CONSTRUCTOR(SBFunction, ()); + SB_REGISTER_CONSTRUCTOR(SBFunction, (const lldb::SBFunction &)); + SB_REGISTER_METHOD(const lldb::SBFunction &, + SBFunction, operator=,(const lldb::SBFunction &)); + SB_REGISTER_METHOD_CONST(bool, SBFunction, IsValid, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFunction, GetName, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFunction, GetDisplayName, ()); + SB_REGISTER_METHOD_CONST(const char *, SBFunction, GetMangledName, ()); + SB_REGISTER_METHOD_CONST(bool, + SBFunction, operator==,(const lldb::SBFunction &)); + SB_REGISTER_METHOD_CONST(bool, + SBFunction, operator!=,(const lldb::SBFunction &)); + SB_REGISTER_METHOD(bool, SBFunction, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions, + (lldb::SBTarget)); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions, + (lldb::SBTarget, const char *)); + SB_REGISTER_METHOD(lldb::SBAddress, SBFunction, GetStartAddress, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBFunction, GetEndAddress, ()); + SB_REGISTER_METHOD(const char *, SBFunction, GetArgumentName, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBFunction, GetPrologueByteSize, ()); + SB_REGISTER_METHOD(lldb::SBType, SBFunction, GetType, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBFunction, GetBlock, ()); + SB_REGISTER_METHOD(lldb::LanguageType, SBFunction, GetLanguage, ()); + SB_REGISTER_METHOD(bool, SBFunction, GetIsOptimized, ()); + } + + // SBInitializerOptions + { + SB_REGISTER_CONSTRUCTOR(SBInitializerOptions, + (const lldb::SBInitializerOptions &)); + SB_REGISTER_METHOD( + const lldb::SBInitializerOptions &, + SBInitializerOptions, operator=,(const lldb::SBInitializerOptions &)); + SB_REGISTER_CONSTRUCTOR(SBInitializerOptions, ()); + SB_REGISTER_METHOD(void, SBInitializerOptions, SetCaptureReproducer, + (bool)); + SB_REGISTER_METHOD(void, SBInitializerOptions, SetReplayReproducer, (bool)); + SB_REGISTER_METHOD(void, SBInitializerOptions, SetReproducerPath, + (const char *)); + } + + // SBInstruction + { + SB_REGISTER_CONSTRUCTOR(SBInstruction, ()); + SB_REGISTER_CONSTRUCTOR(SBInstruction, (const lldb::SBInstruction &)); + SB_REGISTER_METHOD(const lldb::SBInstruction &, + SBInstruction, operator=,(const lldb::SBInstruction &)); + SB_REGISTER_METHOD(bool, SBInstruction, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBInstruction, GetAddress, ()); + SB_REGISTER_METHOD(const char *, SBInstruction, GetMnemonic, + (lldb::SBTarget)); + SB_REGISTER_METHOD(const char *, SBInstruction, GetOperands, + (lldb::SBTarget)); + SB_REGISTER_METHOD(const char *, SBInstruction, GetComment, + (lldb::SBTarget)); + SB_REGISTER_METHOD(size_t, SBInstruction, GetByteSize, ()); + SB_REGISTER_METHOD(lldb::SBData, SBInstruction, GetData, (lldb::SBTarget)); + SB_REGISTER_METHOD(bool, SBInstruction, DoesBranch, ()); + SB_REGISTER_METHOD(bool, SBInstruction, HasDelaySlot, ()); + SB_REGISTER_METHOD(bool, SBInstruction, CanSetBreakpoint, ()); + SB_REGISTER_METHOD(bool, SBInstruction, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBInstruction, Print, (FILE *)); + SB_REGISTER_METHOD(bool, SBInstruction, EmulateWithFrame, + (lldb::SBFrame &, uint32_t)); + SB_REGISTER_METHOD(bool, SBInstruction, DumpEmulation, (const char *)); + SB_REGISTER_METHOD(bool, SBInstruction, TestEmulation, + (lldb::SBStream &, const char *)); + } + + // SBInstructionList + { + SB_REGISTER_CONSTRUCTOR(SBInstructionList, ()); + SB_REGISTER_CONSTRUCTOR(SBInstructionList, + (const lldb::SBInstructionList &)); + SB_REGISTER_METHOD( + const lldb::SBInstructionList &, + SBInstructionList, operator=,(const lldb::SBInstructionList &)); + SB_REGISTER_METHOD_CONST(bool, SBInstructionList, IsValid, ()); + SB_REGISTER_METHOD(size_t, SBInstructionList, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBInstruction, SBInstructionList, + GetInstructionAtIndex, (uint32_t)); + SB_REGISTER_METHOD( + size_t, SBInstructionList, GetInstructionsCount, + (const lldb::SBAddress &, const lldb::SBAddress &, bool)); + SB_REGISTER_METHOD(void, SBInstructionList, Clear, ()); + SB_REGISTER_METHOD(void, SBInstructionList, AppendInstruction, + (lldb::SBInstruction)); + SB_REGISTER_METHOD(void, SBInstructionList, Print, (FILE *)); + SB_REGISTER_METHOD(bool, SBInstructionList, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD(bool, SBInstructionList, DumpEmulationForAllInstructions, + (const char *)); + } + + // SBLanguageRuntime + { + SB_REGISTER_STATIC_METHOD(lldb::LanguageType, SBLanguageRuntime, + GetLanguageTypeFromString, (const char *)); + SB_REGISTER_STATIC_METHOD(const char *, SBLanguageRuntime, + GetNameForLanguageType, (lldb::LanguageType)); + } + + // SBLaunchInfo + { + SB_REGISTER_CONSTRUCTOR(SBLaunchInfo, (const char **)); + SB_REGISTER_METHOD(lldb::pid_t, SBLaunchInfo, GetProcessID, ()); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetUserID, ()); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetGroupID, ()); + SB_REGISTER_METHOD(bool, SBLaunchInfo, UserIDIsValid, ()); + SB_REGISTER_METHOD(bool, SBLaunchInfo, GroupIDIsValid, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetUserID, (uint32_t)); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetGroupID, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBLaunchInfo, GetExecutableFile, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetExecutableFile, + (lldb::SBFileSpec, bool)); + SB_REGISTER_METHOD(lldb::SBListener, SBLaunchInfo, GetListener, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetListener, (lldb::SBListener &)); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetNumArguments, ()); + SB_REGISTER_METHOD(const char *, SBLaunchInfo, GetArgumentAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetArguments, (const char **, bool)); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetNumEnvironmentEntries, ()); + SB_REGISTER_METHOD(const char *, SBLaunchInfo, GetEnvironmentEntryAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetEnvironmentEntries, + (const char **, bool)); + SB_REGISTER_METHOD(void, SBLaunchInfo, Clear, ()); + SB_REGISTER_METHOD_CONST(const char *, SBLaunchInfo, GetWorkingDirectory, + ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetWorkingDirectory, (const char *)); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetLaunchFlags, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetLaunchFlags, (uint32_t)); + SB_REGISTER_METHOD(const char *, SBLaunchInfo, GetProcessPluginName, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetProcessPluginName, + (const char *)); + SB_REGISTER_METHOD(const char *, SBLaunchInfo, GetShell, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetShell, (const char *)); + SB_REGISTER_METHOD(bool, SBLaunchInfo, GetShellExpandArguments, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetShellExpandArguments, (bool)); + SB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetResumeCount, ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetResumeCount, (uint32_t)); + SB_REGISTER_METHOD(bool, SBLaunchInfo, AddCloseFileAction, (int)); + SB_REGISTER_METHOD(bool, SBLaunchInfo, AddDuplicateFileAction, (int, int)); + SB_REGISTER_METHOD(bool, SBLaunchInfo, AddOpenFileAction, + (int, const char *, bool, bool)); + SB_REGISTER_METHOD(bool, SBLaunchInfo, AddSuppressFileAction, + (int, bool, bool)); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetLaunchEventData, (const char *)); + SB_REGISTER_METHOD_CONST(const char *, SBLaunchInfo, GetLaunchEventData, + ()); + SB_REGISTER_METHOD(void, SBLaunchInfo, SetDetachOnError, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBLaunchInfo, GetDetachOnError, ()); + } + + // SBLineEntry + { + SB_REGISTER_CONSTRUCTOR(SBLineEntry, ()); + SB_REGISTER_CONSTRUCTOR(SBLineEntry, (const lldb::SBLineEntry &)); + SB_REGISTER_METHOD(const lldb::SBLineEntry &, + SBLineEntry, operator=,(const lldb::SBLineEntry &)); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBLineEntry, GetStartAddress, ()); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBLineEntry, GetEndAddress, ()); + SB_REGISTER_METHOD_CONST(bool, SBLineEntry, IsValid, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBLineEntry, GetFileSpec, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetLine, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetColumn, ()); + SB_REGISTER_METHOD(void, SBLineEntry, SetFileSpec, (lldb::SBFileSpec)); + SB_REGISTER_METHOD(void, SBLineEntry, SetLine, (uint32_t)); + SB_REGISTER_METHOD(void, SBLineEntry, SetColumn, (uint32_t)); + SB_REGISTER_METHOD_CONST( + bool, SBLineEntry, operator==,(const lldb::SBLineEntry &)); + SB_REGISTER_METHOD_CONST( + bool, SBLineEntry, operator!=,(const lldb::SBLineEntry &)); + SB_REGISTER_METHOD(bool, SBLineEntry, GetDescription, (lldb::SBStream &)); + } + + // SBListener + { + SB_REGISTER_CONSTRUCTOR(SBListener, ()); + SB_REGISTER_CONSTRUCTOR(SBListener, (const char *)); + SB_REGISTER_CONSTRUCTOR(SBListener, (const lldb::SBListener &)); + SB_REGISTER_METHOD(const lldb::SBListener &, + SBListener, operator=,(const lldb::SBListener &)); + SB_REGISTER_METHOD_CONST(bool, SBListener, IsValid, ()); + SB_REGISTER_METHOD(void, SBListener, AddEvent, (const lldb::SBEvent &)); + SB_REGISTER_METHOD(void, SBListener, Clear, ()); + SB_REGISTER_METHOD(uint32_t, SBListener, StartListeningForEventClass, + (lldb::SBDebugger &, const char *, uint32_t)); + SB_REGISTER_METHOD(bool, SBListener, StopListeningForEventClass, + (lldb::SBDebugger &, const char *, uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBListener, StartListeningForEvents, + (const lldb::SBBroadcaster &, uint32_t)); + SB_REGISTER_METHOD(bool, SBListener, StopListeningForEvents, + (const lldb::SBBroadcaster &, uint32_t)); + SB_REGISTER_METHOD(bool, SBListener, WaitForEvent, + (uint32_t, lldb::SBEvent &)); + SB_REGISTER_METHOD( + bool, SBListener, WaitForEventForBroadcaster, + (uint32_t, const lldb::SBBroadcaster &, lldb::SBEvent &)); + SB_REGISTER_METHOD( + bool, SBListener, WaitForEventForBroadcasterWithType, + (uint32_t, const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBListener, PeekAtNextEvent, (lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBListener, PeekAtNextEventForBroadcaster, + (const lldb::SBBroadcaster &, lldb::SBEvent &)); + SB_REGISTER_METHOD( + bool, SBListener, PeekAtNextEventForBroadcasterWithType, + (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBListener, GetNextEvent, (lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBListener, GetNextEventForBroadcaster, + (const lldb::SBBroadcaster &, lldb::SBEvent &)); + SB_REGISTER_METHOD( + bool, SBListener, GetNextEventForBroadcasterWithType, + (const lldb::SBBroadcaster &, uint32_t, lldb::SBEvent &)); + SB_REGISTER_METHOD(bool, SBListener, HandleBroadcastEvent, + (const lldb::SBEvent &)); + } + + // SBMemoryRegionInfo + { + SB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfo, ()); + SB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfo, + (const lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD( + const lldb::SBMemoryRegionInfo &, + SBMemoryRegionInfo, operator=,(const lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD(void, SBMemoryRegionInfo, Clear, ()); + SB_REGISTER_METHOD_CONST( + bool, + SBMemoryRegionInfo, operator==,(const lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD_CONST( + bool, + SBMemoryRegionInfo, operator!=,(const lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetRegionBase, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetRegionEnd, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsReadable, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsWritable, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsExecutable, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfo, IsMapped, ()); + SB_REGISTER_METHOD(const char *, SBMemoryRegionInfo, GetName, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfo, GetDescription, + (lldb::SBStream &)); + } + + // SBMemoryRegionInfoList + { + SB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfoList, ()); + SB_REGISTER_CONSTRUCTOR(SBMemoryRegionInfoList, + (const lldb::SBMemoryRegionInfoList &)); + SB_REGISTER_METHOD( + const lldb::SBMemoryRegionInfoList &, + SBMemoryRegionInfoList, operator=,( + const lldb::SBMemoryRegionInfoList &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBMemoryRegionInfoList, GetSize, ()); + SB_REGISTER_METHOD(bool, SBMemoryRegionInfoList, GetMemoryRegionAtIndex, + (uint32_t, lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Clear, ()); + SB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Append, + (lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD(void, SBMemoryRegionInfoList, Append, + (lldb::SBMemoryRegionInfoList &)); + } + + // SBModule + { + SB_REGISTER_CONSTRUCTOR(SBModule, ()); + SB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModuleSpec &)); + SB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModule &)); + SB_REGISTER_CONSTRUCTOR(SBModule, (lldb::SBProcess &, lldb::addr_t)); + SB_REGISTER_METHOD(const lldb::SBModule &, + SBModule, operator=,(const lldb::SBModule &)); + SB_REGISTER_METHOD_CONST(bool, SBModule, IsValid, ()); + SB_REGISTER_METHOD(void, SBModule, Clear, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetFileSpec, ()); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetPlatformFileSpec, + ()); + SB_REGISTER_METHOD(bool, SBModule, SetPlatformFileSpec, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBModule, GetRemoteInstallFileSpec, + ()); + SB_REGISTER_METHOD(bool, SBModule, SetRemoteInstallFileSpec, + (lldb::SBFileSpec &)); + SB_REGISTER_METHOD_CONST(const uint8_t *, SBModule, GetUUIDBytes, ()); + SB_REGISTER_METHOD_CONST(const char *, SBModule, GetUUIDString, ()); + SB_REGISTER_METHOD_CONST(bool, + SBModule, operator==,(const lldb::SBModule &)); + SB_REGISTER_METHOD_CONST(bool, + SBModule, operator!=,(const lldb::SBModule &)); + SB_REGISTER_METHOD(lldb::SBAddress, SBModule, ResolveFileAddress, + (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBSymbolContext, SBModule, + ResolveSymbolContextForAddress, + (const lldb::SBAddress &, uint32_t)); + SB_REGISTER_METHOD(bool, SBModule, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(uint32_t, SBModule, GetNumCompileUnits, ()); + SB_REGISTER_METHOD(lldb::SBCompileUnit, SBModule, GetCompileUnitAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindCompileUnits, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(size_t, SBModule, GetNumSymbols, ()); + SB_REGISTER_METHOD(lldb::SBSymbol, SBModule, GetSymbolAtIndex, (size_t)); + SB_REGISTER_METHOD(lldb::SBSymbol, SBModule, FindSymbol, + (const char *, lldb::SymbolType)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindSymbols, + (const char *, lldb::SymbolType)); + SB_REGISTER_METHOD(size_t, SBModule, GetNumSections, ()); + SB_REGISTER_METHOD(lldb::SBSection, SBModule, GetSectionAtIndex, (size_t)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindFunctions, + (const char *, uint32_t)); + SB_REGISTER_METHOD(lldb::SBValueList, SBModule, FindGlobalVariables, + (lldb::SBTarget &, const char *, uint32_t)); + SB_REGISTER_METHOD(lldb::SBValue, SBModule, FindFirstGlobalVariable, + (lldb::SBTarget &, const char *)); + SB_REGISTER_METHOD(lldb::SBType, SBModule, FindFirstType, (const char *)); + SB_REGISTER_METHOD(lldb::SBType, SBModule, GetBasicType, (lldb::BasicType)); + SB_REGISTER_METHOD(lldb::SBTypeList, SBModule, FindTypes, (const char *)); + SB_REGISTER_METHOD(lldb::SBType, SBModule, GetTypeByID, (lldb::user_id_t)); + SB_REGISTER_METHOD(lldb::SBTypeList, SBModule, GetTypes, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBSection, SBModule, FindSection, (const char *)); + SB_REGISTER_METHOD(lldb::ByteOrder, SBModule, GetByteOrder, ()); + SB_REGISTER_METHOD(const char *, SBModule, GetTriple, ()); + SB_REGISTER_METHOD(uint32_t, SBModule, GetAddressByteSize, ()); + SB_REGISTER_METHOD(uint32_t, SBModule, GetVersion, (uint32_t *, uint32_t)); + SB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetSymbolFileSpec, ()); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule, + GetObjectFileHeaderAddress, ()); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule, + GetObjectFileEntryPointAddress, ()); + } + + // SBModuleSpec + { + SB_REGISTER_CONSTRUCTOR(SBModuleSpec, ()); + SB_REGISTER_CONSTRUCTOR(SBModuleSpec, (const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD(const lldb::SBModuleSpec &, + SBModuleSpec, operator=,(const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD_CONST(bool, SBModuleSpec, IsValid, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, Clear, ()); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetFileSpec, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, SetFileSpec, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetPlatformFileSpec, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, SetPlatformFileSpec, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetSymbolFileSpec, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, SetSymbolFileSpec, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(const char *, SBModuleSpec, GetObjectName, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, SetObjectName, (const char *)); + SB_REGISTER_METHOD(const char *, SBModuleSpec, GetTriple, ()); + SB_REGISTER_METHOD(void, SBModuleSpec, SetTriple, (const char *)); + SB_REGISTER_METHOD(const uint8_t *, SBModuleSpec, GetUUIDBytes, ()); + SB_REGISTER_METHOD(size_t, SBModuleSpec, GetUUIDLength, ()); + // SB_REGISTER_METHOD(bool, SBModuleSpec, SetUUIDBytes, (const uint8_t *, + // size_t)); + SB_REGISTER_METHOD(bool, SBModuleSpec, GetDescription, (lldb::SBStream &)); + SB_REGISTER_CONSTRUCTOR(SBModuleSpecList, ()); + SB_REGISTER_CONSTRUCTOR(SBModuleSpecList, (const lldb::SBModuleSpecList &)); + SB_REGISTER_METHOD( + lldb::SBModuleSpecList &, + SBModuleSpecList, operator=,(const lldb::SBModuleSpecList &)); + SB_REGISTER_STATIC_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, + GetModuleSpecifications, (const char *)); + SB_REGISTER_METHOD(void, SBModuleSpecList, Append, + (const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD(void, SBModuleSpecList, Append, + (const lldb::SBModuleSpecList &)); + SB_REGISTER_METHOD(size_t, SBModuleSpecList, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList, GetSpecAtIndex, + (size_t)); + SB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList, + FindFirstMatchingSpec, (const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, + FindMatchingSpecs, (const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD(bool, SBModuleSpecList, GetDescription, + (lldb::SBStream &)); + } + + // SBPlatformConnectOptions + { + SB_REGISTER_CONSTRUCTOR(SBPlatformConnectOptions, (const char *)); + SB_REGISTER_CONSTRUCTOR(SBPlatformConnectOptions, + (const lldb::SBPlatformConnectOptions &)); + SB_REGISTER_METHOD( + void, + SBPlatformConnectOptions, operator=,( + const lldb::SBPlatformConnectOptions &)); + SB_REGISTER_METHOD(const char *, SBPlatformConnectOptions, GetURL, ()); + SB_REGISTER_METHOD(void, SBPlatformConnectOptions, SetURL, (const char *)); + SB_REGISTER_METHOD(bool, SBPlatformConnectOptions, GetRsyncEnabled, ()); + SB_REGISTER_METHOD(void, SBPlatformConnectOptions, EnableRsync, + (const char *, const char *, bool)); + SB_REGISTER_METHOD(void, SBPlatformConnectOptions, DisableRsync, ()); + SB_REGISTER_METHOD(const char *, SBPlatformConnectOptions, + GetLocalCacheDirectory, ()); + SB_REGISTER_METHOD(void, SBPlatformConnectOptions, SetLocalCacheDirectory, + (const char *)); + SB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand, (const char *)); + SB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand, + (const lldb::SBPlatformShellCommand &)); + SB_REGISTER_METHOD(void, SBPlatformShellCommand, Clear, ()); + SB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetCommand, ()); + SB_REGISTER_METHOD(void, SBPlatformShellCommand, SetCommand, + (const char *)); + SB_REGISTER_METHOD(const char *, SBPlatformShellCommand, + GetWorkingDirectory, ()); + SB_REGISTER_METHOD(void, SBPlatformShellCommand, SetWorkingDirectory, + (const char *)); + SB_REGISTER_METHOD(uint32_t, SBPlatformShellCommand, GetTimeoutSeconds, ()); + SB_REGISTER_METHOD(void, SBPlatformShellCommand, SetTimeoutSeconds, + (uint32_t)); + SB_REGISTER_METHOD(int, SBPlatformShellCommand, GetSignal, ()); + SB_REGISTER_METHOD(int, SBPlatformShellCommand, GetStatus, ()); + SB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetOutput, ()); + SB_REGISTER_CONSTRUCTOR(SBPlatform, ()); + SB_REGISTER_CONSTRUCTOR(SBPlatform, (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBPlatform, IsValid, ()); + SB_REGISTER_METHOD(void, SBPlatform, Clear, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetName, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetWorkingDirectory, ()); + SB_REGISTER_METHOD(bool, SBPlatform, SetWorkingDirectory, (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, ConnectRemote, + (lldb::SBPlatformConnectOptions &)); + SB_REGISTER_METHOD(void, SBPlatform, DisconnectRemote, ()); + SB_REGISTER_METHOD(bool, SBPlatform, IsConnected, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetTriple, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetOSBuild, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetOSDescription, ()); + SB_REGISTER_METHOD(const char *, SBPlatform, GetHostname, ()); + SB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSMajorVersion, ()); + SB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSMinorVersion, ()); + SB_REGISTER_METHOD(uint32_t, SBPlatform, GetOSUpdateVersion, ()); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Get, + (lldb::SBFileSpec &, lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Put, + (lldb::SBFileSpec &, lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Install, + (lldb::SBFileSpec &, lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Run, + (lldb::SBPlatformShellCommand &)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Launch, + (lldb::SBLaunchInfo &)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, Kill, (const lldb::pid_t)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, MakeDirectory, + (const char *, uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBPlatform, GetFilePermissions, + (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBPlatform, SetFilePermissions, + (const char *, uint32_t)); + SB_REGISTER_METHOD_CONST(lldb::SBUnixSignals, SBPlatform, GetUnixSignals, + ()); + } + + // SBProcess + { + SB_REGISTER_CONSTRUCTOR(SBProcess, ()); + SB_REGISTER_CONSTRUCTOR(SBProcess, (const lldb::SBProcess &)); + SB_REGISTER_CONSTRUCTOR(SBProcess, (const lldb::ProcessSP &)); + SB_REGISTER_METHOD(const lldb::SBProcess &, + SBProcess, operator=,(const lldb::SBProcess &)); + SB_REGISTER_STATIC_METHOD(const char *, SBProcess, GetBroadcasterClassName, + ()); + SB_REGISTER_METHOD(const char *, SBProcess, GetPluginName, ()); + SB_REGISTER_METHOD(const char *, SBProcess, GetShortPluginName, ()); + SB_REGISTER_METHOD(void, SBProcess, Clear, ()); + SB_REGISTER_METHOD_CONST(bool, SBProcess, IsValid, ()); + SB_REGISTER_METHOD(bool, SBProcess, RemoteLaunch, + (const char **, const char **, const char *, + const char *, const char *, const char *, uint32_t, + bool, lldb::SBError &)); + SB_REGISTER_METHOD(bool, SBProcess, RemoteAttachToProcessWithID, + (lldb::pid_t, lldb::SBError &)); + SB_REGISTER_METHOD(uint32_t, SBProcess, GetNumThreads, ()); + SB_REGISTER_METHOD_CONST(lldb::SBThread, SBProcess, GetSelectedThread, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBProcess, CreateOSPluginThread, + (lldb::tid_t, lldb::addr_t)); + SB_REGISTER_METHOD_CONST(lldb::SBTarget, SBProcess, GetTarget, ()); + SB_REGISTER_METHOD(size_t, SBProcess, PutSTDIN, (const char *, size_t)); + SB_REGISTER_METHOD_CONST(size_t, SBProcess, GetSTDOUT, (char *, size_t)); + SB_REGISTER_METHOD_CONST(size_t, SBProcess, GetSTDERR, (char *, size_t)); + SB_REGISTER_METHOD_CONST(size_t, SBProcess, GetAsyncProfileData, + (char *, size_t)); + SB_REGISTER_METHOD(lldb::SBTrace, SBProcess, StartTrace, + (lldb::SBTraceOptions &, lldb::SBError &)); + SB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState, + (const lldb::SBEvent &, FILE *)); + SB_REGISTER_METHOD(void, SBProcess, AppendEventStateReport, + (const lldb::SBEvent &, lldb::SBCommandReturnObject &)); + SB_REGISTER_METHOD(bool, SBProcess, SetSelectedThread, + (const lldb::SBThread &)); + SB_REGISTER_METHOD(bool, SBProcess, SetSelectedThreadByID, (lldb::tid_t)); + SB_REGISTER_METHOD(bool, SBProcess, SetSelectedThreadByIndexID, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadAtIndex, (size_t)); + SB_REGISTER_METHOD(uint32_t, SBProcess, GetNumQueues, ()); + SB_REGISTER_METHOD(lldb::SBQueue, SBProcess, GetQueueAtIndex, (size_t)); + SB_REGISTER_METHOD(uint32_t, SBProcess, GetStopID, (bool)); + SB_REGISTER_METHOD(lldb::SBEvent, SBProcess, GetStopEventForStopID, + (uint32_t)); + SB_REGISTER_METHOD(lldb::StateType, SBProcess, GetState, ()); + SB_REGISTER_METHOD(int, SBProcess, GetExitStatus, ()); + SB_REGISTER_METHOD(const char *, SBProcess, GetExitDescription, ()); + SB_REGISTER_METHOD(lldb::pid_t, SBProcess, GetProcessID, ()); + SB_REGISTER_METHOD(uint32_t, SBProcess, GetUniqueID, ()); + SB_REGISTER_METHOD_CONST(lldb::ByteOrder, SBProcess, GetByteOrder, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBProcess, GetAddressByteSize, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Continue, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Destroy, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Stop, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Kill, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Detach, ()); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Detach, (bool)); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, Signal, (int)); + SB_REGISTER_METHOD(lldb::SBUnixSignals, SBProcess, GetUnixSignals, ()); + SB_REGISTER_METHOD(void, SBProcess, SendAsyncInterrupt, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadByID, (lldb::tid_t)); + SB_REGISTER_METHOD(lldb::SBThread, SBProcess, GetThreadByIndexID, + (uint32_t)); + SB_REGISTER_STATIC_METHOD(lldb::StateType, SBProcess, GetStateFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(bool, SBProcess, GetRestartedFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(size_t, SBProcess, + GetNumRestartedReasonsFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(const char *, SBProcess, + GetRestartedReasonAtIndexFromEvent, + (const lldb::SBEvent &, size_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBProcess, SBProcess, GetProcessFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(bool, SBProcess, GetInterruptedFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBStructuredData, SBProcess, + GetStructuredDataFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(bool, SBProcess, EventIsProcessEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(bool, SBProcess, EventIsStructuredDataEvent, + (const lldb::SBEvent &)); + SB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBProcess, GetBroadcaster, + ()); + SB_REGISTER_STATIC_METHOD(const char *, SBProcess, GetBroadcasterClass, ()); + SB_REGISTER_METHOD(uint64_t, SBProcess, ReadUnsignedFromMemory, + (lldb::addr_t, uint32_t, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::addr_t, SBProcess, ReadPointerFromMemory, + (lldb::addr_t, lldb::SBError &)); + SB_REGISTER_METHOD(bool, SBProcess, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBProcess, + GetNumSupportedHardwareWatchpoints, + (lldb::SBError &)); + SB_REGISTER_METHOD(uint32_t, SBProcess, LoadImage, + (lldb::SBFileSpec &, lldb::SBError &)); + SB_REGISTER_METHOD( + uint32_t, SBProcess, LoadImage, + (const lldb::SBFileSpec &, const lldb::SBFileSpec &, lldb::SBError &)); + SB_REGISTER_METHOD(uint32_t, SBProcess, LoadImageUsingPaths, + (const lldb::SBFileSpec &, lldb::SBStringList &, + lldb::SBFileSpec &, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, UnloadImage, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, SendEventData, (const char *)); + SB_REGISTER_METHOD(uint32_t, SBProcess, GetNumExtendedBacktraceTypes, ()); + SB_REGISTER_METHOD(const char *, SBProcess, GetExtendedBacktraceTypeAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBThreadCollection, SBProcess, GetHistoryThreads, + (lldb::addr_t)); + SB_REGISTER_METHOD(bool, SBProcess, IsInstrumentationRuntimePresent, + (lldb::InstrumentationRuntimeType)); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, SaveCore, (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBProcess, GetMemoryRegionInfo, + (lldb::addr_t, lldb::SBMemoryRegionInfo &)); + SB_REGISTER_METHOD(lldb::SBMemoryRegionInfoList, SBProcess, + GetMemoryRegions, ()); + SB_REGISTER_METHOD(lldb::SBProcessInfo, SBProcess, GetProcessInfo, ()); + } + + // SBProcessInfo + { + SB_REGISTER_CONSTRUCTOR(SBProcessInfo, ()); + SB_REGISTER_CONSTRUCTOR(SBProcessInfo, (const lldb::SBProcessInfo &)); + SB_REGISTER_METHOD(lldb::SBProcessInfo &, + SBProcessInfo, operator=,(const lldb::SBProcessInfo &)); + SB_REGISTER_METHOD_CONST(bool, SBProcessInfo, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBProcessInfo, GetName, ()); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBProcessInfo, GetExecutableFile, ()); + SB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetProcessID, ()); + SB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetUserID, ()); + SB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetGroupID, ()); + SB_REGISTER_METHOD(bool, SBProcessInfo, UserIDIsValid, ()); + SB_REGISTER_METHOD(bool, SBProcessInfo, GroupIDIsValid, ()); + SB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetEffectiveUserID, ()); + SB_REGISTER_METHOD(uint32_t, SBProcessInfo, GetEffectiveGroupID, ()); + SB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveUserIDIsValid, ()); + SB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveGroupIDIsValid, ()); + SB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetParentProcessID, ()); + } + + // SBQueue + { + SB_REGISTER_CONSTRUCTOR(SBQueue, ()); + SB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &)); + SB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &)); + SB_REGISTER_METHOD(const lldb::SBQueue &, + SBQueue, operator=,(const lldb::SBQueue &)); + SB_REGISTER_METHOD_CONST(bool, SBQueue, IsValid, ()); + SB_REGISTER_METHOD(void, SBQueue, Clear, ()); + SB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBQueue, GetQueueID, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBQueue, GetIndexID, ()); + SB_REGISTER_METHOD_CONST(const char *, SBQueue, GetName, ()); + SB_REGISTER_METHOD(uint32_t, SBQueue, GetNumThreads, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBQueue, GetNumPendingItems, ()); + SB_REGISTER_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBQueue, GetNumRunningItems, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBQueue, GetProcess, ()); + SB_REGISTER_METHOD(lldb::QueueKind, SBQueue, GetKind, ()); + } + + // SBQueueItem + { + SB_REGISTER_CONSTRUCTOR(SBQueueItem, ()); + SB_REGISTER_CONSTRUCTOR(SBQueueItem, (const lldb::QueueItemSP &)); + SB_REGISTER_METHOD_CONST(bool, SBQueueItem, IsValid, ()); + SB_REGISTER_METHOD(void, SBQueueItem, Clear, ()); + SB_REGISTER_METHOD(void, SBQueueItem, SetQueueItem, + (const lldb::QueueItemSP &)); + SB_REGISTER_METHOD_CONST(lldb::QueueItemKind, SBQueueItem, GetKind, ()); + SB_REGISTER_METHOD(void, SBQueueItem, SetKind, (lldb::QueueItemKind)); + SB_REGISTER_METHOD_CONST(lldb::SBAddress, SBQueueItem, GetAddress, ()); + SB_REGISTER_METHOD(void, SBQueueItem, SetAddress, (lldb::SBAddress)); + SB_REGISTER_METHOD(lldb::SBThread, SBQueueItem, GetExtendedBacktraceThread, + (const char *)); + } + + // SBSection + { + SB_REGISTER_CONSTRUCTOR(SBSection, ()); + SB_REGISTER_CONSTRUCTOR(SBSection, (const lldb::SBSection &)); + SB_REGISTER_METHOD(const lldb::SBSection &, + SBSection, operator=,(const lldb::SBSection &)); + SB_REGISTER_METHOD_CONST(bool, SBSection, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBSection, GetName, ()); + SB_REGISTER_METHOD(lldb::SBSection, SBSection, GetParent, ()); + SB_REGISTER_METHOD(lldb::SBSection, SBSection, FindSubSection, + (const char *)); + SB_REGISTER_METHOD(size_t, SBSection, GetNumSubSections, ()); + SB_REGISTER_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex, + (size_t)); + SB_REGISTER_METHOD(lldb::addr_t, SBSection, GetFileAddress, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBSection, GetLoadAddress, + (lldb::SBTarget &)); + SB_REGISTER_METHOD(lldb::addr_t, SBSection, GetByteSize, ()); + SB_REGISTER_METHOD(uint64_t, SBSection, GetFileOffset, ()); + SB_REGISTER_METHOD(uint64_t, SBSection, GetFileByteSize, ()); + SB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData, ()); + SB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData, + (uint64_t, uint64_t)); + SB_REGISTER_METHOD(lldb::SectionType, SBSection, GetSectionType, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBSection, GetPermissions, ()); + SB_REGISTER_METHOD(uint32_t, SBSection, GetTargetByteSize, ()); + SB_REGISTER_METHOD(bool, SBSection, operator==,(const lldb::SBSection &)); + SB_REGISTER_METHOD(bool, SBSection, operator!=,(const lldb::SBSection &)); + SB_REGISTER_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &)); + } + // SBSourceManager + { + SB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBDebugger &)); + SB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBTarget &)); + SB_REGISTER_CONSTRUCTOR(SBSourceManager, (const lldb::SBSourceManager &)); + SB_REGISTER_METHOD( + const lldb::SBSourceManager &, + SBSourceManager, operator=,(const lldb::SBSourceManager &)); + SB_REGISTER_METHOD(size_t, SBSourceManager, + DisplaySourceLinesWithLineNumbers, + (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t, + const char *, lldb::SBStream &)); + SB_REGISTER_METHOD(size_t, SBSourceManager, + DisplaySourceLinesWithLineNumbersAndColumn, + (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t, + uint32_t, const char *, lldb::SBStream &)); + } + + // SBStream + { + SB_REGISTER_CONSTRUCTOR(SBStream, ()); + SB_REGISTER_METHOD_CONST(bool, SBStream, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBStream, GetData, ()); + SB_REGISTER_METHOD(size_t, SBStream, GetSize, ()); + SB_REGISTER_METHOD(void, SBStream, RedirectToFile, (const char *, bool)); + SB_REGISTER_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool)); + SB_REGISTER_METHOD(void, SBStream, RedirectToFileDescriptor, (int, bool)); + SB_REGISTER_METHOD(void, SBStream, Clear, ()); + } + + // SBStringList + { + SB_REGISTER_CONSTRUCTOR(SBStringList, ()); + SB_REGISTER_CONSTRUCTOR(SBStringList, (const lldb::SBStringList &)); + SB_REGISTER_METHOD(const lldb::SBStringList &, + SBStringList, operator=,(const lldb::SBStringList &)); + SB_REGISTER_METHOD_CONST(bool, SBStringList, IsValid, ()); + SB_REGISTER_METHOD(void, SBStringList, AppendString, (const char *)); + SB_REGISTER_METHOD(void, SBStringList, AppendList, (const char **, int)); + SB_REGISTER_METHOD(void, SBStringList, AppendList, + (const lldb::SBStringList &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBStringList, GetSize, ()); + SB_REGISTER_METHOD(const char *, SBStringList, GetStringAtIndex, (size_t)); + SB_REGISTER_METHOD_CONST(const char *, SBStringList, GetStringAtIndex, + (size_t)); + SB_REGISTER_METHOD(void, SBStringList, Clear, ()); + } + + // SBStructuredData + { + SB_REGISTER_CONSTRUCTOR(SBStructuredData, ()); + SB_REGISTER_CONSTRUCTOR(SBStructuredData, (const lldb::SBStructuredData &)); + SB_REGISTER_CONSTRUCTOR(SBStructuredData, (const lldb::EventSP &)); + SB_REGISTER_CONSTRUCTOR(SBStructuredData, + (lldb_private::StructuredDataImpl *)); + SB_REGISTER_METHOD( + lldb::SBStructuredData &, + SBStructuredData, operator=,(const lldb::SBStructuredData &)); + SB_REGISTER_METHOD(lldb::SBError, SBStructuredData, SetFromJSON, + (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(bool, SBStructuredData, IsValid, ()); + SB_REGISTER_METHOD(void, SBStructuredData, Clear, ()); + SB_REGISTER_METHOD_CONST(lldb::SBError, SBStructuredData, GetAsJSON, + (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(lldb::SBError, SBStructuredData, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(lldb::StructuredDataType, SBStructuredData, + GetType, ()); + SB_REGISTER_METHOD_CONST(size_t, SBStructuredData, GetSize, ()); + SB_REGISTER_METHOD_CONST(bool, SBStructuredData, GetKeys, + (lldb::SBStringList &)); + SB_REGISTER_METHOD_CONST(lldb::SBStructuredData, SBStructuredData, + GetValueForKey, (const char *)); + SB_REGISTER_METHOD_CONST(lldb::SBStructuredData, SBStructuredData, + GetItemAtIndex, (size_t)); + SB_REGISTER_METHOD_CONST(uint64_t, SBStructuredData, GetIntegerValue, + (uint64_t)); + SB_REGISTER_METHOD_CONST(double, SBStructuredData, GetFloatValue, (double)); + SB_REGISTER_METHOD_CONST(bool, SBStructuredData, GetBooleanValue, (bool)); + SB_REGISTER_METHOD_CONST(size_t, SBStructuredData, GetStringValue, + (char *, size_t)); + } + + // SBSymbol + { + SB_REGISTER_CONSTRUCTOR(SBSymbol, ()); + SB_REGISTER_CONSTRUCTOR(SBSymbol, (const lldb::SBSymbol &)); + SB_REGISTER_METHOD(const lldb::SBSymbol &, + SBSymbol, operator=,(const lldb::SBSymbol &)); + SB_REGISTER_METHOD_CONST(bool, SBSymbol, IsValid, ()); + SB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetName, ()); + SB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetDisplayName, ()); + SB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetMangledName, ()); + SB_REGISTER_METHOD_CONST(bool, + SBSymbol, operator==,(const lldb::SBSymbol &)); + SB_REGISTER_METHOD_CONST(bool, + SBSymbol, operator!=,(const lldb::SBSymbol &)); + SB_REGISTER_METHOD(bool, SBSymbol, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions, + (lldb::SBTarget)); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions, + (lldb::SBTarget, const char *)); + SB_REGISTER_METHOD(lldb::SBAddress, SBSymbol, GetStartAddress, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBSymbol, GetEndAddress, ()); + SB_REGISTER_METHOD(uint32_t, SBSymbol, GetPrologueByteSize, ()); + SB_REGISTER_METHOD(lldb::SymbolType, SBSymbol, GetType, ()); + SB_REGISTER_METHOD(bool, SBSymbol, IsExternal, ()); + SB_REGISTER_METHOD(bool, SBSymbol, IsSynthetic, ()); + } + + // SBSymbolContext + { + SB_REGISTER_CONSTRUCTOR(SBSymbolContext, ()); + SB_REGISTER_CONSTRUCTOR(SBSymbolContext, + (const lldb_private::SymbolContext *)); + SB_REGISTER_CONSTRUCTOR(SBSymbolContext, (const lldb::SBSymbolContext &)); + SB_REGISTER_METHOD( + const lldb::SBSymbolContext &, + SBSymbolContext, operator=,(const lldb::SBSymbolContext &)); + SB_REGISTER_METHOD_CONST(bool, SBSymbolContext, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBModule, SBSymbolContext, GetModule, ()); + SB_REGISTER_METHOD(lldb::SBCompileUnit, SBSymbolContext, GetCompileUnit, + ()); + SB_REGISTER_METHOD(lldb::SBFunction, SBSymbolContext, GetFunction, ()); + SB_REGISTER_METHOD(lldb::SBBlock, SBSymbolContext, GetBlock, ()); + SB_REGISTER_METHOD(lldb::SBLineEntry, SBSymbolContext, GetLineEntry, ()); + SB_REGISTER_METHOD(lldb::SBSymbol, SBSymbolContext, GetSymbol, ()); + SB_REGISTER_METHOD(void, SBSymbolContext, SetModule, (lldb::SBModule)); + SB_REGISTER_METHOD(void, SBSymbolContext, SetCompileUnit, + (lldb::SBCompileUnit)); + SB_REGISTER_METHOD(void, SBSymbolContext, SetFunction, (lldb::SBFunction)); + SB_REGISTER_METHOD(void, SBSymbolContext, SetBlock, (lldb::SBBlock)); + SB_REGISTER_METHOD(void, SBSymbolContext, SetLineEntry, + (lldb::SBLineEntry)); + SB_REGISTER_METHOD(void, SBSymbolContext, SetSymbol, (lldb::SBSymbol)); + SB_REGISTER_METHOD(bool, SBSymbolContext, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBSymbolContext, + GetParentOfInlinedScope, + (const lldb::SBAddress &, lldb::SBAddress &)); + } + + // SBSymbolContextList + { + SB_REGISTER_CONSTRUCTOR(SBSymbolContextList, ()); + SB_REGISTER_CONSTRUCTOR(SBSymbolContextList, + (const lldb::SBSymbolContextList &)); + SB_REGISTER_METHOD( + const lldb::SBSymbolContextList &, + SBSymbolContextList, operator=,(const lldb::SBSymbolContextList &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBSymbolContextList, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBSymbolContext, SBSymbolContextList, + GetContextAtIndex, (uint32_t)); + SB_REGISTER_METHOD(void, SBSymbolContextList, Clear, ()); + SB_REGISTER_METHOD(void, SBSymbolContextList, Append, + (lldb::SBSymbolContext &)); + SB_REGISTER_METHOD(void, SBSymbolContextList, Append, + (lldb::SBSymbolContextList &)); + SB_REGISTER_METHOD_CONST(bool, SBSymbolContextList, IsValid, ()); + SB_REGISTER_METHOD(bool, SBSymbolContextList, GetDescription, + (lldb::SBStream &)); + } + + // SBTarget + { + SB_REGISTER_CONSTRUCTOR(SBTarget, ()); + SB_REGISTER_CONSTRUCTOR(SBTarget, (const lldb::SBTarget &)); + SB_REGISTER_CONSTRUCTOR(SBTarget, (const lldb::TargetSP &)); + SB_REGISTER_METHOD(const lldb::SBTarget &, + SBTarget, operator=,(const lldb::SBTarget &)); + SB_REGISTER_STATIC_METHOD(bool, SBTarget, EventIsTargetEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBTarget, SBTarget, GetTargetFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(uint32_t, SBTarget, GetNumModulesFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBModule, SBTarget, + GetModuleAtIndexFromEvent, + (const uint32_t, const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(const char *, SBTarget, GetBroadcasterClassName, + ()); + SB_REGISTER_METHOD_CONST(bool, SBTarget, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, GetProcess, ()); + SB_REGISTER_METHOD(lldb::SBPlatform, SBTarget, GetPlatform, ()); + SB_REGISTER_METHOD_CONST(lldb::SBDebugger, SBTarget, GetDebugger, ()); + SB_REGISTER_METHOD(lldb::SBStructuredData, SBTarget, GetStatistics, ()); + SB_REGISTER_METHOD(void, SBTarget, SetCollectingStats, (bool)); + SB_REGISTER_METHOD(bool, SBTarget, GetCollectingStats, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LoadCore, (const char *)); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LoadCore, + (const char *, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, LaunchSimple, + (const char **, const char **, const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, Install, ()); + SB_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 &)); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, Launch, + (lldb::SBLaunchInfo &, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, Attach, + (lldb::SBAttachInfo &, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBProcess, SBTarget, AttachToProcessWithID, + (lldb::SBListener &, lldb::pid_t, lldb::SBError &)); + SB_REGISTER_METHOD( + lldb::SBProcess, SBTarget, AttachToProcessWithName, + (lldb::SBListener &, const char *, bool, lldb::SBError &)); + SB_REGISTER_METHOD( + lldb::SBProcess, SBTarget, ConnectRemote, + (lldb::SBListener &, const char *, const char *, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBFileSpec, SBTarget, GetExecutable, ()); + SB_REGISTER_METHOD_CONST(bool, + SBTarget, operator==,(const lldb::SBTarget &)); + SB_REGISTER_METHOD_CONST(bool, + SBTarget, operator!=,(const lldb::SBTarget &)); + SB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolveLoadAddress, + (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolveFileAddress, + (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBAddress, SBTarget, ResolvePastLoadAddress, + (uint32_t, lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBSymbolContext, SBTarget, + ResolveSymbolContextForAddress, + (const lldb::SBAddress &, uint32_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const char *, uint32_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, lldb::addr_t, + lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, uint32_t, + lldb::addr_t, lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, const char *)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, uint32_t, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, uint32_t, lldb::LanguageType, + const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, + const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, lldb::LanguageType, + const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, lldb::LanguageType, + lldb::addr_t, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, const char *)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, lldb::LanguageType, + const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByAddress, + (lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, + BreakpointCreateBySBAddress, (lldb::SBAddress &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, + BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpec &, const char *)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, + BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &)); + SB_REGISTER_METHOD( + lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &, const lldb::SBStringList &)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, + BreakpointCreateForException, + (lldb::LanguageType, bool, bool)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateFromScript, + (const char *, lldb::SBStructuredData &, + const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &, bool)); + SB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumBreakpoints, ()); + SB_REGISTER_METHOD_CONST(lldb::SBBreakpoint, SBTarget, GetBreakpointAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(bool, SBTarget, BreakpointDelete, (lldb::break_id_t)); + SB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, FindBreakpointByID, + (lldb::break_id_t)); + SB_REGISTER_METHOD(bool, SBTarget, FindBreakpointsByName, + (const char *, lldb::SBBreakpointList &)); + SB_REGISTER_METHOD(void, SBTarget, GetBreakpointNames, + (lldb::SBStringList &)); + SB_REGISTER_METHOD(void, SBTarget, DeleteBreakpointName, (const char *)); + SB_REGISTER_METHOD(bool, SBTarget, EnableAllBreakpoints, ()); + SB_REGISTER_METHOD(bool, SBTarget, DisableAllBreakpoints, ()); + SB_REGISTER_METHOD(bool, SBTarget, DeleteAllBreakpoints, ()); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsCreateFromFile, + (lldb::SBFileSpec &, lldb::SBBreakpointList &)); + SB_REGISTER_METHOD( + lldb::SBError, SBTarget, BreakpointsCreateFromFile, + (lldb::SBFileSpec &, lldb::SBStringList &, lldb::SBBreakpointList &)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile, + (lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile, + (lldb::SBFileSpec &, lldb::SBBreakpointList &, bool)); + SB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumWatchpoints, ()); + SB_REGISTER_METHOD_CONST(lldb::SBWatchpoint, SBTarget, GetWatchpointAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(bool, SBTarget, DeleteWatchpoint, (lldb::watch_id_t)); + SB_REGISTER_METHOD(lldb::SBWatchpoint, SBTarget, FindWatchpointByID, + (lldb::watch_id_t)); + SB_REGISTER_METHOD(lldb::SBWatchpoint, SBTarget, WatchAddress, + (lldb::addr_t, size_t, bool, bool, lldb::SBError &)); + SB_REGISTER_METHOD(bool, SBTarget, EnableAllWatchpoints, ()); + SB_REGISTER_METHOD(bool, SBTarget, DisableAllWatchpoints, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromAddress, + (const char *, lldb::SBAddress, lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromData, + (const char *, lldb::SBData, lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, CreateValueFromExpression, + (const char *, const char *)); + SB_REGISTER_METHOD(bool, SBTarget, DeleteAllWatchpoints, ()); + SB_REGISTER_METHOD(void, SBTarget, AppendImageSearchPath, + (const char *, const char *, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBModule, SBTarget, AddModule, + (const char *, const char *, const char *)); + SB_REGISTER_METHOD( + lldb::SBModule, SBTarget, AddModule, + (const char *, const char *, const char *, const char *)); + SB_REGISTER_METHOD(lldb::SBModule, SBTarget, AddModule, + (const lldb::SBModuleSpec &)); + SB_REGISTER_METHOD(bool, SBTarget, AddModule, (lldb::SBModule &)); + SB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetNumModules, ()); + SB_REGISTER_METHOD(void, SBTarget, Clear, ()); + SB_REGISTER_METHOD(lldb::SBModule, SBTarget, FindModule, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindCompileUnits, + (const lldb::SBFileSpec &)); + SB_REGISTER_METHOD(lldb::ByteOrder, SBTarget, GetByteOrder, ()); + SB_REGISTER_METHOD(const char *, SBTarget, GetTriple, ()); + SB_REGISTER_METHOD(uint32_t, SBTarget, GetDataByteSize, ()); + SB_REGISTER_METHOD(uint32_t, SBTarget, GetCodeByteSize, ()); + SB_REGISTER_METHOD(uint32_t, SBTarget, GetAddressByteSize, ()); + SB_REGISTER_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex, (uint32_t)); + SB_REGISTER_METHOD(bool, SBTarget, RemoveModule, (lldb::SBModule)); + SB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBTarget, GetBroadcaster, ()); + SB_REGISTER_METHOD(bool, SBTarget, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindFunctions, + (const char *, uint32_t)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindGlobalFunctions, + (const char *, uint32_t, lldb::MatchType)); + SB_REGISTER_METHOD(lldb::SBType, SBTarget, FindFirstType, (const char *)); + SB_REGISTER_METHOD(lldb::SBType, SBTarget, GetBasicType, (lldb::BasicType)); + SB_REGISTER_METHOD(lldb::SBTypeList, SBTarget, FindTypes, (const char *)); + SB_REGISTER_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables, + (const char *, uint32_t)); + SB_REGISTER_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables, + (const char *, uint32_t, lldb::MatchType)); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, FindFirstGlobalVariable, + (const char *)); + SB_REGISTER_METHOD(lldb::SBSourceManager, SBTarget, GetSourceManager, ()); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions, + (lldb::SBAddress, uint32_t)); + SB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions, + (lldb::SBAddress, uint32_t, const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, SetSectionLoadAddress, + (lldb::SBSection, lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, ClearSectionLoadAddress, + (lldb::SBSection)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, SetModuleLoadAddress, + (lldb::SBModule, int64_t)); + SB_REGISTER_METHOD(lldb::SBError, SBTarget, ClearModuleLoadAddress, + (lldb::SBModule)); + SB_REGISTER_METHOD(lldb::SBSymbolContextList, SBTarget, FindSymbols, + (const char *, lldb::SymbolType)); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, EvaluateExpression, + (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBTarget, EvaluateExpression, + (const char *, const lldb::SBExpressionOptions &)); + SB_REGISTER_METHOD(lldb::addr_t, SBTarget, GetStackRedZoneSize, ()); + SB_REGISTER_METHOD_CONST(lldb::SBLaunchInfo, SBTarget, GetLaunchInfo, ()); + SB_REGISTER_METHOD(void, SBTarget, SetLaunchInfo, + (const lldb::SBLaunchInfo &)); + } + + // SBThread + { + SB_REGISTER_STATIC_METHOD(const char *, SBThread, GetBroadcasterClassName, + ()); + SB_REGISTER_CONSTRUCTOR(SBThread, ()); + SB_REGISTER_CONSTRUCTOR(SBThread, (const lldb::ThreadSP &)); + SB_REGISTER_CONSTRUCTOR(SBThread, (const lldb::SBThread &)); + SB_REGISTER_METHOD(const lldb::SBThread &, + SBThread, operator=,(const lldb::SBThread &)); + SB_REGISTER_METHOD_CONST(lldb::SBQueue, SBThread, GetQueue, ()); + SB_REGISTER_METHOD_CONST(bool, SBThread, IsValid, ()); + SB_REGISTER_METHOD(void, SBThread, Clear, ()); + SB_REGISTER_METHOD(lldb::StopReason, SBThread, GetStopReason, ()); + SB_REGISTER_METHOD(size_t, SBThread, GetStopReasonDataCount, ()); + SB_REGISTER_METHOD(uint64_t, SBThread, GetStopReasonDataAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(bool, SBThread, GetStopReasonExtendedInfoAsJSON, + (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::SBThreadCollection, SBThread, + GetStopReasonExtendedBacktraces, + (lldb::InstrumentationRuntimeType)); + SB_REGISTER_METHOD(size_t, SBThread, GetStopDescription, (char *, size_t)); + SB_REGISTER_METHOD(lldb::SBValue, SBThread, GetStopReturnValue, ()); + SB_REGISTER_METHOD_CONST(lldb::tid_t, SBThread, GetThreadID, ()); + SB_REGISTER_METHOD_CONST(uint32_t, SBThread, GetIndexID, ()); + SB_REGISTER_METHOD_CONST(const char *, SBThread, GetName, ()); + SB_REGISTER_METHOD_CONST(const char *, SBThread, GetQueueName, ()); + SB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBThread, GetQueueID, ()); + SB_REGISTER_METHOD(bool, SBThread, GetInfoItemByPathAsString, + (const char *, lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBThread, StepOver, (lldb::RunMode)); + SB_REGISTER_METHOD(void, SBThread, StepOver, + (lldb::RunMode, lldb::SBError &)); + SB_REGISTER_METHOD(void, SBThread, StepInto, (lldb::RunMode)); + SB_REGISTER_METHOD(void, SBThread, StepInto, (const char *, lldb::RunMode)); + SB_REGISTER_METHOD( + void, SBThread, StepInto, + (const char *, uint32_t, lldb::SBError &, lldb::RunMode)); + SB_REGISTER_METHOD(void, SBThread, StepOut, ()); + SB_REGISTER_METHOD(void, SBThread, StepOut, (lldb::SBError &)); + SB_REGISTER_METHOD(void, SBThread, StepOutOfFrame, (lldb::SBFrame &)); + SB_REGISTER_METHOD(void, SBThread, StepOutOfFrame, + (lldb::SBFrame &, lldb::SBError &)); + SB_REGISTER_METHOD(void, SBThread, StepInstruction, (bool)); + SB_REGISTER_METHOD(void, SBThread, StepInstruction, + (bool, lldb::SBError &)); + SB_REGISTER_METHOD(void, SBThread, RunToAddress, (lldb::addr_t)); + SB_REGISTER_METHOD(void, SBThread, RunToAddress, + (lldb::addr_t, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, StepOverUntil, + (lldb::SBFrame &, lldb::SBFileSpec &, uint32_t)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan, + (const char *)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan, + (const char *, bool)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, JumpToLine, + (lldb::SBFileSpec &, uint32_t)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, ReturnFromFrame, + (lldb::SBFrame &, lldb::SBValue &)); + SB_REGISTER_METHOD(lldb::SBError, SBThread, UnwindInnermostExpression, ()); + SB_REGISTER_METHOD(bool, SBThread, Suspend, ()); + SB_REGISTER_METHOD(bool, SBThread, Suspend, (lldb::SBError &)); + SB_REGISTER_METHOD(bool, SBThread, Resume, ()); + SB_REGISTER_METHOD(bool, SBThread, Resume, (lldb::SBError &)); + SB_REGISTER_METHOD(bool, SBThread, IsSuspended, ()); + SB_REGISTER_METHOD(bool, SBThread, IsStopped, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBThread, GetProcess, ()); + SB_REGISTER_METHOD(uint32_t, SBThread, GetNumFrames, ()); + SB_REGISTER_METHOD(lldb::SBFrame, SBThread, GetFrameAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBFrame, SBThread, GetSelectedFrame, ()); + SB_REGISTER_METHOD(lldb::SBFrame, SBThread, SetSelectedFrame, (uint32_t)); + SB_REGISTER_STATIC_METHOD(bool, SBThread, EventIsThreadEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBFrame, SBThread, GetStackFrameFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBThread, SBThread, GetThreadFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_METHOD_CONST(bool, + SBThread, operator==,(const lldb::SBThread &)); + SB_REGISTER_METHOD_CONST(bool, + SBThread, operator!=,(const lldb::SBThread &)); + SB_REGISTER_METHOD_CONST(bool, SBThread, GetStatus, (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(bool, SBThread, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD_CONST(bool, SBThread, GetDescription, + (lldb::SBStream &, bool)); + SB_REGISTER_METHOD(lldb::SBThread, SBThread, GetExtendedBacktraceThread, + (const char *)); + SB_REGISTER_METHOD(uint32_t, SBThread, + GetExtendedBacktraceOriginatingIndexID, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBThread, GetCurrentException, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBThread, GetCurrentExceptionBacktrace, + ()); + SB_REGISTER_METHOD(bool, SBThread, SafeToCallFunctions, ()); + SB_REGISTER_METHOD(lldb_private::Thread *, SBThread, operator->,()); + SB_REGISTER_METHOD(lldb_private::Thread *, SBThread, get, ()); + } + + // SBThreadCollection + { + SB_REGISTER_CONSTRUCTOR(SBThreadCollection, ()); + SB_REGISTER_CONSTRUCTOR(SBThreadCollection, + (const lldb::SBThreadCollection &)); + SB_REGISTER_METHOD( + const lldb::SBThreadCollection &, + SBThreadCollection, operator=,(const lldb::SBThreadCollection &)); + SB_REGISTER_METHOD_CONST(bool, SBThreadCollection, IsValid, ()); + SB_REGISTER_METHOD(size_t, SBThreadCollection, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBThreadCollection, GetThreadAtIndex, + (size_t)); + } + + // SBThreadPlan + { + SB_REGISTER_CONSTRUCTOR(SBThreadPlan, ()); + SB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &)); + SB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &)); + SB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *)); + SB_REGISTER_METHOD(const lldb::SBThreadPlan &, + SBThreadPlan, operator=,(const lldb::SBThreadPlan &)); + SB_REGISTER_METHOD(lldb_private::ThreadPlan *, SBThreadPlan, get, ()); + SB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ()); + SB_REGISTER_METHOD(void, SBThreadPlan, Clear, ()); + SB_REGISTER_METHOD(lldb::StopReason, SBThreadPlan, GetStopReason, ()); + SB_REGISTER_METHOD(size_t, SBThreadPlan, GetStopReasonDataCount, ()); + SB_REGISTER_METHOD(uint64_t, SBThreadPlan, GetStopReasonDataAtIndex, + (uint32_t)); + SB_REGISTER_METHOD_CONST(lldb::SBThread, SBThreadPlan, GetThread, ()); + SB_REGISTER_METHOD_CONST(bool, SBThreadPlan, GetDescription, + (lldb::SBStream &)); + SB_REGISTER_METHOD(void, SBThreadPlan, SetPlanComplete, (bool)); + SB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanComplete, ()); + SB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanStale, ()); + SB_REGISTER_METHOD(bool, SBThreadPlan, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOverRange, + (lldb::SBAddress &, lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOverRange, + (lldb::SBAddress &, lldb::addr_t, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepInRange, + (lldb::SBAddress &, lldb::addr_t)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepInRange, + (lldb::SBAddress &, lldb::addr_t, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOut, (uint32_t, bool)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOut, + (uint32_t, bool, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForRunToAddress, (lldb::SBAddress)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForRunToAddress, + (lldb::SBAddress, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepScripted, (const char *)); + SB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepScripted, + (const char *, lldb::SBError &)); + } + + // SBTrace + { + SB_REGISTER_METHOD(void, SBTrace, StopTrace, + (lldb::SBError &, lldb::tid_t)); + SB_REGISTER_METHOD(void, SBTrace, GetTraceConfig, + (lldb::SBTraceOptions &, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::user_id_t, SBTrace, GetTraceUID, ()); + SB_REGISTER_CONSTRUCTOR(SBTrace, ()); + SB_REGISTER_METHOD(bool, SBTrace, IsValid, ()); + } + + // SBTraceOptions + { + SB_REGISTER_CONSTRUCTOR(SBTraceOptions, ()); + SB_REGISTER_METHOD_CONST(lldb::TraceType, SBTraceOptions, getType, ()); + SB_REGISTER_METHOD_CONST(uint64_t, SBTraceOptions, getTraceBufferSize, ()); + SB_REGISTER_METHOD(lldb::SBStructuredData, SBTraceOptions, getTraceParams, + (lldb::SBError &)); + SB_REGISTER_METHOD_CONST(uint64_t, SBTraceOptions, getMetaDataBufferSize, + ()); + SB_REGISTER_METHOD(void, SBTraceOptions, setTraceParams, + (lldb::SBStructuredData &)); + SB_REGISTER_METHOD(void, SBTraceOptions, setType, (lldb::TraceType)); + SB_REGISTER_METHOD(void, SBTraceOptions, setTraceBufferSize, (uint64_t)); + SB_REGISTER_METHOD(void, SBTraceOptions, setMetaDataBufferSize, (uint64_t)); + SB_REGISTER_METHOD(bool, SBTraceOptions, IsValid, ()); + SB_REGISTER_METHOD(void, SBTraceOptions, setThreadID, (lldb::tid_t)); + SB_REGISTER_METHOD(lldb::tid_t, SBTraceOptions, getThreadID, ()); + } + + // SBTypeMemberFunction + { + SB_REGISTER_CONSTRUCTOR(SBType, ()); + SB_REGISTER_CONSTRUCTOR(SBType, (const lldb::SBType &)); + SB_REGISTER_METHOD(bool, SBType, operator==,(lldb::SBType &)); + SB_REGISTER_METHOD(bool, SBType, operator!=,(lldb::SBType &)); + SB_REGISTER_METHOD(lldb::SBType &, + SBType, operator=,(const lldb::SBType &)); + SB_REGISTER_METHOD_CONST(bool, SBType, IsValid, ()); + SB_REGISTER_METHOD(uint64_t, SBType, GetByteSize, ()); + SB_REGISTER_METHOD(bool, SBType, IsPointerType, ()); + SB_REGISTER_METHOD(bool, SBType, IsArrayType, ()); + SB_REGISTER_METHOD(bool, SBType, IsVectorType, ()); + SB_REGISTER_METHOD(bool, SBType, IsReferenceType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetPointerType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetPointeeType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetReferenceType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetTypedefedType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetDereferencedType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetArrayElementType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetArrayType, (uint64_t)); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetVectorElementType, ()); + SB_REGISTER_METHOD(bool, SBType, IsFunctionType, ()); + SB_REGISTER_METHOD(bool, SBType, IsPolymorphicClass, ()); + SB_REGISTER_METHOD(bool, SBType, IsTypedefType, ()); + SB_REGISTER_METHOD(bool, SBType, IsAnonymousType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetFunctionReturnType, ()); + SB_REGISTER_METHOD(lldb::SBTypeList, SBType, GetFunctionArgumentTypes, ()); + SB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfMemberFunctions, ()); + SB_REGISTER_METHOD(lldb::SBTypeMemberFunction, SBType, + GetMemberFunctionAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetUnqualifiedType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetCanonicalType, ()); + SB_REGISTER_METHOD(lldb::BasicType, SBType, GetBasicType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetBasicType, (lldb::BasicType)); + SB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfDirectBaseClasses, ()); + SB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfVirtualBaseClasses, ()); + SB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfFields, ()); + SB_REGISTER_METHOD(bool, SBType, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetDirectBaseClassAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetVirtualBaseClassAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeEnumMemberList, SBType, GetEnumMembers, ()); + SB_REGISTER_METHOD(lldb::SBTypeMember, SBType, GetFieldAtIndex, (uint32_t)); + SB_REGISTER_METHOD(bool, SBType, IsTypeComplete, ()); + SB_REGISTER_METHOD(uint32_t, SBType, GetTypeFlags, ()); + SB_REGISTER_METHOD(const char *, SBType, GetName, ()); + SB_REGISTER_METHOD(const char *, SBType, GetDisplayTypeName, ()); + SB_REGISTER_METHOD(lldb::TypeClass, SBType, GetTypeClass, ()); + SB_REGISTER_METHOD(uint32_t, SBType, GetNumberOfTemplateArguments, ()); + SB_REGISTER_METHOD(lldb::SBType, SBType, GetTemplateArgumentType, + (uint32_t)); + SB_REGISTER_METHOD(lldb::TemplateArgumentKind, SBType, + GetTemplateArgumentKind, (uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeList, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeList, (const lldb::SBTypeList &)); + SB_REGISTER_METHOD(bool, SBTypeList, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBTypeList &, + SBTypeList, operator=,(const lldb::SBTypeList &)); + SB_REGISTER_METHOD(void, SBTypeList, Append, (lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBType, SBTypeList, GetTypeAtIndex, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBTypeList, GetSize, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeMember, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeMember, (const lldb::SBTypeMember &)); + SB_REGISTER_METHOD(lldb::SBTypeMember &, + SBTypeMember, operator=,(const lldb::SBTypeMember &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeMember, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBTypeMember, GetName, ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeMember, GetType, ()); + SB_REGISTER_METHOD(uint64_t, SBTypeMember, GetOffsetInBytes, ()); + SB_REGISTER_METHOD(uint64_t, SBTypeMember, GetOffsetInBits, ()); + SB_REGISTER_METHOD(bool, SBTypeMember, IsBitfield, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeMember, GetBitfieldSizeInBits, ()); + SB_REGISTER_METHOD(bool, SBTypeMember, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_CONSTRUCTOR(SBTypeMemberFunction, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeMemberFunction, + (const lldb::SBTypeMemberFunction &)); + SB_REGISTER_METHOD( + lldb::SBTypeMemberFunction &, + SBTypeMemberFunction, operator=,(const lldb::SBTypeMemberFunction &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeMemberFunction, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetName, ()); + SB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetDemangledName, + ()); + SB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetMangledName, ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction, GetType, ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction, GetReturnType, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeMemberFunction, GetNumberOfArguments, + ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeMemberFunction, + GetArgumentTypeAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::MemberFunctionKind, SBTypeMemberFunction, GetKind, + ()); + SB_REGISTER_METHOD(bool, SBTypeMemberFunction, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + } + + // SBTypeCategory + { + SB_REGISTER_CONSTRUCTOR(SBTypeCategory, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeCategory, (const lldb::SBTypeCategory &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeCategory, IsValid, ()); + SB_REGISTER_METHOD(bool, SBTypeCategory, GetEnabled, ()); + SB_REGISTER_METHOD(void, SBTypeCategory, SetEnabled, (bool)); + SB_REGISTER_METHOD(const char *, SBTypeCategory, GetName, ()); + SB_REGISTER_METHOD(lldb::LanguageType, SBTypeCategory, GetLanguageAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumLanguages, ()); + SB_REGISTER_METHOD(void, SBTypeCategory, AddLanguage, (lldb::LanguageType)); + SB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFormats, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSummaries, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFilters, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSynthetics, ()); + SB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForFilterAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForFormatAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForSummaryAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForSyntheticAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryForType, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory, + GetSyntheticForType, (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory, + GetSyntheticAtIndex, (uint32_t)); + SB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFormat, + (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat)); + SB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFormat, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSummary, + (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary)); + SB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSummary, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFilter, + (lldb::SBTypeNameSpecifier, lldb::SBTypeFilter)); + SB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFilter, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSynthetic, + (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic)); + SB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic, + (lldb::SBTypeNameSpecifier)); + SB_REGISTER_METHOD(bool, SBTypeCategory, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD( + lldb::SBTypeCategory &, + SBTypeCategory, operator=,(const lldb::SBTypeCategory &)); + SB_REGISTER_METHOD(bool, + SBTypeCategory, operator==,(lldb::SBTypeCategory &)); + SB_REGISTER_METHOD(bool, + SBTypeCategory, operator!=,(lldb::SBTypeCategory &)); + } + + // SBTypeEnumMemberList + { + SB_REGISTER_CONSTRUCTOR(SBTypeEnumMember, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeEnumMember, (const lldb::SBTypeEnumMember &)); + SB_REGISTER_METHOD( + lldb::SBTypeEnumMember &, + SBTypeEnumMember, operator=,(const lldb::SBTypeEnumMember &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeEnumMember, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBTypeEnumMember, GetName, ()); + SB_REGISTER_METHOD(int64_t, SBTypeEnumMember, GetValueAsSigned, ()); + SB_REGISTER_METHOD(uint64_t, SBTypeEnumMember, GetValueAsUnsigned, ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeEnumMember, GetType, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeEnumMemberList, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeEnumMemberList, + (const lldb::SBTypeEnumMemberList &)); + SB_REGISTER_METHOD(bool, SBTypeEnumMemberList, IsValid, ()); + SB_REGISTER_METHOD( + lldb::SBTypeEnumMemberList &, + SBTypeEnumMemberList, operator=,(const lldb::SBTypeEnumMemberList &)); + SB_REGISTER_METHOD(void, SBTypeEnumMemberList, Append, + (lldb::SBTypeEnumMember)); + SB_REGISTER_METHOD(lldb::SBTypeEnumMember, SBTypeEnumMemberList, + GetTypeEnumMemberAtIndex, (uint32_t)); + SB_REGISTER_METHOD(uint32_t, SBTypeEnumMemberList, GetSize, ()); + SB_REGISTER_METHOD(bool, SBTypeEnumMember, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + } + + // SBTypeFilter + { + SB_REGISTER_CONSTRUCTOR(SBTypeFilter, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeFilter, (uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeFilter, (const lldb::SBTypeFilter &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeFilter, IsValid, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeFilter, GetOptions, ()); + SB_REGISTER_METHOD(void, SBTypeFilter, SetOptions, (uint32_t)); + SB_REGISTER_METHOD(bool, SBTypeFilter, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(void, SBTypeFilter, Clear, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeFilter, GetNumberOfExpressionPaths, ()); + SB_REGISTER_METHOD(const char *, SBTypeFilter, GetExpressionPathAtIndex, + (uint32_t)); + SB_REGISTER_METHOD(bool, SBTypeFilter, ReplaceExpressionPathAtIndex, + (uint32_t, const char *)); + SB_REGISTER_METHOD(void, SBTypeFilter, AppendExpressionPath, + (const char *)); + SB_REGISTER_METHOD(lldb::SBTypeFilter &, + SBTypeFilter, operator=,(const lldb::SBTypeFilter &)); + SB_REGISTER_METHOD(bool, SBTypeFilter, operator==,(lldb::SBTypeFilter &)); + SB_REGISTER_METHOD(bool, SBTypeFilter, IsEqualTo, (lldb::SBTypeFilter &)); + SB_REGISTER_METHOD(bool, SBTypeFilter, operator!=,(lldb::SBTypeFilter &)); + } + + // SBTypeFormat + { + SB_REGISTER_CONSTRUCTOR(SBTypeFormat, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeFormat, (lldb::Format, uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const char *, uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const lldb::SBTypeFormat &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeFormat, IsValid, ()); + SB_REGISTER_METHOD(lldb::Format, SBTypeFormat, GetFormat, ()); + SB_REGISTER_METHOD(const char *, SBTypeFormat, GetTypeName, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeFormat, GetOptions, ()); + SB_REGISTER_METHOD(void, SBTypeFormat, SetFormat, (lldb::Format)); + SB_REGISTER_METHOD(void, SBTypeFormat, SetTypeName, (const char *)); + SB_REGISTER_METHOD(void, SBTypeFormat, SetOptions, (uint32_t)); + SB_REGISTER_METHOD(bool, SBTypeFormat, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(lldb::SBTypeFormat &, + SBTypeFormat, operator=,(const lldb::SBTypeFormat &)); + SB_REGISTER_METHOD(bool, SBTypeFormat, operator==,(lldb::SBTypeFormat &)); + SB_REGISTER_METHOD(bool, SBTypeFormat, IsEqualTo, (lldb::SBTypeFormat &)); + SB_REGISTER_METHOD(bool, SBTypeFormat, operator!=,(lldb::SBTypeFormat &)); + } + + // SBTypeNameSpecifier + { + SB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, (const char *, bool)); + SB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, (lldb::SBType)); + SB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier, + (const lldb::SBTypeNameSpecifier &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeNameSpecifier, IsValid, ()); + SB_REGISTER_METHOD(const char *, SBTypeNameSpecifier, GetName, ()); + SB_REGISTER_METHOD(lldb::SBType, SBTypeNameSpecifier, GetType, ()); + SB_REGISTER_METHOD(bool, SBTypeNameSpecifier, IsRegex, ()); + SB_REGISTER_METHOD(bool, SBTypeNameSpecifier, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD( + lldb::SBTypeNameSpecifier &, + SBTypeNameSpecifier, operator=,(const lldb::SBTypeNameSpecifier &)); + SB_REGISTER_METHOD( + bool, SBTypeNameSpecifier, operator==,(lldb::SBTypeNameSpecifier &)); + SB_REGISTER_METHOD(bool, SBTypeNameSpecifier, IsEqualTo, + (lldb::SBTypeNameSpecifier &)); + SB_REGISTER_METHOD( + bool, SBTypeNameSpecifier, operator!=,(lldb::SBTypeNameSpecifier &)); + } + + // SBTypeSummary + { + SB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions, ()); + SB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions, + (const lldb::SBTypeSummaryOptions &)); + SB_REGISTER_METHOD(bool, SBTypeSummaryOptions, IsValid, ()); + SB_REGISTER_METHOD(lldb::LanguageType, SBTypeSummaryOptions, GetLanguage, + ()); + SB_REGISTER_METHOD(lldb::TypeSummaryCapping, SBTypeSummaryOptions, + GetCapping, ()); + SB_REGISTER_METHOD(void, SBTypeSummaryOptions, SetLanguage, + (lldb::LanguageType)); + SB_REGISTER_METHOD(void, SBTypeSummaryOptions, SetCapping, + (lldb::TypeSummaryCapping)); + SB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions, + (const lldb_private::TypeSummaryOptions *)); + SB_REGISTER_CONSTRUCTOR(SBTypeSummary, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithSummaryString, + (const char *, uint32_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithFunctionName, (const char *, uint32_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithScriptCode, (const char *, uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeSummary, (const lldb::SBTypeSummary &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeSummary, IsValid, ()); + SB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionCode, ()); + SB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionName, ()); + SB_REGISTER_METHOD(bool, SBTypeSummary, IsSummaryString, ()); + SB_REGISTER_METHOD(const char *, SBTypeSummary, GetData, ()); + SB_REGISTER_METHOD(uint32_t, SBTypeSummary, GetOptions, ()); + SB_REGISTER_METHOD(void, SBTypeSummary, SetOptions, (uint32_t)); + SB_REGISTER_METHOD(void, SBTypeSummary, SetSummaryString, (const char *)); + SB_REGISTER_METHOD(void, SBTypeSummary, SetFunctionName, (const char *)); + SB_REGISTER_METHOD(void, SBTypeSummary, SetFunctionCode, (const char *)); + SB_REGISTER_METHOD(bool, SBTypeSummary, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(bool, SBTypeSummary, DoesPrintValue, (lldb::SBValue)); + SB_REGISTER_METHOD(lldb::SBTypeSummary &, + SBTypeSummary, operator=,(const lldb::SBTypeSummary &)); + SB_REGISTER_METHOD(bool, SBTypeSummary, operator==,(lldb::SBTypeSummary &)); + SB_REGISTER_METHOD(bool, SBTypeSummary, IsEqualTo, (lldb::SBTypeSummary &)); + SB_REGISTER_METHOD(bool, SBTypeSummary, operator!=,(lldb::SBTypeSummary &)); + } + + // SBTypeSynthetic + { + SB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, ()); + SB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, + CreateWithClassName, (const char *, uint32_t)); + SB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, + CreateWithScriptCode, (const char *, uint32_t)); + SB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &)); + SB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, IsValid, ()); + SB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassCode, ()); + SB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassName, ()); + SB_REGISTER_METHOD(const char *, SBTypeSynthetic, GetData, ()); + SB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassName, (const char *)); + SB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassCode, (const char *)); + SB_REGISTER_METHOD(uint32_t, SBTypeSynthetic, GetOptions, ()); + SB_REGISTER_METHOD(void, SBTypeSynthetic, SetOptions, (uint32_t)); + SB_REGISTER_METHOD(bool, SBTypeSynthetic, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD( + lldb::SBTypeSynthetic &, + SBTypeSynthetic, operator=,(const lldb::SBTypeSynthetic &)); + SB_REGISTER_METHOD(bool, + SBTypeSynthetic, operator==,(lldb::SBTypeSynthetic &)); + SB_REGISTER_METHOD(bool, SBTypeSynthetic, IsEqualTo, + (lldb::SBTypeSynthetic &)); + SB_REGISTER_METHOD(bool, + SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &)); + } + + // SBUnixSignals + { + SB_REGISTER_CONSTRUCTOR(SBUnixSignals, ()); + SB_REGISTER_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &)); + SB_REGISTER_METHOD(const lldb::SBUnixSignals &, + SBUnixSignals, operator=,(const lldb::SBUnixSignals &)); + SB_REGISTER_METHOD(void, SBUnixSignals, Clear, ()); + SB_REGISTER_METHOD_CONST(bool, SBUnixSignals, IsValid, ()); + SB_REGISTER_METHOD_CONST(const char *, SBUnixSignals, GetSignalAsCString, + (int32_t)); + SB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalNumberFromName, + (const char *)); + SB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldSuppress, (int32_t)); + SB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldSuppress, (int32_t, bool)); + SB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldStop, (int32_t)); + SB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldStop, (int32_t, bool)); + SB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldNotify, (int32_t)); + SB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldNotify, (int32_t, bool)); + SB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetNumSignals, ()); + SB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalAtIndex, + (int32_t)); + } + + // SBValue + { + SB_REGISTER_CONSTRUCTOR(SBValue, ()); + SB_REGISTER_CONSTRUCTOR(SBValue, (const lldb::ValueObjectSP &)); + SB_REGISTER_CONSTRUCTOR(SBValue, (const lldb::SBValue &)); + SB_REGISTER_METHOD(lldb::SBValue &, + SBValue, operator=,(const lldb::SBValue &)); + SB_REGISTER_METHOD(bool, SBValue, IsValid, ()); + SB_REGISTER_METHOD(void, SBValue, Clear, ()); + SB_REGISTER_METHOD(lldb::SBError, SBValue, GetError, ()); + SB_REGISTER_METHOD(lldb::user_id_t, SBValue, GetID, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetName, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetTypeName, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetDisplayTypeName, ()); + SB_REGISTER_METHOD(size_t, SBValue, GetByteSize, ()); + SB_REGISTER_METHOD(bool, SBValue, IsInScope, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetValue, ()); + SB_REGISTER_METHOD(lldb::ValueType, SBValue, GetValueType, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetObjectDescription, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetTypeValidatorResult, ()); + SB_REGISTER_METHOD(lldb::SBType, SBValue, GetType, ()); + SB_REGISTER_METHOD(bool, SBValue, GetValueDidChange, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetSummary, ()); + SB_REGISTER_METHOD(const char *, SBValue, GetSummary, + (lldb::SBStream &, lldb::SBTypeSummaryOptions &)); + SB_REGISTER_METHOD(const char *, SBValue, GetLocation, ()); + SB_REGISTER_METHOD(bool, SBValue, SetValueFromCString, (const char *)); + SB_REGISTER_METHOD(bool, SBValue, SetValueFromCString, + (const char *, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBTypeFormat, SBValue, GetTypeFormat, ()); + SB_REGISTER_METHOD(lldb::SBTypeSummary, SBValue, GetTypeSummary, ()); + SB_REGISTER_METHOD(lldb::SBTypeFilter, SBValue, GetTypeFilter, ()); + SB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBValue, GetTypeSynthetic, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateChildAtOffset, + (const char *, uint32_t, lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, Cast, (lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromExpression, + (const char *, const char *)); + SB_REGISTER_METHOD( + lldb::SBValue, SBValue, CreateValueFromExpression, + (const char *, const char *, lldb::SBExpressionOptions &)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromAddress, + (const char *, lldb::addr_t, lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateValueFromData, + (const char *, lldb::SBData, lldb::SBType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildAtIndex, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildAtIndex, + (uint32_t, lldb::DynamicValueType, bool)); + SB_REGISTER_METHOD(uint32_t, SBValue, GetIndexOfChildWithName, + (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName, + (const char *)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName, + (const char *, lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetDynamicValue, + (lldb::DynamicValueType)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetStaticValue, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetNonSyntheticValue, ()); + SB_REGISTER_METHOD(lldb::DynamicValueType, SBValue, GetPreferDynamicValue, + ()); + SB_REGISTER_METHOD(void, SBValue, SetPreferDynamicValue, + (lldb::DynamicValueType)); + SB_REGISTER_METHOD(bool, SBValue, GetPreferSyntheticValue, ()); + SB_REGISTER_METHOD(void, SBValue, SetPreferSyntheticValue, (bool)); + SB_REGISTER_METHOD(bool, SBValue, IsDynamic, ()); + SB_REGISTER_METHOD(bool, SBValue, IsSynthetic, ()); + SB_REGISTER_METHOD(bool, SBValue, IsSyntheticChildrenGenerated, ()); + SB_REGISTER_METHOD(void, SBValue, SetSyntheticChildrenGenerated, (bool)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, GetValueForExpressionPath, + (const char *)); + SB_REGISTER_METHOD(int64_t, SBValue, GetValueAsSigned, + (lldb::SBError &, int64_t)); + SB_REGISTER_METHOD(uint64_t, SBValue, GetValueAsUnsigned, + (lldb::SBError &, uint64_t)); + SB_REGISTER_METHOD(int64_t, SBValue, GetValueAsSigned, (int64_t)); + SB_REGISTER_METHOD(uint64_t, SBValue, GetValueAsUnsigned, (uint64_t)); + SB_REGISTER_METHOD(bool, SBValue, MightHaveChildren, ()); + SB_REGISTER_METHOD(bool, SBValue, IsRuntimeSupportValue, ()); + SB_REGISTER_METHOD(uint32_t, SBValue, GetNumChildren, ()); + SB_REGISTER_METHOD(uint32_t, SBValue, GetNumChildren, (uint32_t)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, Dereference, ()); + SB_REGISTER_METHOD(bool, SBValue, TypeIsPointerType, ()); + SB_REGISTER_METHOD(void *, SBValue, GetOpaqueType, ()); + SB_REGISTER_METHOD(lldb::SBTarget, SBValue, GetTarget, ()); + SB_REGISTER_METHOD(lldb::SBProcess, SBValue, GetProcess, ()); + SB_REGISTER_METHOD(lldb::SBThread, SBValue, GetThread, ()); + SB_REGISTER_METHOD(lldb::SBFrame, SBValue, GetFrame, ()); + SB_REGISTER_METHOD_CONST(lldb::ValueObjectSP, SBValue, GetSP, ()); + SB_REGISTER_METHOD(bool, SBValue, GetExpressionPath, (lldb::SBStream &)); + SB_REGISTER_METHOD(bool, SBValue, GetExpressionPath, + (lldb::SBStream &, bool)); + SB_REGISTER_METHOD(bool, SBValue, GetDescription, (lldb::SBStream &)); + SB_REGISTER_METHOD(lldb::Format, SBValue, GetFormat, ()); + SB_REGISTER_METHOD(void, SBValue, SetFormat, (lldb::Format)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, AddressOf, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBValue, GetLoadAddress, ()); + SB_REGISTER_METHOD(lldb::SBAddress, SBValue, GetAddress, ()); + SB_REGISTER_METHOD(lldb::SBData, SBValue, GetPointeeData, + (uint32_t, uint32_t)); + SB_REGISTER_METHOD(lldb::SBData, SBValue, GetData, ()); + SB_REGISTER_METHOD(bool, SBValue, SetData, + (lldb::SBData &, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBDeclaration, SBValue, GetDeclaration, ()); + SB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, Watch, + (bool, bool, bool, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, Watch, (bool, bool, bool)); + SB_REGISTER_METHOD(lldb::SBWatchpoint, SBValue, WatchPointee, + (bool, bool, bool, lldb::SBError &)); + SB_REGISTER_METHOD(lldb::SBValue, SBValue, Persist, ()); + } + + // SBValueList + { + SB_REGISTER_CONSTRUCTOR(SBValueList, ()); + SB_REGISTER_CONSTRUCTOR(SBValueList, (const lldb::SBValueList &)); + SB_REGISTER_METHOD_CONST(bool, SBValueList, IsValid, ()); + SB_REGISTER_METHOD(void, SBValueList, Clear, ()); + SB_REGISTER_METHOD(const lldb::SBValueList &, + SBValueList, operator=,(const lldb::SBValueList &)); + SB_REGISTER_METHOD(void, SBValueList, Append, (const lldb::SBValue &)); + SB_REGISTER_METHOD(void, SBValueList, Append, (const lldb::SBValueList &)); + SB_REGISTER_METHOD_CONST(lldb::SBValue, SBValueList, GetValueAtIndex, + (uint32_t)); + SB_REGISTER_METHOD_CONST(uint32_t, SBValueList, GetSize, ()); + SB_REGISTER_METHOD(lldb::SBValue, SBValueList, FindValueObjectByUID, + (lldb::user_id_t)); + SB_REGISTER_METHOD_CONST(lldb::SBValue, SBValueList, GetFirstValueByName, + (const char *)); + } + + // SBVariablesOptions + { + SB_REGISTER_CONSTRUCTOR(SBVariablesOptions, ()); + SB_REGISTER_CONSTRUCTOR(SBVariablesOptions, + (const lldb::SBVariablesOptions &)); + SB_REGISTER_METHOD( + lldb::SBVariablesOptions &, + SBVariablesOptions, operator=,(const lldb::SBVariablesOptions &)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, IsValid, ()); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeArguments, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeArguments, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, + GetIncludeRecognizedArguments, + (const lldb::SBTarget &)); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeRecognizedArguments, + (bool)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeLocals, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeLocals, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeStatics, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeStatics, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetInScopeOnly, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetInScopeOnly, (bool)); + SB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, + GetIncludeRuntimeSupportValues, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeRuntimeSupportValues, + (bool)); + SB_REGISTER_METHOD_CONST(lldb::DynamicValueType, SBVariablesOptions, + GetUseDynamic, ()); + SB_REGISTER_METHOD(void, SBVariablesOptions, SetUseDynamic, + (lldb::DynamicValueType)); + } + + // SBWatchpoint + { + SB_REGISTER_CONSTRUCTOR(SBWatchpoint, ()); + SB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &)); + SB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::SBWatchpoint &)); + SB_REGISTER_METHOD(const lldb::SBWatchpoint &, + SBWatchpoint, operator=,(const lldb::SBWatchpoint &)); + SB_REGISTER_METHOD(lldb::watch_id_t, SBWatchpoint, GetID, ()); + SB_REGISTER_METHOD_CONST(bool, SBWatchpoint, IsValid, ()); + SB_REGISTER_METHOD(lldb::SBError, SBWatchpoint, GetError, ()); + SB_REGISTER_METHOD(int32_t, SBWatchpoint, GetHardwareIndex, ()); + SB_REGISTER_METHOD(lldb::addr_t, SBWatchpoint, GetWatchAddress, ()); + SB_REGISTER_METHOD(size_t, SBWatchpoint, GetWatchSize, ()); + SB_REGISTER_METHOD(void, SBWatchpoint, SetEnabled, (bool)); + SB_REGISTER_METHOD(bool, SBWatchpoint, IsEnabled, ()); + SB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetHitCount, ()); + SB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetIgnoreCount, ()); + SB_REGISTER_METHOD(void, SBWatchpoint, SetIgnoreCount, (uint32_t)); + SB_REGISTER_METHOD(const char *, SBWatchpoint, GetCondition, ()); + SB_REGISTER_METHOD(void, SBWatchpoint, SetCondition, (const char *)); + SB_REGISTER_METHOD(bool, SBWatchpoint, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel)); + SB_REGISTER_METHOD(void, SBWatchpoint, Clear, ()); + SB_REGISTER_METHOD_CONST(lldb::WatchpointSP, SBWatchpoint, GetSP, ()); + SB_REGISTER_METHOD(void, SBWatchpoint, SetSP, (const lldb::WatchpointSP &)); + SB_REGISTER_STATIC_METHOD(bool, SBWatchpoint, EventIsWatchpointEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::WatchpointEventType, SBWatchpoint, + GetWatchpointEventTypeFromEvent, + (const lldb::SBEvent &)); + SB_REGISTER_STATIC_METHOD(lldb::SBWatchpoint, SBWatchpoint, + GetWatchpointFromEvent, (const lldb::SBEvent &)); + } +} bool SBReproducer::Replay() const { repro::Loader *loader = repro::Reproducer::Instance().GetLoader(); Index: source/API/SBSection.cpp =================================================================== --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBSection.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBTarget.h" @@ -20,9 +22,13 @@ using namespace lldb; using namespace lldb_private; -SBSection::SBSection() : m_opaque_wp() {} +SBSection::SBSection() : m_opaque_wp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBSection); +} -SBSection::SBSection(const SBSection &rhs) : m_opaque_wp(rhs.m_opaque_wp) {} +SBSection::SBSection(const SBSection &rhs) : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBSection, (const lldb::SBSection &), rhs); +} SBSection::SBSection(const lldb::SectionSP §ion_sp) : m_opaque_wp() // Don't init with section_sp otherwise this will throw if @@ -33,6 +39,9 @@ } const SBSection &SBSection::operator=(const SBSection &rhs) { + SB_RECORD_METHOD(const lldb::SBSection &, + SBSection, operator=,(const lldb::SBSection &), rhs); + m_opaque_wp = rhs.m_opaque_wp; return *this; } @@ -40,11 +49,15 @@ SBSection::~SBSection() {} bool SBSection::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, IsValid); + SectionSP section_sp(GetSP()); return section_sp && section_sp->GetModule().get() != NULL; } const char *SBSection::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBSection, GetName); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetName().GetCString(); @@ -52,6 +65,8 @@ } lldb::SBSection SBSection::GetParent() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSection, SBSection, GetParent); + lldb::SBSection sb_section; SectionSP section_sp(GetSP()); if (section_sp) { @@ -63,6 +78,9 @@ } lldb::SBSection SBSection::FindSubSection(const char *sect_name) { + SB_RECORD_METHOD(lldb::SBSection, SBSection, FindSubSection, (const char *), + sect_name); + lldb::SBSection sb_section; if (sect_name) { SectionSP section_sp(GetSP()); @@ -76,6 +94,8 @@ } size_t SBSection::GetNumSubSections() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBSection, GetNumSubSections); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetChildren().GetSize(); @@ -83,6 +103,9 @@ } lldb::SBSection SBSection::GetSubSectionAtIndex(size_t idx) { + SB_RECORD_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex, (size_t), + idx); + lldb::SBSection sb_section; SectionSP section_sp(GetSP()); if (section_sp) @@ -97,6 +120,8 @@ } lldb::addr_t SBSection::GetFileAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBSection, GetFileAddress); + lldb::addr_t file_addr = LLDB_INVALID_ADDRESS; SectionSP section_sp(GetSP()); if (section_sp) @@ -105,6 +130,9 @@ } lldb::addr_t SBSection::GetLoadAddress(lldb::SBTarget &sb_target) { + SB_RECORD_METHOD(lldb::addr_t, SBSection, GetLoadAddress, (lldb::SBTarget &), + sb_target); + TargetSP target_sp(sb_target.GetSP()); if (target_sp) { SectionSP section_sp(GetSP()); @@ -115,6 +143,8 @@ } lldb::addr_t SBSection::GetByteSize() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBSection, GetByteSize); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetByteSize(); @@ -122,6 +152,8 @@ } uint64_t SBSection::GetFileOffset() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBSection, GetFileOffset); + SectionSP section_sp(GetSP()); if (section_sp) { ModuleSP module_sp(section_sp->GetModule()); @@ -135,15 +167,23 @@ } uint64_t SBSection::GetFileByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBSection, GetFileByteSize); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetFileSize(); return 0; } -SBData SBSection::GetSectionData() { return GetSectionData(0, UINT64_MAX); } +SBData SBSection::GetSectionData() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBSection, GetSectionData); + return GetSectionData(0, UINT64_MAX); +} SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) { + SB_RECORD_METHOD(lldb::SBData, SBSection, GetSectionData, + (uint64_t, uint64_t), offset, size); + SBData sb_data; SectionSP section_sp(GetSP()); if (section_sp) { @@ -181,22 +221,26 @@ } SectionType SBSection::GetSectionType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SectionType, SBSection, GetSectionType); + SectionSP section_sp(GetSP()); if (section_sp.get()) return section_sp->GetType(); return eSectionTypeInvalid; } -uint32_t -SBSection::GetPermissions() const -{ - SectionSP section_sp(GetSP()); - if (section_sp) - return section_sp->GetPermissions(); - return 0; +uint32_t SBSection::GetPermissions() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBSection, GetPermissions); + + SectionSP section_sp(GetSP()); + if (section_sp) + return section_sp->GetPermissions(); + return 0; } uint32_t SBSection::GetTargetByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBSection, GetTargetByteSize); + SectionSP section_sp(GetSP()); if (section_sp.get()) return section_sp->GetTargetByteSize(); @@ -204,6 +248,8 @@ } bool SBSection::operator==(const SBSection &rhs) { + SB_RECORD_METHOD(bool, SBSection, operator==,(const lldb::SBSection &), rhs); + SectionSP lhs_section_sp(GetSP()); SectionSP rhs_section_sp(rhs.GetSP()); if (lhs_section_sp && rhs_section_sp) @@ -212,12 +258,17 @@ } bool SBSection::operator!=(const SBSection &rhs) { + SB_RECORD_METHOD(bool, SBSection, operator!=,(const lldb::SBSection &), rhs); + SectionSP lhs_section_sp(GetSP()); SectionSP rhs_section_sp(rhs.GetSP()); return lhs_section_sp != rhs_section_sp; } bool SBSection::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); SectionSP section_sp(GetSP()); Index: source/API/SBSourceManager.cpp =================================================================== --- source/API/SBSourceManager.cpp +++ source/API/SBSourceManager.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBSourceManager.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBStream.h" @@ -71,14 +73,20 @@ using namespace lldb_private; SBSourceManager::SBSourceManager(const SBDebugger &debugger) { + SB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBDebugger &), debugger); + m_opaque_ap.reset(new SourceManagerImpl(debugger.get_sp())); } SBSourceManager::SBSourceManager(const SBTarget &target) { + SB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBTarget &), target); + m_opaque_ap.reset(new SourceManagerImpl(target.GetSP())); } SBSourceManager::SBSourceManager(const SBSourceManager &rhs) { + SB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBSourceManager &), rhs); + if (&rhs == this) return; @@ -87,6 +95,10 @@ const lldb::SBSourceManager &SBSourceManager:: operator=(const lldb::SBSourceManager &rhs) { + SB_RECORD_METHOD(const lldb::SBSourceManager &, + SBSourceManager, operator=,(const lldb::SBSourceManager &), + rhs); + m_opaque_ap.reset(new SourceManagerImpl(*(rhs.m_opaque_ap.get()))); return *this; } @@ -96,6 +108,12 @@ size_t SBSourceManager::DisplaySourceLinesWithLineNumbers( const SBFileSpec &file, uint32_t line, uint32_t context_before, uint32_t context_after, const char *current_line_cstr, SBStream &s) { + SB_RECORD_METHOD(size_t, SBSourceManager, DisplaySourceLinesWithLineNumbers, + (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t, + const char *, lldb::SBStream &), + file, line, context_before, context_after, current_line_cstr, + s); + const uint32_t column = 0; return DisplaySourceLinesWithLineNumbersAndColumn( file.ref(), line, column, context_before, context_after, @@ -106,6 +124,12 @@ const SBFileSpec &file, uint32_t line, uint32_t column, uint32_t context_before, uint32_t context_after, const char *current_line_cstr, SBStream &s) { + SB_RECORD_METHOD( + size_t, SBSourceManager, DisplaySourceLinesWithLineNumbersAndColumn, + (const lldb::SBFileSpec &, uint32_t, uint32_t, uint32_t, uint32_t, + const char *, lldb::SBStream &), + file, line, column, context_before, context_after, current_line_cstr, s); + if (m_opaque_ap == NULL) return 0; Index: source/API/SBStream.cpp =================================================================== --- source/API/SBStream.cpp +++ source/API/SBStream.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBStream.h" #include "lldb/Core/StreamFile.h" @@ -17,18 +19,25 @@ using namespace lldb; using namespace lldb_private; -SBStream::SBStream() : m_opaque_ap(new StreamString()), m_is_file(false) {} +SBStream::SBStream() : m_opaque_ap(new StreamString()), m_is_file(false) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBStream); +} SBStream::SBStream(SBStream &&rhs) : m_opaque_ap(std::move(rhs.m_opaque_ap)), m_is_file(rhs.m_is_file) {} SBStream::~SBStream() {} -bool SBStream::IsValid() const { return (m_opaque_ap != NULL); } +bool SBStream::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStream, IsValid); + return (m_opaque_ap != NULL); +} // If this stream is not redirected to a file, it will maintain a local cache // for the stream data which can be accessed using this accessor. const char *SBStream::GetData() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBStream, GetData); + if (m_is_file || m_opaque_ap == NULL) return NULL; @@ -38,6 +47,8 @@ // If this stream is not redirected to a file, it will maintain a local cache // for the stream output whose length can be accessed using this accessor. size_t SBStream::GetSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBStream, GetSize); + if (m_is_file || m_opaque_ap == NULL) return 0; @@ -54,6 +65,9 @@ } void SBStream::RedirectToFile(const char *path, bool append) { + SB_RECORD_METHOD(void, SBStream, RedirectToFile, (const char *, bool), path, + append); + if (path == nullptr) return; @@ -87,6 +101,9 @@ } void SBStream::RedirectToFileHandle(FILE *fh, bool transfer_fh_ownership) { + SB_RECORD_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool), fh, + transfer_fh_ownership); + if (fh == nullptr) return; @@ -111,6 +128,9 @@ } void SBStream::RedirectToFileDescriptor(int fd, bool transfer_fh_ownership) { + SB_RECORD_METHOD(void, SBStream, RedirectToFileDescriptor, (int, bool), fd, + transfer_fh_ownership); + std::string local_data; if (m_opaque_ap) { // See if we have any locally backed data. If so, copy it so we can then @@ -142,6 +162,8 @@ } void SBStream::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBStream, Clear); + if (m_opaque_ap) { // See if we have any locally backed data. If so, copy it so we can then // redirect it to the file so we don't lose the data Index: source/API/SBStringList.cpp =================================================================== --- source/API/SBStringList.cpp +++ source/API/SBStringList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBStringList.h" #include "lldb/Utility/StringList.h" @@ -13,7 +15,9 @@ using namespace lldb; using namespace lldb_private; -SBStringList::SBStringList() : m_opaque_ap() {} +SBStringList::SBStringList() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBStringList); +} SBStringList::SBStringList(const lldb_private::StringList *lldb_strings_ptr) : m_opaque_ap() { @@ -22,11 +26,16 @@ } SBStringList::SBStringList(const SBStringList &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBStringList, (const lldb::SBStringList &), rhs); + if (rhs.IsValid()) m_opaque_ap.reset(new lldb_private::StringList(*rhs)); } const SBStringList &SBStringList::operator=(const SBStringList &rhs) { + SB_RECORD_METHOD(const lldb::SBStringList &, + SBStringList, operator=,(const lldb::SBStringList &), rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_ap.reset(new lldb_private::StringList(*rhs)); @@ -46,9 +55,14 @@ return *m_opaque_ap; } -bool SBStringList::IsValid() const { return (m_opaque_ap != NULL); } +bool SBStringList::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStringList, IsValid); + return (m_opaque_ap != NULL); +} void SBStringList::AppendString(const char *str) { + SB_RECORD_METHOD(void, SBStringList, AppendString, (const char *), str); + if (str != NULL) { if (IsValid()) m_opaque_ap->AppendString(str); @@ -58,6 +72,9 @@ } void SBStringList::AppendList(const char **strv, int strc) { + SB_RECORD_METHOD(void, SBStringList, AppendList, (const char **, int), strv, + strc); + if ((strv != NULL) && (strc > 0)) { if (IsValid()) m_opaque_ap->AppendList(strv, strc); @@ -67,6 +84,9 @@ } void SBStringList::AppendList(const SBStringList &strings) { + SB_RECORD_METHOD(void, SBStringList, AppendList, (const lldb::SBStringList &), + strings); + if (strings.IsValid()) { if (!IsValid()) m_opaque_ap.reset(new lldb_private::StringList()); @@ -81,6 +101,8 @@ } uint32_t SBStringList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBStringList, GetSize); + if (IsValid()) { return m_opaque_ap->GetSize(); } @@ -88,6 +110,8 @@ } const char *SBStringList::GetStringAtIndex(size_t idx) { + SB_RECORD_METHOD(const char *, SBStringList, GetStringAtIndex, (size_t), idx); + if (IsValid()) { return m_opaque_ap->GetStringAtIndex(idx); } @@ -95,6 +119,9 @@ } const char *SBStringList::GetStringAtIndex(size_t idx) const { + SB_RECORD_METHOD_CONST(const char *, SBStringList, GetStringAtIndex, (size_t), + idx); + if (IsValid()) { return m_opaque_ap->GetStringAtIndex(idx); } @@ -102,6 +129,8 @@ } void SBStringList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBStringList, Clear); + if (IsValid()) { m_opaque_ap->Clear(); } Index: source/API/SBStructuredData.cpp =================================================================== --- source/API/SBStructuredData.cpp +++ source/API/SBStructuredData.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBStructuredData.h" #include "lldb/API/SBStream.h" @@ -23,26 +25,43 @@ #pragma mark-- #pragma mark SBStructuredData -SBStructuredData::SBStructuredData() : m_impl_up(new StructuredDataImpl()) {} +SBStructuredData::SBStructuredData() : m_impl_up(new StructuredDataImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBStructuredData); +} SBStructuredData::SBStructuredData(const lldb::SBStructuredData &rhs) - : m_impl_up(new StructuredDataImpl(*rhs.m_impl_up.get())) {} + : m_impl_up(new StructuredDataImpl(*rhs.m_impl_up.get())) { + SB_RECORD_CONSTRUCTOR(SBStructuredData, (const lldb::SBStructuredData &), + rhs); +} SBStructuredData::SBStructuredData(const lldb::EventSP &event_sp) - : m_impl_up(new StructuredDataImpl(event_sp)) {} + : m_impl_up(new StructuredDataImpl(event_sp)) { + SB_RECORD_CONSTRUCTOR(SBStructuredData, (const lldb::EventSP &), event_sp); +} SBStructuredData::SBStructuredData(lldb_private::StructuredDataImpl *impl) - : m_impl_up(impl) {} + : m_impl_up(impl) { + SB_RECORD_CONSTRUCTOR(SBStructuredData, (lldb_private::StructuredDataImpl *), + impl); +} SBStructuredData::~SBStructuredData() {} SBStructuredData &SBStructuredData:: operator=(const lldb::SBStructuredData &rhs) { + SB_RECORD_METHOD(lldb::SBStructuredData &, + SBStructuredData, operator=,(const lldb::SBStructuredData &), + rhs); + *m_impl_up = *rhs.m_impl_up; return *this; } lldb::SBError SBStructuredData::SetFromJSON(lldb::SBStream &stream) { + SB_RECORD_METHOD(lldb::SBError, SBStructuredData, SetFromJSON, + (lldb::SBStream &), stream); + lldb::SBError error; std::string json_str(stream.GetData()); @@ -54,17 +73,29 @@ return error; } -bool SBStructuredData::IsValid() const { return m_impl_up->IsValid(); } +bool SBStructuredData::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStructuredData, IsValid); + return m_impl_up->IsValid(); +} -void SBStructuredData::Clear() { m_impl_up->Clear(); } +void SBStructuredData::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBStructuredData, Clear); + m_impl_up->Clear(); +} SBError SBStructuredData::GetAsJSON(lldb::SBStream &stream) const { + SB_RECORD_METHOD_CONST(lldb::SBError, SBStructuredData, GetAsJSON, + (lldb::SBStream &), stream); + SBError error; error.SetError(m_impl_up->GetAsJSON(stream.ref())); return error; } lldb::SBError SBStructuredData::GetDescription(lldb::SBStream &stream) const { + SB_RECORD_METHOD_CONST(lldb::SBError, SBStructuredData, GetDescription, + (lldb::SBStream &), stream); + Status error = m_impl_up->GetDescription(stream.ref()); SBError sb_error; sb_error.SetError(error); @@ -72,14 +103,22 @@ } StructuredDataType SBStructuredData::GetType() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::StructuredDataType, SBStructuredData, + GetType); + return (m_impl_up ? m_impl_up->GetType() : eStructuredDataTypeInvalid); } size_t SBStructuredData::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(size_t, SBStructuredData, GetSize); + return (m_impl_up ? m_impl_up->GetSize() : 0); } bool SBStructuredData::GetKeys(lldb::SBStringList &keys) const { + SB_RECORD_METHOD_CONST(bool, SBStructuredData, GetKeys, + (lldb::SBStringList &), keys); + if (!m_impl_up) return false; @@ -107,6 +146,9 @@ } lldb::SBStructuredData SBStructuredData::GetValueForKey(const char *key) const { + SB_RECORD_METHOD_CONST(lldb::SBStructuredData, SBStructuredData, + GetValueForKey, (const char *), key); + if (!m_impl_up) return SBStructuredData(); @@ -116,6 +158,9 @@ } lldb::SBStructuredData SBStructuredData::GetItemAtIndex(size_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBStructuredData, SBStructuredData, + GetItemAtIndex, (size_t), idx); + if (!m_impl_up) return SBStructuredData(); @@ -125,17 +170,29 @@ } uint64_t SBStructuredData::GetIntegerValue(uint64_t fail_value) const { + SB_RECORD_METHOD_CONST(uint64_t, SBStructuredData, GetIntegerValue, + (uint64_t), fail_value); + return (m_impl_up ? m_impl_up->GetIntegerValue(fail_value) : fail_value); } double SBStructuredData::GetFloatValue(double fail_value) const { + SB_RECORD_METHOD_CONST(double, SBStructuredData, GetFloatValue, (double), + fail_value); + return (m_impl_up ? m_impl_up->GetFloatValue(fail_value) : fail_value); } bool SBStructuredData::GetBooleanValue(bool fail_value) const { + SB_RECORD_METHOD_CONST(bool, SBStructuredData, GetBooleanValue, (bool), + fail_value); + return (m_impl_up ? m_impl_up->GetBooleanValue(fail_value) : fail_value); } size_t SBStructuredData::GetStringValue(char *dst, size_t dst_len) const { + SB_RECORD_METHOD_CONST(size_t, SBStructuredData, GetStringValue, + (char *, size_t), dst, dst_len); + return (m_impl_up ? m_impl_up->GetStringValue(dst, dst_len) : 0); } Index: source/API/SBSymbol.cpp =================================================================== --- source/API/SBSymbol.cpp +++ source/API/SBSymbol.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBSymbol.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Disassembler.h" @@ -18,15 +20,21 @@ using namespace lldb; using namespace lldb_private; -SBSymbol::SBSymbol() : m_opaque_ptr(NULL) {} +SBSymbol::SBSymbol() : m_opaque_ptr(NULL) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBSymbol); +} SBSymbol::SBSymbol(lldb_private::Symbol *lldb_object_ptr) : m_opaque_ptr(lldb_object_ptr) {} -SBSymbol::SBSymbol(const lldb::SBSymbol &rhs) - : m_opaque_ptr(rhs.m_opaque_ptr) {} +SBSymbol::SBSymbol(const lldb::SBSymbol &rhs) : m_opaque_ptr(rhs.m_opaque_ptr) { + SB_RECORD_CONSTRUCTOR(SBSymbol, (const lldb::SBSymbol &), rhs); +} const SBSymbol &SBSymbol::operator=(const SBSymbol &rhs) { + SB_RECORD_METHOD(const lldb::SBSymbol &, + SBSymbol, operator=,(const lldb::SBSymbol &), rhs); + m_opaque_ptr = rhs.m_opaque_ptr; return *this; } @@ -37,9 +45,14 @@ m_opaque_ptr = lldb_object_ptr; } -bool SBSymbol::IsValid() const { return m_opaque_ptr != NULL; } +bool SBSymbol::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbol, IsValid); + return m_opaque_ptr != NULL; +} const char *SBSymbol::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBSymbol, GetName); + const char *name = NULL; if (m_opaque_ptr) name = m_opaque_ptr->GetName().AsCString(); @@ -52,6 +65,8 @@ } const char *SBSymbol::GetDisplayName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBSymbol, GetDisplayName); + const char *name = NULL; if (m_opaque_ptr) name = m_opaque_ptr->GetMangled() @@ -66,6 +81,8 @@ } const char *SBSymbol::GetMangledName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBSymbol, GetMangledName); + const char *name = NULL; if (m_opaque_ptr) name = m_opaque_ptr->GetMangled().GetMangledName().AsCString(); @@ -78,14 +95,23 @@ } bool SBSymbol::operator==(const SBSymbol &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBSymbol, operator==,(const lldb::SBSymbol &), + rhs); + return m_opaque_ptr == rhs.m_opaque_ptr; } bool SBSymbol::operator!=(const SBSymbol &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBSymbol, operator!=,(const lldb::SBSymbol &), + rhs); + return m_opaque_ptr != rhs.m_opaque_ptr; } bool SBSymbol::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBSymbol, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ptr) { @@ -97,11 +123,17 @@ } SBInstructionList SBSymbol::GetInstructions(SBTarget target) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions, + (lldb::SBTarget), target); + return GetInstructions(target, NULL); } SBInstructionList SBSymbol::GetInstructions(SBTarget target, const char *flavor_string) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions, + (lldb::SBTarget, const char *), target, flavor_string); + SBInstructionList sb_instructions; if (m_opaque_ptr) { ExecutionContext exe_ctx; @@ -132,6 +164,8 @@ void SBSymbol::reset(lldb_private::Symbol *symbol) { m_opaque_ptr = symbol; } SBAddress SBSymbol::GetStartAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBSymbol, GetStartAddress); + SBAddress addr; if (m_opaque_ptr && m_opaque_ptr->ValueIsAddress()) { addr.SetAddress(&m_opaque_ptr->GetAddressRef()); @@ -140,6 +174,8 @@ } SBAddress SBSymbol::GetEndAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBSymbol, GetEndAddress); + SBAddress addr; if (m_opaque_ptr && m_opaque_ptr->ValueIsAddress()) { lldb::addr_t range_size = m_opaque_ptr->GetByteSize(); @@ -152,24 +188,32 @@ } uint32_t SBSymbol::GetPrologueByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBSymbol, GetPrologueByteSize); + if (m_opaque_ptr) return m_opaque_ptr->GetPrologueByteSize(); return 0; } SymbolType SBSymbol::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SymbolType, SBSymbol, GetType); + if (m_opaque_ptr) return m_opaque_ptr->GetType(); return eSymbolTypeInvalid; } bool SBSymbol::IsExternal() { + SB_RECORD_METHOD_NO_ARGS(bool, SBSymbol, IsExternal); + if (m_opaque_ptr) return m_opaque_ptr->IsExternal(); return false; } bool SBSymbol::IsSynthetic() { + SB_RECORD_METHOD_NO_ARGS(bool, SBSymbol, IsSynthetic); + if (m_opaque_ptr) return m_opaque_ptr->IsSynthetic(); return false; Index: source/API/SBSymbolContext.cpp =================================================================== --- source/API/SBSymbolContext.cpp +++ source/API/SBSymbolContext.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBSymbolContext.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Module.h" @@ -17,14 +19,21 @@ using namespace lldb; using namespace lldb_private; -SBSymbolContext::SBSymbolContext() : m_opaque_ap() {} +SBSymbolContext::SBSymbolContext() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBSymbolContext); +} SBSymbolContext::SBSymbolContext(const SymbolContext *sc_ptr) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBSymbolContext, (const lldb_private::SymbolContext *), + sc_ptr); + if (sc_ptr) m_opaque_ap.reset(new SymbolContext(*sc_ptr)); } SBSymbolContext::SBSymbolContext(const SBSymbolContext &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBSymbolContext, (const lldb::SBSymbolContext &), rhs); + if (rhs.IsValid()) { if (m_opaque_ap) *m_opaque_ap = *rhs.m_opaque_ap; @@ -36,6 +45,10 @@ SBSymbolContext::~SBSymbolContext() {} const SBSymbolContext &SBSymbolContext::operator=(const SBSymbolContext &rhs) { + SB_RECORD_METHOD(const lldb::SBSymbolContext &, + SBSymbolContext, operator=,(const lldb::SBSymbolContext &), + rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_ap.reset(new lldb_private::SymbolContext(*rhs.m_opaque_ap)); @@ -55,9 +68,14 @@ } } -bool SBSymbolContext::IsValid() const { return m_opaque_ap != NULL; } +bool SBSymbolContext::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContext, IsValid); + return m_opaque_ap != NULL; +} SBModule SBSymbolContext::GetModule() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBModule, SBSymbolContext, GetModule); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBModule sb_module; @@ -79,10 +97,15 @@ } SBCompileUnit SBSymbolContext::GetCompileUnit() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBCompileUnit, SBSymbolContext, + GetCompileUnit); + return SBCompileUnit(m_opaque_ap ? m_opaque_ap->comp_unit : NULL); } SBFunction SBSymbolContext::GetFunction() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFunction, SBSymbolContext, GetFunction); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); Function *function = NULL; @@ -101,10 +124,14 @@ } SBBlock SBSymbolContext::GetBlock() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBSymbolContext, GetBlock); + return SBBlock(m_opaque_ap ? m_opaque_ap->block : NULL); } SBLineEntry SBSymbolContext::GetLineEntry() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBLineEntry, SBSymbolContext, GetLineEntry); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBLineEntry sb_line_entry; @@ -121,6 +148,8 @@ } SBSymbol SBSymbolContext::GetSymbol() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSymbol, SBSymbolContext, GetSymbol); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); Symbol *symbol = NULL; @@ -139,22 +168,35 @@ } void SBSymbolContext::SetModule(lldb::SBModule module) { + SB_RECORD_METHOD(void, SBSymbolContext, SetModule, (lldb::SBModule), module); + ref().module_sp = module.GetSP(); } void SBSymbolContext::SetCompileUnit(lldb::SBCompileUnit compile_unit) { + SB_RECORD_METHOD(void, SBSymbolContext, SetCompileUnit, (lldb::SBCompileUnit), + compile_unit); + ref().comp_unit = compile_unit.get(); } void SBSymbolContext::SetFunction(lldb::SBFunction function) { + SB_RECORD_METHOD(void, SBSymbolContext, SetFunction, (lldb::SBFunction), + function); + ref().function = function.get(); } void SBSymbolContext::SetBlock(lldb::SBBlock block) { + SB_RECORD_METHOD(void, SBSymbolContext, SetBlock, (lldb::SBBlock), block); + ref().block = block.GetPtr(); } void SBSymbolContext::SetLineEntry(lldb::SBLineEntry line_entry) { + SB_RECORD_METHOD(void, SBSymbolContext, SetLineEntry, (lldb::SBLineEntry), + line_entry); + if (line_entry.IsValid()) ref().line_entry = line_entry.ref(); else @@ -162,6 +204,8 @@ } void SBSymbolContext::SetSymbol(lldb::SBSymbol symbol) { + SB_RECORD_METHOD(void, SBSymbolContext, SetSymbol, (lldb::SBSymbol), symbol); + ref().symbol = symbol.get(); } @@ -191,6 +235,9 @@ } bool SBSymbolContext::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBSymbolContext, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); if (m_opaque_ap) { @@ -204,6 +251,11 @@ SBSymbolContext SBSymbolContext::GetParentOfInlinedScope(const SBAddress &curr_frame_pc, SBAddress &parent_frame_addr) const { + SB_RECORD_METHOD_CONST(lldb::SBSymbolContext, SBSymbolContext, + GetParentOfInlinedScope, + (const lldb::SBAddress &, lldb::SBAddress &), + curr_frame_pc, parent_frame_addr); + SBSymbolContext sb_sc; if (m_opaque_ap.get() && curr_frame_pc.IsValid()) { if (m_opaque_ap->GetParentOfInlinedScope(curr_frame_pc.ref(), sb_sc.ref(), Index: source/API/SBSymbolContextList.cpp =================================================================== --- source/API/SBSymbolContextList.cpp +++ source/API/SBSymbolContextList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBSymbolContextList.h" #include "lldb/API/SBStream.h" #include "lldb/Symbol/SymbolContext.h" @@ -14,15 +16,24 @@ using namespace lldb_private; SBSymbolContextList::SBSymbolContextList() - : m_opaque_ap(new SymbolContextList()) {} + : m_opaque_ap(new SymbolContextList()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBSymbolContextList); +} SBSymbolContextList::SBSymbolContextList(const SBSymbolContextList &rhs) - : m_opaque_ap(new SymbolContextList(*rhs.m_opaque_ap)) {} + : m_opaque_ap(new SymbolContextList(*rhs.m_opaque_ap)) { + SB_RECORD_CONSTRUCTOR(SBSymbolContextList, + (const lldb::SBSymbolContextList &), rhs); +} SBSymbolContextList::~SBSymbolContextList() {} const SBSymbolContextList &SBSymbolContextList:: operator=(const SBSymbolContextList &rhs) { + SB_RECORD_METHOD( + const lldb::SBSymbolContextList &, + SBSymbolContextList, operator=,(const lldb::SBSymbolContextList &), rhs); + if (this != &rhs) { *m_opaque_ap = *rhs.m_opaque_ap; } @@ -30,12 +41,17 @@ } uint32_t SBSymbolContextList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBSymbolContextList, GetSize); + if (m_opaque_ap) return m_opaque_ap->GetSize(); return 0; } SBSymbolContext SBSymbolContextList::GetContextAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBSymbolContext, SBSymbolContextList, + GetContextAtIndex, (uint32_t), idx); + SBSymbolContext sb_sc; if (m_opaque_ap) { SymbolContext sc; @@ -47,21 +63,32 @@ } void SBSymbolContextList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBSymbolContextList, Clear); + if (m_opaque_ap) m_opaque_ap->Clear(); } void SBSymbolContextList::Append(SBSymbolContext &sc) { + SB_RECORD_METHOD(void, SBSymbolContextList, Append, (lldb::SBSymbolContext &), + sc); + if (sc.IsValid() && m_opaque_ap.get()) m_opaque_ap->Append(*sc); } void SBSymbolContextList::Append(SBSymbolContextList &sc_list) { + SB_RECORD_METHOD(void, SBSymbolContextList, Append, + (lldb::SBSymbolContextList &), sc_list); + if (sc_list.IsValid() && m_opaque_ap.get()) m_opaque_ap->Append(*sc_list); } -bool SBSymbolContextList::IsValid() const { return m_opaque_ap != NULL; } +bool SBSymbolContextList::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContextList, IsValid); + return m_opaque_ap != NULL; +} lldb_private::SymbolContextList *SBSymbolContextList::operator->() const { return m_opaque_ap.get(); @@ -73,6 +100,9 @@ } bool SBSymbolContextList::GetDescription(lldb::SBStream &description) { + SB_RECORD_METHOD(bool, SBSymbolContextList, GetDescription, + (lldb::SBStream &), description); + Stream &strm = description.ref(); if (m_opaque_ap) m_opaque_ap->GetDescription(&strm, lldb::eDescriptionLevelFull, NULL); Index: source/API/SBTarget.cpp =================================================================== --- source/API/SBTarget.cpp +++ source/API/SBTarget.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTarget.h" #include "lldb/lldb-public.h" @@ -99,13 +101,22 @@ //---------------------------------------------------------------------- // SBTarget constructor //---------------------------------------------------------------------- -SBTarget::SBTarget() : m_opaque_sp() {} +SBTarget::SBTarget() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTarget); +} -SBTarget::SBTarget(const SBTarget &rhs) : m_opaque_sp(rhs.m_opaque_sp) {} +SBTarget::SBTarget(const SBTarget &rhs) : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTarget, (const lldb::SBTarget &), rhs); +} -SBTarget::SBTarget(const TargetSP &target_sp) : m_opaque_sp(target_sp) {} +SBTarget::SBTarget(const TargetSP &target_sp) : m_opaque_sp(target_sp) { + SB_RECORD_CONSTRUCTOR(SBTarget, (const lldb::TargetSP &), target_sp); +} const SBTarget &SBTarget::operator=(const SBTarget &rhs) { + SB_RECORD_METHOD(const lldb::SBTarget &, + SBTarget, operator=,(const lldb::SBTarget &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -117,14 +128,23 @@ SBTarget::~SBTarget() {} bool SBTarget::EventIsTargetEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBTarget, EventIsTargetEvent, + (const lldb::SBEvent &), event); + return Target::TargetEventData::GetEventDataFromEvent(event.get()) != NULL; } SBTarget SBTarget::GetTargetFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBTarget, SBTarget, GetTargetFromEvent, + (const lldb::SBEvent &), event); + return Target::TargetEventData::GetTargetFromEvent(event.get()); } uint32_t SBTarget::GetNumModulesFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(uint32_t, SBTarget, GetNumModulesFromEvent, + (const lldb::SBEvent &), event); + const ModuleList module_list = Target::TargetEventData::GetModuleListFromEvent(event.get()); return module_list.GetSize(); @@ -132,20 +152,30 @@ SBModule SBTarget::GetModuleAtIndexFromEvent(const uint32_t idx, const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndexFromEvent, + (const uint32_t, const lldb::SBEvent &), idx, event); + const ModuleList module_list = Target::TargetEventData::GetModuleListFromEvent(event.get()); return SBModule(module_list.GetModuleAtIndex(idx)); } const char *SBTarget::GetBroadcasterClassName() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBTarget, + GetBroadcasterClassName); + return Target::GetStaticBroadcasterClass().AsCString(); } bool SBTarget::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTarget, IsValid); + return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid(); } SBProcess SBTarget::GetProcess() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBTarget, GetProcess); + SBProcess sb_process; ProcessSP process_sp; TargetSP target_sp(GetSP()); @@ -164,6 +194,8 @@ } SBPlatform SBTarget::GetPlatform() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBPlatform, SBTarget, GetPlatform); + TargetSP target_sp(GetSP()); if (!target_sp) return SBPlatform(); @@ -175,6 +207,8 @@ } SBDebugger SBTarget::GetDebugger() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBDebugger, SBTarget, GetDebugger); + SBDebugger debugger; TargetSP target_sp(GetSP()); if (target_sp) @@ -183,6 +217,8 @@ } SBStructuredData SBTarget::GetStatistics() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBStructuredData, SBTarget, GetStatistics); + SBStructuredData data; TargetSP target_sp(GetSP()); if (!target_sp) @@ -202,6 +238,8 @@ } void SBTarget::SetCollectingStats(bool v) { + SB_RECORD_METHOD(void, SBTarget, SetCollectingStats, (bool), v); + TargetSP target_sp(GetSP()); if (!target_sp) return; @@ -209,19 +247,26 @@ } bool SBTarget::GetCollectingStats() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, GetCollectingStats); + TargetSP target_sp(GetSP()); if (!target_sp) return false; return target_sp->GetCollectingStats(); } - SBProcess SBTarget::LoadCore(const char *core_file) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, LoadCore, (const char *), + core_file); + lldb::SBError error; // Ignored return LoadCore(core_file, error); } SBProcess SBTarget::LoadCore(const char *core_file, lldb::SBError &error) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, LoadCore, + (const char *, lldb::SBError &), core_file, error); + SBProcess sb_process; TargetSP target_sp(GetSP()); if (target_sp) { @@ -244,6 +289,10 @@ SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp, const char *working_directory) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, LaunchSimple, + (const char **, const char **, const char *), argv, envp, + working_directory); + char *stdin_path = NULL; char *stdout_path = NULL; char *stderr_path = NULL; @@ -256,6 +305,8 @@ } SBError SBTarget::Install() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBTarget, Install); + SBError sb_error; TargetSP target_sp(GetSP()); if (target_sp) { @@ -271,6 +322,13 @@ const char *working_directory, uint32_t launch_flags, // See LaunchFlags bool stop_at_entry, lldb::SBError &error) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, Launch, + (lldb::SBListener &, const char **, const char **, + const char *, const char *, const char *, const char *, + uint32_t, bool, lldb::SBError &), + listener, argv, envp, stdin_path, stdout_path, stderr_path, + working_directory, launch_flags, stop_at_entry, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -358,6 +416,10 @@ } SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, Launch, + (lldb::SBLaunchInfo &, lldb::SBError &), sb_launch_info, + error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -414,6 +476,10 @@ } lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, Attach, + (lldb::SBAttachInfo &, lldb::SBError &), sb_attach_info, + error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -464,7 +530,11 @@ SBListener &listener, lldb::pid_t pid, // The process ID to attach to SBError &error // An error explaining what went wrong if attach fails - ) { +) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, AttachToProcessWithID, + (lldb::SBListener &, lldb::pid_t, lldb::SBError &), listener, + pid, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -502,7 +572,11 @@ const char *name, // basename of process to attach to bool wait_for, // if true wait for a new instance of "name" to be launched SBError &error // An error explaining what went wrong if attach fails - ) { +) { + SB_RECORD_METHOD(lldb::SBProcess, SBTarget, AttachToProcessWithName, + (lldb::SBListener &, const char *, bool, lldb::SBError &), + listener, name, wait_for, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -536,6 +610,11 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url, const char *plugin_name, SBError &error) { + SB_RECORD_METHOD( + lldb::SBProcess, SBTarget, ConnectRemote, + (lldb::SBListener &, const char *, const char *, lldb::SBError &), + listener, url, plugin_name, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBProcess sb_process; @@ -574,6 +653,7 @@ } SBFileSpec SBTarget::GetExecutable() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBTarget, GetExecutable); SBFileSpec exe_file_spec; TargetSP target_sp(GetSP()); @@ -594,10 +674,16 @@ } bool SBTarget::operator==(const SBTarget &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBTarget, operator==,(const lldb::SBTarget &), + rhs); + return m_opaque_sp.get() == rhs.m_opaque_sp.get(); } bool SBTarget::operator!=(const SBTarget &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBTarget, operator!=,(const lldb::SBTarget &), + rhs); + return m_opaque_sp.get() != rhs.m_opaque_sp.get(); } @@ -608,6 +694,9 @@ } lldb::SBAddress SBTarget::ResolveLoadAddress(lldb::addr_t vm_addr) { + SB_RECORD_METHOD(lldb::SBAddress, SBTarget, ResolveLoadAddress, + (lldb::addr_t), vm_addr); + lldb::SBAddress sb_addr; Address &addr = sb_addr.ref(); TargetSP target_sp(GetSP()); @@ -624,6 +713,9 @@ } lldb::SBAddress SBTarget::ResolveFileAddress(lldb::addr_t file_addr) { + SB_RECORD_METHOD(lldb::SBAddress, SBTarget, ResolveFileAddress, + (lldb::addr_t), file_addr); + lldb::SBAddress sb_addr; Address &addr = sb_addr.ref(); TargetSP target_sp(GetSP()); @@ -639,6 +731,9 @@ lldb::SBAddress SBTarget::ResolvePastLoadAddress(uint32_t stop_id, lldb::addr_t vm_addr) { + SB_RECORD_METHOD(lldb::SBAddress, SBTarget, ResolvePastLoadAddress, + (uint32_t, lldb::addr_t), stop_id, vm_addr); + lldb::SBAddress sb_addr; Address &addr = sb_addr.ref(); TargetSP target_sp(GetSP()); @@ -657,6 +752,10 @@ SBSymbolContext SBTarget::ResolveSymbolContextForAddress(const SBAddress &addr, uint32_t resolve_scope) { + SB_RECORD_METHOD(lldb::SBSymbolContext, SBTarget, + ResolveSymbolContextForAddress, + (const lldb::SBAddress &, uint32_t), addr, resolve_scope); + SBSymbolContext sc; SymbolContextItem scope = static_cast(resolve_scope); if (addr.IsValid()) { @@ -686,6 +785,9 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(const char *file, uint32_t line) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const char *, uint32_t), file, line); + return SBBreakpoint( BreakpointCreateByLocation(SBFileSpec(file, false), line)); } @@ -693,12 +795,19 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec, uint32_t line) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t), sb_file_spec, line); + return BreakpointCreateByLocation(sb_file_spec, line, 0); } SBBreakpoint SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec, uint32_t line, lldb::addr_t offset) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, lldb::addr_t), + sb_file_spec, line, offset); + SBFileSpecList empty_list; return BreakpointCreateByLocation(sb_file_spec, line, offset, empty_list); } @@ -707,6 +816,11 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec, uint32_t line, lldb::addr_t offset, SBFileSpecList &sb_module_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, lldb::addr_t, + lldb::SBFileSpecList &), + sb_file_spec, line, offset, sb_module_list); + return BreakpointCreateByLocation(sb_file_spec, line, 0, offset, sb_module_list); } @@ -714,6 +828,11 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation( const SBFileSpec &sb_file_spec, uint32_t line, uint32_t column, lldb::addr_t offset, SBFileSpecList &sb_module_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation, + (const lldb::SBFileSpec &, uint32_t, uint32_t, lldb::addr_t, + lldb::SBFileSpecList &), + sb_file_spec, line, column, offset, sb_module_list); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -751,6 +870,9 @@ SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name, const char *module_name) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, const char *), symbol_name, module_name); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -788,6 +910,11 @@ SBTarget::BreakpointCreateByName(const char *symbol_name, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &), + symbol_name, module_list, comp_unit_list); + lldb::FunctionNameType name_type_mask = eFunctionNameTypeAuto; return BreakpointCreateByName(symbol_name, name_type_mask, eLanguageTypeUnknown, module_list, @@ -797,6 +924,11 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByName( const char *symbol_name, uint32_t name_type_mask, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, uint32_t, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &), + symbol_name, name_type_mask, module_list, comp_unit_list); + return BreakpointCreateByName(symbol_name, name_type_mask, eLanguageTypeUnknown, module_list, comp_unit_list); @@ -806,6 +938,12 @@ const char *symbol_name, uint32_t name_type_mask, LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName, + (const char *, uint32_t, lldb::LanguageType, + const lldb::SBFileSpecList &, const lldb::SBFileSpecList &), + symbol_name, name_type_mask, symbol_language, module_list, + comp_unit_list); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -833,6 +971,12 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames( const char *symbol_names[], uint32_t num_names, uint32_t name_type_mask, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, + const lldb::SBFileSpecList &, const lldb::SBFileSpecList &), + symbol_names, num_names, name_type_mask, module_list, + comp_unit_list); + return BreakpointCreateByNames(symbol_names, num_names, name_type_mask, eLanguageTypeUnknown, module_list, comp_unit_list); @@ -842,6 +986,12 @@ const char *symbol_names[], uint32_t num_names, uint32_t name_type_mask, LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, lldb::LanguageType, + const lldb::SBFileSpecList &, const lldb::SBFileSpecList &), + symbol_names, num_names, name_type_mask, symbol_language, + module_list, comp_unit_list); + return BreakpointCreateByNames(symbol_names, num_names, name_type_mask, eLanguageTypeUnknown, 0, module_list, comp_unit_list); @@ -851,6 +1001,13 @@ const char *symbol_names[], uint32_t num_names, uint32_t name_type_mask, LanguageType symbol_language, lldb::addr_t offset, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByNames, + (const char **, uint32_t, uint32_t, lldb::LanguageType, + lldb::addr_t, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &), + symbol_names, num_names, name_type_mask, symbol_language, + offset, module_list, comp_unit_list); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -889,6 +1046,10 @@ SBBreakpoint SBTarget::BreakpointCreateByRegex(const char *symbol_name_regex, const char *module_name) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, const char *), symbol_name_regex, + module_name); + SBFileSpecList module_spec_list; SBFileSpecList comp_unit_list; if (module_name && module_name[0]) { @@ -902,6 +1063,11 @@ SBTarget::BreakpointCreateByRegex(const char *symbol_name_regex, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &), + symbol_name_regex, module_list, comp_unit_list); + return BreakpointCreateByRegex(symbol_name_regex, eLanguageTypeUnknown, module_list, comp_unit_list); } @@ -909,6 +1075,12 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByRegex( const char *symbol_name_regex, LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByRegex, + (const char *, lldb::LanguageType, + const lldb::SBFileSpecList &, const lldb::SBFileSpecList &), + symbol_name_regex, symbol_language, module_list, + comp_unit_list); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -935,6 +1107,9 @@ } SBBreakpoint SBTarget::BreakpointCreateByAddress(addr_t address) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByAddress, + (lldb::addr_t), address); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -956,6 +1131,9 @@ } SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySBAddress, + (lldb::SBAddress &), sb_address); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -990,6 +1168,10 @@ SBTarget::BreakpointCreateBySourceRegex(const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpec &, const char *), + source_regex, source_file, module_name); + SBFileSpecList module_spec_list; if (module_name && module_name[0]) { @@ -1008,6 +1190,11 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex( const char *source_regex, const SBFileSpecList &module_list, const lldb::SBFileSpecList &source_file_list) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &), + source_regex, module_list, source_file_list); + return BreakpointCreateBySourceRegex(source_regex, module_list, source_file_list, SBStringList()); } @@ -1016,6 +1203,11 @@ const char *source_regex, const SBFileSpecList &module_list, const lldb::SBFileSpecList &source_file_list, const SBStringList &func_names) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySourceRegex, + (const char *, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &, const lldb::SBStringList &), + source_regex, module_list, source_file_list, func_names); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -1047,6 +1239,10 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateForException(lldb::LanguageType language, bool catch_bp, bool throw_bp) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateForException, + (lldb::LanguageType, bool, bool), language, catch_bp, + throw_bp); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -1069,13 +1265,16 @@ return sb_bp; } -lldb::SBBreakpoint -SBTarget::BreakpointCreateFromScript(const char *class_name, - SBStructuredData &extra_args, - const SBFileSpecList &module_list, - const SBFileSpecList &file_list, - bool request_hardware) -{ +lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript( + const char *class_name, SBStructuredData &extra_args, + const SBFileSpecList &module_list, const SBFileSpecList &file_list, + bool request_hardware) { + SB_RECORD_METHOD( + lldb::SBBreakpoint, SBTarget, BreakpointCreateFromScript, + (const char *, lldb::SBStructuredData &, const lldb::SBFileSpecList &, + const lldb::SBFileSpecList &, bool), + class_name, extra_args, module_list, file_list, request_hardware); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -1104,8 +1303,9 @@ return sb_bp; } - uint32_t SBTarget::GetNumBreakpoints() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetNumBreakpoints); + TargetSP target_sp(GetSP()); if (target_sp) { // The breakpoint list is thread safe, no need to lock @@ -1115,6 +1315,9 @@ } SBBreakpoint SBTarget::GetBreakpointAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBBreakpoint, SBTarget, GetBreakpointAtIndex, + (uint32_t), idx); + SBBreakpoint sb_breakpoint; TargetSP target_sp(GetSP()); if (target_sp) { @@ -1125,6 +1328,8 @@ } bool SBTarget::BreakpointDelete(break_id_t bp_id) { + SB_RECORD_METHOD(bool, SBTarget, BreakpointDelete, (lldb::break_id_t), bp_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = false; @@ -1143,6 +1348,9 @@ } SBBreakpoint SBTarget::FindBreakpointByID(break_id_t bp_id) { + SB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, FindBreakpointByID, + (lldb::break_id_t), bp_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_breakpoint; @@ -1163,6 +1371,9 @@ bool SBTarget::FindBreakpointsByName(const char *name, SBBreakpointList &bkpts) { + SB_RECORD_METHOD(bool, SBTarget, FindBreakpointsByName, + (const char *, lldb::SBBreakpointList &), name, bkpts); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1178,8 +1389,10 @@ return true; } -void SBTarget::GetBreakpointNames(SBStringList &names) -{ +void SBTarget::GetBreakpointNames(SBStringList &names) { + SB_RECORD_METHOD(void, SBTarget, GetBreakpointNames, (lldb::SBStringList &), + names); + names.Clear(); TargetSP target_sp(GetSP()); @@ -1193,8 +1406,9 @@ } } -void SBTarget::DeleteBreakpointName(const char *name) -{ +void SBTarget::DeleteBreakpointName(const char *name) { + SB_RECORD_METHOD(void, SBTarget, DeleteBreakpointName, (const char *), name); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1203,6 +1417,8 @@ } bool SBTarget::EnableAllBreakpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, EnableAllBreakpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1213,6 +1429,8 @@ } bool SBTarget::DisableAllBreakpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, DisableAllBreakpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1223,6 +1441,8 @@ } bool SBTarget::DeleteAllBreakpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, DeleteAllBreakpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1234,6 +1454,10 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file, SBBreakpointList &new_bps) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, BreakpointsCreateFromFile, + (lldb::SBFileSpec &, lldb::SBBreakpointList &), source_file, + new_bps); + SBStringList empty_name_list; return BreakpointsCreateFromFile(source_file, empty_name_list, new_bps); } @@ -1241,6 +1465,11 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file, SBStringList &matching_names, SBBreakpointList &new_bps) { + SB_RECORD_METHOD( + lldb::SBError, SBTarget, BreakpointsCreateFromFile, + (lldb::SBFileSpec &, lldb::SBStringList &, lldb::SBBreakpointList &), + source_file, matching_names, new_bps); + SBError sberr; TargetSP target_sp(GetSP()); if (!target_sp) { @@ -1271,6 +1500,9 @@ } lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile, + (lldb::SBFileSpec &), dest_file); + SBError sberr; TargetSP target_sp(GetSP()); if (!target_sp) { @@ -1284,6 +1516,10 @@ lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file, SBBreakpointList &bkpt_list, bool append) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, BreakpointsWriteToFile, + (lldb::SBFileSpec &, lldb::SBBreakpointList &, bool), + dest_file, bkpt_list, append); + SBError sberr; TargetSP target_sp(GetSP()); if (!target_sp) { @@ -1300,6 +1536,8 @@ } uint32_t SBTarget::GetNumWatchpoints() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetNumWatchpoints); + TargetSP target_sp(GetSP()); if (target_sp) { // The watchpoint list is thread safe, no need to lock @@ -1309,6 +1547,9 @@ } SBWatchpoint SBTarget::GetWatchpointAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBWatchpoint, SBTarget, GetWatchpointAtIndex, + (uint32_t), idx); + SBWatchpoint sb_watchpoint; TargetSP target_sp(GetSP()); if (target_sp) { @@ -1319,6 +1560,8 @@ } bool SBTarget::DeleteWatchpoint(watch_id_t wp_id) { + SB_RECORD_METHOD(bool, SBTarget, DeleteWatchpoint, (lldb::watch_id_t), wp_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = false; @@ -1339,6 +1582,9 @@ } SBWatchpoint SBTarget::FindWatchpointByID(lldb::watch_id_t wp_id) { + SB_RECORD_METHOD(lldb::SBWatchpoint, SBTarget, FindWatchpointByID, + (lldb::watch_id_t), wp_id); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBWatchpoint sb_watchpoint; @@ -1364,6 +1610,10 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size, bool read, bool write, SBError &error) { + SB_RECORD_METHOD(lldb::SBWatchpoint, SBTarget, WatchAddress, + (lldb::addr_t, size_t, bool, bool, lldb::SBError &), addr, + size, read, write, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBWatchpoint sb_watchpoint; @@ -1404,6 +1654,8 @@ } bool SBTarget::EnableAllWatchpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, EnableAllWatchpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1416,6 +1668,8 @@ } bool SBTarget::DisableAllWatchpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, DisableAllWatchpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1429,6 +1683,10 @@ SBValue SBTarget::CreateValueFromAddress(const char *name, SBAddress addr, SBType type) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, CreateValueFromAddress, + (const char *, lldb::SBAddress, lldb::SBType), name, addr, + type); + SBValue sb_value; lldb::ValueObjectSP new_value_sp; if (IsValid() && name && *name && addr.IsValid() && type.IsValid()) { @@ -1455,6 +1713,10 @@ lldb::SBValue SBTarget::CreateValueFromData(const char *name, lldb::SBData data, lldb::SBType type) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, CreateValueFromData, + (const char *, lldb::SBData, lldb::SBType), name, data, + type); + SBValue sb_value; lldb::ValueObjectSP new_value_sp; if (IsValid() && name && *name && data.IsValid() && type.IsValid()) { @@ -1481,6 +1743,9 @@ lldb::SBValue SBTarget::CreateValueFromExpression(const char *name, const char *expr) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, CreateValueFromExpression, + (const char *, const char *), name, expr); + SBValue sb_value; lldb::ValueObjectSP new_value_sp; if (IsValid() && name && *name && expr && *expr) { @@ -1504,6 +1769,8 @@ } bool SBTarget::DeleteAllWatchpoints() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTarget, DeleteAllWatchpoints); + TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard guard(target_sp->GetAPIMutex()); @@ -1517,6 +1784,10 @@ void SBTarget::AppendImageSearchPath(const char *from, const char *to, lldb::SBError &error) { + SB_RECORD_METHOD(void, SBTarget, AppendImageSearchPath, + (const char *, const char *, lldb::SBError &), from, to, + error); + TargetSP target_sp(GetSP()); if (!target_sp) return error.SetErrorString("invalid target"); @@ -1537,11 +1808,19 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple, const char *uuid_cstr) { + SB_RECORD_METHOD(lldb::SBModule, SBTarget, AddModule, + (const char *, const char *, const char *), path, triple, + uuid_cstr); + return AddModule(path, triple, uuid_cstr, NULL); } lldb::SBModule SBTarget::AddModule(const char *path, const char *triple, const char *uuid_cstr, const char *symfile) { + SB_RECORD_METHOD(lldb::SBModule, SBTarget, AddModule, + (const char *, const char *, const char *, const char *), + path, triple, uuid_cstr, symfile); + lldb::SBModule sb_module; TargetSP target_sp(GetSP()); if (target_sp) { @@ -1567,6 +1846,9 @@ } lldb::SBModule SBTarget::AddModule(const SBModuleSpec &module_spec) { + SB_RECORD_METHOD(lldb::SBModule, SBTarget, AddModule, + (const lldb::SBModuleSpec &), module_spec); + lldb::SBModule sb_module; TargetSP target_sp(GetSP()); if (target_sp) @@ -1575,6 +1857,8 @@ } bool SBTarget::AddModule(lldb::SBModule &module) { + SB_RECORD_METHOD(bool, SBTarget, AddModule, (lldb::SBModule &), module); + TargetSP target_sp(GetSP()); if (target_sp) { target_sp->GetImages().AppendIfNeeded(module.GetSP()); @@ -1584,6 +1868,8 @@ } uint32_t SBTarget::GetNumModules() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetNumModules); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t num = 0; @@ -1601,6 +1887,8 @@ } void SBTarget::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBTarget, Clear); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) @@ -1611,6 +1899,9 @@ } SBModule SBTarget::FindModule(const SBFileSpec &sb_file_spec) { + SB_RECORD_METHOD(lldb::SBModule, SBTarget, FindModule, + (const lldb::SBFileSpec &), sb_file_spec); + SBModule sb_module; TargetSP target_sp(GetSP()); if (target_sp && sb_file_spec.IsValid()) { @@ -1621,8 +1912,10 @@ return sb_module; } -SBSymbolContextList -SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) { +SBSymbolContextList SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBTarget, FindCompileUnits, + (const lldb::SBFileSpec &), sb_file_spec); + SBSymbolContextList sb_sc_list; const TargetSP target_sp(GetSP()); if (target_sp && sb_file_spec.IsValid()) { @@ -1634,6 +1927,8 @@ } lldb::ByteOrder SBTarget::GetByteOrder() { + SB_RECORD_METHOD_NO_ARGS(lldb::ByteOrder, SBTarget, GetByteOrder); + TargetSP target_sp(GetSP()); if (target_sp) return target_sp->GetArchitecture().GetByteOrder(); @@ -1641,6 +1936,8 @@ } const char *SBTarget::GetTriple() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTarget, GetTriple); + TargetSP target_sp(GetSP()); if (target_sp) { std::string triple(target_sp->GetArchitecture().GetTriple().str()); @@ -1654,6 +1951,8 @@ } uint32_t SBTarget::GetDataByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTarget, GetDataByteSize); + TargetSP target_sp(GetSP()); if (target_sp) { return target_sp->GetArchitecture().GetDataByteSize(); @@ -1662,6 +1961,8 @@ } uint32_t SBTarget::GetCodeByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTarget, GetCodeByteSize); + TargetSP target_sp(GetSP()); if (target_sp) { return target_sp->GetArchitecture().GetCodeByteSize(); @@ -1670,6 +1971,8 @@ } uint32_t SBTarget::GetAddressByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTarget, GetAddressByteSize); + TargetSP target_sp(GetSP()); if (target_sp) return target_sp->GetArchitecture().GetAddressByteSize(); @@ -1677,6 +1980,8 @@ } SBModule SBTarget::GetModuleAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex, (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBModule sb_module; @@ -1697,6 +2002,8 @@ } bool SBTarget::RemoveModule(lldb::SBModule module) { + SB_RECORD_METHOD(bool, SBTarget, RemoveModule, (lldb::SBModule), module); + TargetSP target_sp(GetSP()); if (target_sp) return target_sp->GetImages().Remove(module.GetSP()); @@ -1704,6 +2011,8 @@ } SBBroadcaster SBTarget::GetBroadcaster() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBTarget, GetBroadcaster); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); TargetSP target_sp(GetSP()); @@ -1719,6 +2028,10 @@ bool SBTarget::GetDescription(SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTarget, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + Stream &strm = description.ref(); TargetSP target_sp(GetSP()); @@ -1732,6 +2045,9 @@ lldb::SBSymbolContextList SBTarget::FindFunctions(const char *name, uint32_t name_type_mask) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBTarget, FindFunctions, + (const char *, uint32_t), name, name_type_mask); + lldb::SBSymbolContextList sb_sc_list; if (!name | !name[0]) return sb_sc_list; @@ -1752,6 +2068,10 @@ lldb::SBSymbolContextList SBTarget::FindGlobalFunctions(const char *name, uint32_t max_matches, MatchType matchtype) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBTarget, FindGlobalFunctions, + (const char *, uint32_t, lldb::MatchType), name, max_matches, + matchtype); + lldb::SBSymbolContextList sb_sc_list; if (name && name[0]) { llvm::StringRef name_ref(name); @@ -1780,6 +2100,9 @@ } lldb::SBType SBTarget::FindFirstType(const char *typename_cstr) { + SB_RECORD_METHOD(lldb::SBType, SBTarget, FindFirstType, (const char *), + typename_cstr); + TargetSP target_sp(GetSP()); if (typename_cstr && typename_cstr[0] && target_sp) { ConstString const_typename(typename_cstr); @@ -1832,6 +2155,9 @@ } SBType SBTarget::GetBasicType(lldb::BasicType type) { + SB_RECORD_METHOD(lldb::SBType, SBTarget, GetBasicType, (lldb::BasicType), + type); + TargetSP target_sp(GetSP()); if (target_sp) { ClangASTContext *clang_ast = target_sp->GetScratchClangASTContext(); @@ -1843,6 +2169,9 @@ } lldb::SBTypeList SBTarget::FindTypes(const char *typename_cstr) { + SB_RECORD_METHOD(lldb::SBTypeList, SBTarget, FindTypes, (const char *), + typename_cstr); + SBTypeList sb_type_list; TargetSP target_sp(GetSP()); if (typename_cstr && typename_cstr[0] && target_sp) { @@ -1901,6 +2230,9 @@ SBValueList SBTarget::FindGlobalVariables(const char *name, uint32_t max_matches) { + SB_RECORD_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables, + (const char *, uint32_t), name, max_matches); + SBValueList sb_value_list; TargetSP target_sp(GetSP()); @@ -1928,6 +2260,10 @@ SBValueList SBTarget::FindGlobalVariables(const char *name, uint32_t max_matches, MatchType matchtype) { + SB_RECORD_METHOD(lldb::SBValueList, SBTarget, FindGlobalVariables, + (const char *, uint32_t, lldb::MatchType), name, max_matches, + matchtype); + SBValueList sb_value_list; TargetSP target_sp(GetSP()); @@ -1970,6 +2306,9 @@ } lldb::SBValue SBTarget::FindFirstGlobalVariable(const char *name) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, FindFirstGlobalVariable, + (const char *), name); + SBValueList sb_value_list(FindGlobalVariables(name, 1)); if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0) return sb_value_list.GetValueAtIndex(0); @@ -1977,18 +2316,27 @@ } SBSourceManager SBTarget::GetSourceManager() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBSourceManager, SBTarget, GetSourceManager); + SBSourceManager source_manager(*this); return source_manager; } lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr, uint32_t count) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions, + (lldb::SBAddress, uint32_t), base_addr, count); + return ReadInstructions(base_addr, count, NULL); } lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr, uint32_t count, const char *flavor_string) { + SB_RECORD_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions, + (lldb::SBAddress, uint32_t, const char *), base_addr, count, + flavor_string); + SBInstructionList sb_instructions; TargetSP target_sp(GetSP()); @@ -2060,6 +2408,9 @@ SBError SBTarget::SetSectionLoadAddress(lldb::SBSection section, lldb::addr_t section_base_addr) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, SetSectionLoadAddress, + (lldb::SBSection, lldb::addr_t), section, section_base_addr); + SBError sb_error; TargetSP target_sp(GetSP()); if (target_sp) { @@ -2094,6 +2445,9 @@ } SBError SBTarget::ClearSectionLoadAddress(lldb::SBSection section) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, ClearSectionLoadAddress, + (lldb::SBSection), section); + SBError sb_error; TargetSP target_sp(GetSP()); @@ -2127,6 +2481,9 @@ SBError SBTarget::SetModuleLoadAddress(lldb::SBModule module, int64_t slide_offset) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, SetModuleLoadAddress, + (lldb::SBModule, int64_t), module, slide_offset); + SBError sb_error; TargetSP target_sp(GetSP()); @@ -2158,6 +2515,9 @@ } SBError SBTarget::ClearModuleLoadAddress(lldb::SBModule module) { + SB_RECORD_METHOD(lldb::SBError, SBTarget, ClearModuleLoadAddress, + (lldb::SBModule), module); + SBError sb_error; char path[PATH_MAX]; @@ -2208,6 +2568,9 @@ lldb::SBSymbolContextList SBTarget::FindSymbols(const char *name, lldb::SymbolType symbol_type) { + SB_RECORD_METHOD(lldb::SBSymbolContextList, SBTarget, FindSymbols, + (const char *, lldb::SymbolType), name, symbol_type); + SBSymbolContextList sb_sc_list; if (name && name[0]) { TargetSP target_sp(GetSP()); @@ -2221,6 +2584,9 @@ } lldb::SBValue SBTarget::EvaluateExpression(const char *expr) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, EvaluateExpression, (const char *), + expr); + TargetSP target_sp(GetSP()); if (!target_sp) return SBValue(); @@ -2235,6 +2601,10 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr, const SBExpressionOptions &options) { + SB_RECORD_METHOD(lldb::SBValue, SBTarget, EvaluateExpression, + (const char *, const lldb::SBExpressionOptions &), expr, + options); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); #if !defined(LLDB_DISABLE_PYTHON) Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); @@ -2299,6 +2669,8 @@ } lldb::addr_t SBTarget::GetStackRedZoneSize() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBTarget, GetStackRedZoneSize); + TargetSP target_sp(GetSP()); if (target_sp) { ABISP abi_sp; @@ -2314,6 +2686,8 @@ } lldb::SBLaunchInfo SBTarget::GetLaunchInfo() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLaunchInfo, SBTarget, GetLaunchInfo); + lldb::SBLaunchInfo launch_info(NULL); TargetSP target_sp(GetSP()); if (target_sp) @@ -2322,6 +2696,9 @@ } void SBTarget::SetLaunchInfo(const lldb::SBLaunchInfo &launch_info) { + SB_RECORD_METHOD(void, SBTarget, SetLaunchInfo, (const lldb::SBLaunchInfo &), + launch_info); + TargetSP target_sp(GetSP()); if (target_sp) m_opaque_sp->SetProcessLaunchInfo(launch_info.ref()); Index: source/API/SBThread.cpp =================================================================== --- source/API/SBThread.cpp +++ source/API/SBThread.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBThread.h" #include "lldb/API/SBFileSpec.h" @@ -48,25 +50,37 @@ using namespace lldb_private; const char *SBThread::GetBroadcasterClassName() { + SB_RECORD_STATIC_METHOD_NO_ARGS(const char *, SBThread, + GetBroadcasterClassName); + return Thread::GetStaticBroadcasterClass().AsCString(); } //---------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------- -SBThread::SBThread() : m_opaque_sp(new ExecutionContextRef()) {} +SBThread::SBThread() : m_opaque_sp(new ExecutionContextRef()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBThread); +} SBThread::SBThread(const ThreadSP &lldb_object_sp) - : m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) {} + : m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) { + SB_RECORD_CONSTRUCTOR(SBThread, (const lldb::ThreadSP &), lldb_object_sp); +} SBThread::SBThread(const SBThread &rhs) - : m_opaque_sp(new ExecutionContextRef(*rhs.m_opaque_sp)) {} + : m_opaque_sp(new ExecutionContextRef(*rhs.m_opaque_sp)) { + SB_RECORD_CONSTRUCTOR(SBThread, (const lldb::SBThread &), rhs); +} //---------------------------------------------------------------------- // Assignment operator //---------------------------------------------------------------------- const lldb::SBThread &SBThread::operator=(const SBThread &rhs) { + SB_RECORD_METHOD(const lldb::SBThread &, + SBThread, operator=,(const lldb::SBThread &), rhs); + if (this != &rhs) *m_opaque_sp = *rhs.m_opaque_sp; return *this; @@ -78,6 +92,8 @@ SBThread::~SBThread() {} lldb::SBQueue SBThread::GetQueue() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBQueue, SBThread, GetQueue); + SBQueue sb_queue; QueueSP queue_sp; std::unique_lock lock; @@ -107,6 +123,8 @@ } bool SBThread::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThread, IsValid); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -121,9 +139,14 @@ return false; } -void SBThread::Clear() { m_opaque_sp->Clear(); } +void SBThread::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBThread, Clear); + m_opaque_sp->Clear(); +} StopReason SBThread::GetStopReason() { + SB_RECORD_METHOD_NO_ARGS(lldb::StopReason, SBThread, GetStopReason); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); StopReason reason = eStopReasonInvalid; @@ -151,6 +174,8 @@ } size_t SBThread::GetStopReasonDataCount() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBThread, GetStopReasonDataCount); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -204,6 +229,9 @@ } uint64_t SBThread::GetStopReasonDataAtIndex(uint32_t idx) { + SB_RECORD_METHOD(uint64_t, SBThread, GetStopReasonDataAtIndex, (uint32_t), + idx); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -269,6 +297,9 @@ } bool SBThread::GetStopReasonExtendedInfoAsJSON(lldb::SBStream &stream) { + SB_RECORD_METHOD(bool, SBThread, GetStopReasonExtendedInfoAsJSON, + (lldb::SBStream &), stream); + Stream &strm = stream.ref(); std::unique_lock lock; @@ -289,6 +320,10 @@ SBThreadCollection SBThread::GetStopReasonExtendedBacktraces(InstrumentationRuntimeType type) { + SB_RECORD_METHOD(lldb::SBThreadCollection, SBThread, + GetStopReasonExtendedBacktraces, + (lldb::InstrumentationRuntimeType), type); + ThreadCollectionSP threads; threads.reset(new ThreadCollection()); @@ -310,6 +345,9 @@ } size_t SBThread::GetStopDescription(char *dst, size_t dst_len) { + SB_RECORD_METHOD(size_t, SBThread, GetStopDescription, (char *, size_t), dst, + dst_len); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -421,6 +459,8 @@ } SBValue SBThread::GetStopReturnValue() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBThread, GetStopReturnValue); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ValueObjectSP return_valobj_sp; std::unique_lock lock; @@ -455,6 +495,8 @@ } lldb::tid_t SBThread::GetThreadID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::tid_t, SBThread, GetThreadID); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp->GetID(); @@ -462,6 +504,8 @@ } uint32_t SBThread::GetIndexID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBThread, GetIndexID); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp->GetIndexID(); @@ -469,6 +513,8 @@ } const char *SBThread::GetName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBThread, GetName); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *name = NULL; std::unique_lock lock; @@ -494,6 +540,8 @@ } const char *SBThread::GetQueueName() const { + SB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBThread, GetQueueName); + const char *name = NULL; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -519,6 +567,8 @@ } lldb::queue_id_t SBThread::GetQueueID() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::queue_id_t, SBThread, GetQueueID); + queue_id_t id = LLDB_INVALID_QUEUE_ID; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -543,6 +593,9 @@ } bool SBThread::GetInfoItemByPathAsString(const char *path, SBStream &strm) { + SB_RECORD_METHOD(bool, SBThread, GetInfoItemByPathAsString, + (const char *, lldb::SBStream &), path, strm); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool success = false; std::unique_lock lock; @@ -632,11 +685,17 @@ } void SBThread::StepOver(lldb::RunMode stop_other_threads) { + SB_RECORD_METHOD(void, SBThread, StepOver, (lldb::RunMode), + stop_other_threads); + SBError error; // Ignored StepOver(stop_other_threads, error); } void SBThread::StepOver(lldb::RunMode stop_other_threads, SBError &error) { + SB_RECORD_METHOD(void, SBThread, StepOver, (lldb::RunMode, lldb::SBError &), + stop_other_threads, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -674,17 +733,27 @@ } void SBThread::StepInto(lldb::RunMode stop_other_threads) { + SB_RECORD_METHOD(void, SBThread, StepInto, (lldb::RunMode), + stop_other_threads); + StepInto(NULL, stop_other_threads); } void SBThread::StepInto(const char *target_name, lldb::RunMode stop_other_threads) { + SB_RECORD_METHOD(void, SBThread, StepInto, (const char *, lldb::RunMode), + target_name, stop_other_threads); + SBError error; // Ignored StepInto(target_name, LLDB_INVALID_LINE_NUMBER, error, stop_other_threads); } void SBThread::StepInto(const char *target_name, uint32_t end_line, SBError &error, lldb::RunMode stop_other_threads) { + SB_RECORD_METHOD(void, SBThread, StepInto, + (const char *, uint32_t, lldb::SBError &, lldb::RunMode), + target_name, end_line, error, stop_other_threads); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -739,11 +808,15 @@ } void SBThread::StepOut() { + SB_RECORD_METHOD_NO_ARGS(void, SBThread, StepOut); + SBError error; // Ignored StepOut(error); } void SBThread::StepOut(SBError &error) { + SB_RECORD_METHOD(void, SBThread, StepOut, (lldb::SBError &), error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -776,11 +849,16 @@ } void SBThread::StepOutOfFrame(SBFrame &sb_frame) { + SB_RECORD_METHOD(void, SBThread, StepOutOfFrame, (lldb::SBFrame &), sb_frame); + SBError error; // Ignored StepOutOfFrame(sb_frame, error); } void SBThread::StepOutOfFrame(SBFrame &sb_frame, SBError &error) { + SB_RECORD_METHOD(void, SBThread, StepOutOfFrame, + (lldb::SBFrame &, lldb::SBError &), sb_frame, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -833,11 +911,16 @@ } void SBThread::StepInstruction(bool step_over) { + SB_RECORD_METHOD(void, SBThread, StepInstruction, (bool), step_over); + SBError error; // Ignored StepInstruction(step_over, error); } void SBThread::StepInstruction(bool step_over, SBError &error) { + SB_RECORD_METHOD(void, SBThread, StepInstruction, (bool, lldb::SBError &), + step_over, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -864,11 +947,16 @@ } void SBThread::RunToAddress(lldb::addr_t addr) { + SB_RECORD_METHOD(void, SBThread, RunToAddress, (lldb::addr_t), addr); + SBError error; // Ignored RunToAddress(addr, error); } void SBThread::RunToAddress(lldb::addr_t addr, SBError &error) { + SB_RECORD_METHOD(void, SBThread, RunToAddress, + (lldb::addr_t, lldb::SBError &), addr, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -902,6 +990,10 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame, lldb::SBFileSpec &sb_file_spec, uint32_t line) { + SB_RECORD_METHOD(lldb::SBError, SBThread, StepOverUntil, + (lldb::SBFrame &, lldb::SBFileSpec &, uint32_t), sb_frame, + sb_file_spec, line); + SBError sb_error; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); char path[PATH_MAX]; @@ -1027,11 +1119,17 @@ } SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name) { + SB_RECORD_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan, + (const char *), script_class_name); + return StepUsingScriptedThreadPlan(script_class_name, true); } SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name, bool resume_immediately) { + SB_RECORD_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan, + (const char *, bool), script_class_name, resume_immediately); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBError error; @@ -1070,6 +1168,9 @@ } SBError SBThread::JumpToLine(lldb::SBFileSpec &file_spec, uint32_t line) { + SB_RECORD_METHOD(lldb::SBError, SBThread, JumpToLine, + (lldb::SBFileSpec &, uint32_t), file_spec, line); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBError sb_error; @@ -1094,6 +1195,9 @@ } SBError SBThread::ReturnFromFrame(SBFrame &frame, SBValue &return_value) { + SB_RECORD_METHOD(lldb::SBError, SBThread, ReturnFromFrame, + (lldb::SBFrame &, lldb::SBValue &), frame, return_value); + SBError sb_error; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -1116,6 +1220,8 @@ } SBError SBThread::UnwindInnermostExpression() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBThread, UnwindInnermostExpression); + SBError sb_error; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -1138,11 +1244,15 @@ } bool SBThread::Suspend() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThread, Suspend); + SBError error; // Ignored return Suspend(error); } bool SBThread::Suspend(SBError &error) { + SB_RECORD_METHOD(bool, SBThread, Suspend, (lldb::SBError &), error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1168,11 +1278,15 @@ } bool SBThread::Resume() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThread, Resume); + SBError error; // Ignored return Resume(error); } bool SBThread::Resume(SBError &error) { + SB_RECORD_METHOD(bool, SBThread, Resume, (lldb::SBError &), error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1199,6 +1313,8 @@ } bool SBThread::IsSuspended() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThread, IsSuspended); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1208,6 +1324,8 @@ } bool SBThread::IsStopped() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThread, IsStopped); + std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1217,6 +1335,8 @@ } SBProcess SBThread::GetProcess() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBThread, GetProcess); + SBProcess sb_process; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1241,6 +1361,8 @@ } uint32_t SBThread::GetNumFrames() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBThread, GetNumFrames); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); uint32_t num_frames = 0; @@ -1266,6 +1388,8 @@ } SBFrame SBThread::GetFrameAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBFrame, SBThread, GetFrameAtIndex, (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFrame sb_frame; @@ -1298,6 +1422,8 @@ } lldb::SBFrame SBThread::GetSelectedFrame() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFrame, SBThread, GetSelectedFrame); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFrame sb_frame; @@ -1330,6 +1456,8 @@ } lldb::SBFrame SBThread::SetSelectedFrame(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBFrame, SBThread, SetSelectedFrame, (uint32_t), idx); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBFrame sb_frame; @@ -1365,28 +1493,45 @@ } bool SBThread::EventIsThreadEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBThread, EventIsThreadEvent, + (const lldb::SBEvent &), event); + return Thread::ThreadEventData::GetEventDataFromEvent(event.get()) != NULL; } SBFrame SBThread::GetStackFrameFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBFrame, SBThread, GetStackFrameFromEvent, + (const lldb::SBEvent &), event); + return Thread::ThreadEventData::GetStackFrameFromEvent(event.get()); } SBThread SBThread::GetThreadFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBThread, SBThread, GetThreadFromEvent, + (const lldb::SBEvent &), event); + return Thread::ThreadEventData::GetThreadFromEvent(event.get()); } bool SBThread::operator==(const SBThread &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBThread, operator==,(const lldb::SBThread &), + rhs); + return m_opaque_sp->GetThreadSP().get() == rhs.m_opaque_sp->GetThreadSP().get(); } bool SBThread::operator!=(const SBThread &rhs) const { + SB_RECORD_METHOD_CONST(bool, SBThread, operator!=,(const lldb::SBThread &), + rhs); + return m_opaque_sp->GetThreadSP().get() != rhs.m_opaque_sp->GetThreadSP().get(); } bool SBThread::GetStatus(SBStream &status) const { + SB_RECORD_METHOD_CONST(bool, SBThread, GetStatus, (lldb::SBStream &), status); + Stream &strm = status.ref(); std::unique_lock lock; @@ -1401,10 +1546,16 @@ } bool SBThread::GetDescription(SBStream &description) const { - return GetDescription(description, false); + SB_RECORD_METHOD_CONST(bool, SBThread, GetDescription, (lldb::SBStream &), + description); + + return GetDescription(description, false); } bool SBThread::GetDescription(SBStream &description, bool stop_format) const { + SB_RECORD_METHOD_CONST(bool, SBThread, GetDescription, + (lldb::SBStream &, bool), description, stop_format); + Stream &strm = description.ref(); std::unique_lock lock; @@ -1423,6 +1574,9 @@ } SBThread SBThread::GetExtendedBacktraceThread(const char *type) { + SB_RECORD_METHOD(lldb::SBThread, SBThread, GetExtendedBacktraceThread, + (const char *), type); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); @@ -1477,6 +1631,9 @@ } uint32_t SBThread::GetExtendedBacktraceOriginatingIndexID() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBThread, + GetExtendedBacktraceOriginatingIndexID); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp->GetExtendedBacktraceOriginatingIndexID(); @@ -1484,6 +1641,8 @@ } SBValue SBThread::GetCurrentException() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBThread, GetCurrentException); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (!thread_sp) return SBValue(); @@ -1491,6 +1650,9 @@ } SBThread SBThread::GetCurrentExceptionBacktrace() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBThread, SBThread, + GetCurrentExceptionBacktrace); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (!thread_sp) return SBThread(); @@ -1498,6 +1660,8 @@ } bool SBThread::SafeToCallFunctions() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThread, SafeToCallFunctions); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp->SafeToCallFunctions(); @@ -1505,6 +1669,8 @@ } lldb_private::Thread *SBThread::operator->() { + SB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, operator->); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp.get(); @@ -1513,6 +1679,8 @@ } lldb_private::Thread *SBThread::get() { + SB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, get); + ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); if (thread_sp) return thread_sp.get(); Index: source/API/SBThreadCollection.cpp =================================================================== --- source/API/SBThreadCollection.cpp +++ source/API/SBThreadCollection.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBThreadCollection.h" #include "lldb/API/SBThread.h" #include "lldb/Target/ThreadList.h" @@ -13,13 +15,22 @@ using namespace lldb; using namespace lldb_private; -SBThreadCollection::SBThreadCollection() : m_opaque_sp() {} +SBThreadCollection::SBThreadCollection() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBThreadCollection); +} SBThreadCollection::SBThreadCollection(const SBThreadCollection &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBThreadCollection, (const lldb::SBThreadCollection &), + rhs); +} const SBThreadCollection &SBThreadCollection:: operator=(const SBThreadCollection &rhs) { + SB_RECORD_METHOD( + const lldb::SBThreadCollection &, + SBThreadCollection, operator=,(const lldb::SBThreadCollection &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -50,15 +61,23 @@ return m_opaque_sp; } -bool SBThreadCollection::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBThreadCollection::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadCollection, IsValid); + return m_opaque_sp.get() != NULL; +} size_t SBThreadCollection::GetSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBThreadCollection, GetSize); + if (m_opaque_sp) return m_opaque_sp->GetSize(); return 0; } SBThread SBThreadCollection::GetThreadAtIndex(size_t idx) { + SB_RECORD_METHOD(lldb::SBThread, SBThreadCollection, GetThreadAtIndex, + (size_t), idx); + SBThread thread; if (m_opaque_sp && idx < m_opaque_sp->GetSize()) thread = m_opaque_sp->GetThreadAtIndex(idx); Index: source/API/SBThreadPlan.cpp =================================================================== --- source/API/SBThreadPlan.cpp +++ source/API/SBThreadPlan.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBThread.h" #include "lldb/API/SBFileSpec.h" @@ -47,15 +49,23 @@ //---------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------- -SBThreadPlan::SBThreadPlan() {} +SBThreadPlan::SBThreadPlan() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBThreadPlan); } SBThreadPlan::SBThreadPlan(const ThreadPlanSP &lldb_object_sp) - : m_opaque_sp(lldb_object_sp) {} + : m_opaque_sp(lldb_object_sp) { + SB_RECORD_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &), + lldb_object_sp); +} SBThreadPlan::SBThreadPlan(const SBThreadPlan &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &), rhs); +} SBThreadPlan::SBThreadPlan(lldb::SBThread &sb_thread, const char *class_name) { + SB_RECORD_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *), + sb_thread, class_name); + Thread *thread = sb_thread.get(); if (thread) m_opaque_sp.reset(new ThreadPlanPython(*thread, class_name)); @@ -66,6 +76,9 @@ //---------------------------------------------------------------------- const lldb::SBThreadPlan &SBThreadPlan::operator=(const SBThreadPlan &rhs) { + SB_RECORD_METHOD(const lldb::SBThreadPlan &, + SBThreadPlan, operator=,(const lldb::SBThreadPlan &), rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; @@ -75,19 +88,40 @@ //---------------------------------------------------------------------- SBThreadPlan::~SBThreadPlan() {} -lldb_private::ThreadPlan *SBThreadPlan::get() { return m_opaque_sp.get(); } +lldb_private::ThreadPlan *SBThreadPlan::get() { + SB_RECORD_METHOD_NO_ARGS(lldb_private::ThreadPlan *, SBThreadPlan, get); + return m_opaque_sp.get(); +} -bool SBThreadPlan::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBThreadPlan::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, IsValid); + return m_opaque_sp.get() != NULL; +} -void SBThreadPlan::Clear() { m_opaque_sp.reset(); } +void SBThreadPlan::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBThreadPlan, Clear); + m_opaque_sp.reset(); +} -lldb::StopReason SBThreadPlan::GetStopReason() { return eStopReasonNone; } +lldb::StopReason SBThreadPlan::GetStopReason() { + SB_RECORD_METHOD_NO_ARGS(lldb::StopReason, SBThreadPlan, GetStopReason); + return eStopReasonNone; +} -size_t SBThreadPlan::GetStopReasonDataCount() { return 0; } +size_t SBThreadPlan::GetStopReasonDataCount() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBThreadPlan, GetStopReasonDataCount); + return 0; +} -uint64_t SBThreadPlan::GetStopReasonDataAtIndex(uint32_t idx) { return 0; } +uint64_t SBThreadPlan::GetStopReasonDataAtIndex(uint32_t idx) { + SB_RECORD_METHOD(uint64_t, SBThreadPlan, GetStopReasonDataAtIndex, (uint32_t), + idx); + return 0; +} SBThread SBThreadPlan::GetThread() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBThreadPlan, GetThread); + if (m_opaque_sp) { return SBThread(m_opaque_sp->GetThread().shared_from_this()); } else @@ -95,6 +129,9 @@ } bool SBThreadPlan::GetDescription(lldb::SBStream &description) const { + SB_RECORD_METHOD_CONST(bool, SBThreadPlan, GetDescription, (lldb::SBStream &), + description); + if (m_opaque_sp) { m_opaque_sp->GetDescription(description.get(), eDescriptionLevelFull); } else { @@ -108,11 +145,15 @@ } void SBThreadPlan::SetPlanComplete(bool success) { + SB_RECORD_METHOD(void, SBThreadPlan, SetPlanComplete, (bool), success); + if (m_opaque_sp) m_opaque_sp->SetPlanComplete(success); } bool SBThreadPlan::IsPlanComplete() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsPlanComplete); + if (m_opaque_sp) return m_opaque_sp->IsPlanComplete(); else @@ -120,6 +161,8 @@ } bool SBThreadPlan::IsPlanStale() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsPlanStale); + if (m_opaque_sp) return m_opaque_sp->IsPlanStale(); else @@ -127,6 +170,8 @@ } bool SBThreadPlan::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsValid); + if (m_opaque_sp) return m_opaque_sp->ValidatePlan(nullptr); else @@ -142,12 +187,21 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange(SBAddress &sb_start_address, lldb::addr_t size) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOverRange, + (lldb::SBAddress &, lldb::addr_t), sb_start_address, size); + SBError error; return QueueThreadPlanForStepOverRange(sb_start_address, size, error); } SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange( SBAddress &sb_start_address, lldb::addr_t size, SBError &error) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepOverRange, + (lldb::SBAddress &, lldb::addr_t, lldb::SBError &), + sb_start_address, size, error); + if (m_opaque_sp) { Address *start_address = sb_start_address.get(); if (!start_address) { @@ -175,6 +229,10 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address, lldb::addr_t size) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepInRange, + (lldb::SBAddress &, lldb::addr_t), sb_start_address, size); + SBError error; return QueueThreadPlanForStepInRange(sb_start_address, size, error); } @@ -182,6 +240,11 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address, lldb::addr_t size, SBError &error) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepInRange, + (lldb::SBAddress &, lldb::addr_t, lldb::SBError &), + sb_start_address, size, error); + if (m_opaque_sp) { Address *start_address = sb_start_address.get(); if (!start_address) { @@ -209,6 +272,9 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, bool first_insn) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, QueueThreadPlanForStepOut, + (uint32_t, bool), frame_idx_to_step_to, first_insn); + SBError error; return QueueThreadPlanForStepOut(frame_idx_to_step_to, first_insn, error); } @@ -216,6 +282,10 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, bool first_insn, SBError &error) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, QueueThreadPlanForStepOut, + (uint32_t, bool, lldb::SBError &), frame_idx_to_step_to, + first_insn, error); + if (m_opaque_sp) { SymbolContext sc; sc = m_opaque_sp->GetThread().GetStackFrameAtIndex(0)->GetSymbolContext( @@ -238,12 +308,20 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForRunToAddress, (lldb::SBAddress), + sb_address); + SBError error; return QueueThreadPlanForRunToAddress(sb_address, error); } SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address, SBError &error) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForRunToAddress, + (lldb::SBAddress, lldb::SBError &), sb_address, error); + if (m_opaque_sp) { Address *address = sb_address.get(); if (!address) @@ -265,6 +343,10 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepScripted, (const char *), + script_class_name); + SBError error; return QueueThreadPlanForStepScripted(script_class_name, error); } @@ -272,6 +354,10 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name, SBError &error) { + SB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, + QueueThreadPlanForStepScripted, + (const char *, lldb::SBError &), script_class_name, error); + if (m_opaque_sp) { Status plan_status; SBThreadPlan plan = Index: source/API/SBTrace.cpp =================================================================== --- source/API/SBTrace.cpp +++ source/API/SBTrace.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/Target/Process.h" #include "lldb/Utility/Log.h" @@ -58,6 +60,9 @@ } void SBTrace::StopTrace(SBError &error, lldb::tid_t thread_id) { + SB_RECORD_METHOD(void, SBTrace, StopTrace, (lldb::SBError &, lldb::tid_t), + error, thread_id); + ProcessSP process_sp(GetSP()); error.Clear(); @@ -69,6 +74,9 @@ } void SBTrace::GetTraceConfig(SBTraceOptions &options, SBError &error) { + SB_RECORD_METHOD(void, SBTrace, GetTraceConfig, + (lldb::SBTraceOptions &, lldb::SBError &), options, error); + ProcessSP process_sp(GetSP()); error.Clear(); @@ -81,6 +89,8 @@ } lldb::user_id_t SBTrace::GetTraceUID() { + SB_RECORD_METHOD_NO_ARGS(lldb::user_id_t, SBTrace, GetTraceUID); + if (m_trace_impl_sp) return m_trace_impl_sp->uid; return LLDB_INVALID_UID; @@ -92,6 +102,8 @@ } SBTrace::SBTrace() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTrace); + m_trace_impl_sp.reset(new TraceImpl); if (m_trace_impl_sp) m_trace_impl_sp->uid = LLDB_INVALID_UID; @@ -100,6 +112,8 @@ void SBTrace::SetSP(const ProcessSP &process_sp) { m_opaque_wp = process_sp; } bool SBTrace::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTrace, IsValid); + if (!m_trace_impl_sp) return false; if (!GetSP()) Index: source/API/SBTraceOptions.cpp =================================================================== --- source/API/SBTraceOptions.cpp +++ source/API/SBTraceOptions.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTraceOptions.h" #include "lldb/API/SBError.h" #include "lldb/API/SBStructuredData.h" @@ -17,22 +19,31 @@ using namespace lldb_private; SBTraceOptions::SBTraceOptions() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTraceOptions); + m_traceoptions_sp.reset(new TraceOptions()); } lldb::TraceType SBTraceOptions::getType() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::TraceType, SBTraceOptions, getType); + if (m_traceoptions_sp) return m_traceoptions_sp->getType(); return lldb::TraceType::eTraceTypeNone; } uint64_t SBTraceOptions::getTraceBufferSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint64_t, SBTraceOptions, getTraceBufferSize); + if (m_traceoptions_sp) return m_traceoptions_sp->getTraceBufferSize(); return 0; } lldb::SBStructuredData SBTraceOptions::getTraceParams(lldb::SBError &error) { + SB_RECORD_METHOD(lldb::SBStructuredData, SBTraceOptions, getTraceParams, + (lldb::SBError &), error); + error.Clear(); const lldb_private::StructuredData::DictionarySP dict_obj = m_traceoptions_sp->getTraceParams(); @@ -45,12 +56,18 @@ } uint64_t SBTraceOptions::getMetaDataBufferSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint64_t, SBTraceOptions, + getMetaDataBufferSize); + if (m_traceoptions_sp) return m_traceoptions_sp->getTraceBufferSize(); return 0; } void SBTraceOptions::setTraceParams(lldb::SBStructuredData ¶ms) { + SB_RECORD_METHOD(void, SBTraceOptions, setTraceParams, + (lldb::SBStructuredData &), params); + if (m_traceoptions_sp && params.m_impl_up) { StructuredData::ObjectSP obj_sp = params.m_impl_up->GetObjectSP(); if (obj_sp && obj_sp->GetAsDictionary() != nullptr) @@ -61,32 +78,45 @@ } void SBTraceOptions::setType(lldb::TraceType type) { + SB_RECORD_METHOD(void, SBTraceOptions, setType, (lldb::TraceType), type); + if (m_traceoptions_sp) m_traceoptions_sp->setType(type); } void SBTraceOptions::setTraceBufferSize(uint64_t size) { + SB_RECORD_METHOD(void, SBTraceOptions, setTraceBufferSize, (uint64_t), size); + if (m_traceoptions_sp) m_traceoptions_sp->setTraceBufferSize(size); } void SBTraceOptions::setMetaDataBufferSize(uint64_t size) { + SB_RECORD_METHOD(void, SBTraceOptions, setMetaDataBufferSize, (uint64_t), + size); + if (m_traceoptions_sp) m_traceoptions_sp->setMetaDataBufferSize(size); } bool SBTraceOptions::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTraceOptions, IsValid); + if (m_traceoptions_sp) return true; return false; } void SBTraceOptions::setThreadID(lldb::tid_t thread_id) { + SB_RECORD_METHOD(void, SBTraceOptions, setThreadID, (lldb::tid_t), thread_id); + if (m_traceoptions_sp) m_traceoptions_sp->setThreadID(thread_id); } lldb::tid_t SBTraceOptions::getThreadID() { + SB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBTraceOptions, getThreadID); + if (m_traceoptions_sp) return m_traceoptions_sp->getThreadID(); return LLDB_INVALID_THREAD_ID; Index: source/API/SBType.cpp =================================================================== --- source/API/SBType.cpp +++ source/API/SBType.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBType.h" #include "lldb/API/SBDefines.h" #include "lldb/API/SBStream.h" @@ -23,7 +25,7 @@ using namespace lldb; using namespace lldb_private; -SBType::SBType() : m_opaque_sp() {} +SBType::SBType() : m_opaque_sp() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBType); } SBType::SBType(const CompilerType &type) : m_opaque_sp(new TypeImpl( @@ -36,6 +38,8 @@ : m_opaque_sp(type_impl_sp) {} SBType::SBType(const SBType &rhs) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBType, (const lldb::SBType &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -46,6 +50,8 @@ //{} // bool SBType::operator==(SBType &rhs) { + SB_RECORD_METHOD(bool, SBType, operator==,(lldb::SBType &), rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -56,6 +62,8 @@ } bool SBType::operator!=(SBType &rhs) { + SB_RECORD_METHOD(bool, SBType, operator!=,(lldb::SBType &), rhs); + if (!IsValid()) return rhs.IsValid(); @@ -72,6 +80,9 @@ } SBType &SBType::operator=(const SBType &rhs) { + SB_RECORD_METHOD(lldb::SBType &, SBType, operator=,(const lldb::SBType &), + rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -95,6 +106,8 @@ } bool SBType::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBType, IsValid); + if (m_opaque_sp.get() == NULL) return false; @@ -102,6 +115,8 @@ } uint64_t SBType::GetByteSize() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBType, GetByteSize); + if (IsValid()) if (llvm::Optional size = m_opaque_sp->GetCompilerType(false).GetByteSize(nullptr)) @@ -110,12 +125,16 @@ } bool SBType::IsPointerType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsPointerType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsPointerType(); } bool SBType::IsArrayType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsArrayType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsArrayType(nullptr, nullptr, @@ -123,18 +142,24 @@ } bool SBType::IsVectorType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsVectorType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsVectorType(nullptr, nullptr); } bool SBType::IsReferenceType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsReferenceType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsReferenceType(); } SBType SBType::GetPointerType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetPointerType); + if (!IsValid()) return SBType(); @@ -142,30 +167,40 @@ } SBType SBType::GetPointeeType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetPointeeType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetPointeeType()))); } SBType SBType::GetReferenceType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetReferenceType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetReferenceType()))); } SBType SBType::GetTypedefedType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetTypedefedType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetTypedefedType()))); } SBType SBType::GetDereferencedType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetDereferencedType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetDereferencedType()))); } SBType SBType::GetArrayElementType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetArrayElementType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP( @@ -173,6 +208,8 @@ } SBType SBType::GetArrayType(uint64_t size) { + SB_RECORD_METHOD(lldb::SBType, SBType, GetArrayType, (uint64_t), size); + if (!IsValid()) return SBType(); return SBType(TypeImplSP( @@ -180,6 +217,8 @@ } SBType SBType::GetVectorElementType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetVectorElementType); + SBType type_sb; if (IsValid()) { CompilerType vector_element_type; @@ -191,30 +230,40 @@ } bool SBType::IsFunctionType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsFunctionType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsFunctionType(); } bool SBType::IsPolymorphicClass() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsPolymorphicClass); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsPolymorphicClass(); } bool SBType::IsTypedefType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsTypedefType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsTypedefType(); } bool SBType::IsAnonymousType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsAnonymousType); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(true).IsAnonymousType(); } lldb::SBType SBType::GetFunctionReturnType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetFunctionReturnType); + if (IsValid()) { CompilerType return_type( m_opaque_sp->GetCompilerType(true).GetFunctionReturnType()); @@ -225,6 +274,8 @@ } lldb::SBTypeList SBType::GetFunctionArgumentTypes() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeList, SBType, GetFunctionArgumentTypes); + SBTypeList sb_type_list; if (IsValid()) { CompilerType func_type(m_opaque_sp->GetCompilerType(true)); @@ -237,6 +288,8 @@ } uint32_t SBType::GetNumberOfMemberFunctions() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetNumberOfMemberFunctions); + if (IsValid()) { return m_opaque_sp->GetCompilerType(true).GetNumMemberFunctions(); } @@ -244,6 +297,9 @@ } lldb::SBTypeMemberFunction SBType::GetMemberFunctionAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBTypeMemberFunction, SBType, GetMemberFunctionAtIndex, + (uint32_t), idx); + SBTypeMemberFunction sb_func_type; if (IsValid()) sb_func_type.reset(new TypeMemberFunctionImpl( @@ -252,24 +308,33 @@ } lldb::SBType SBType::GetUnqualifiedType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetUnqualifiedType); + if (!IsValid()) return SBType(); return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetUnqualifiedType()))); } lldb::SBType SBType::GetCanonicalType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetCanonicalType); + if (IsValid()) return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetCanonicalType()))); return SBType(); } lldb::BasicType SBType::GetBasicType() { + SB_RECORD_METHOD_NO_ARGS(lldb::BasicType, SBType, GetBasicType); + if (IsValid()) return m_opaque_sp->GetCompilerType(false).GetBasicTypeEnumeration(); return eBasicTypeInvalid; } SBType SBType::GetBasicType(lldb::BasicType basic_type) { + SB_RECORD_METHOD(lldb::SBType, SBType, GetBasicType, (lldb::BasicType), + basic_type); + if (IsValid() && m_opaque_sp->IsValid()) return SBType( m_opaque_sp->GetTypeSystem(false)->GetBasicTypeFromAST(basic_type)); @@ -277,18 +342,24 @@ } uint32_t SBType::GetNumberOfDirectBaseClasses() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetNumberOfDirectBaseClasses); + if (IsValid()) return m_opaque_sp->GetCompilerType(true).GetNumDirectBaseClasses(); return 0; } uint32_t SBType::GetNumberOfVirtualBaseClasses() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetNumberOfVirtualBaseClasses); + if (IsValid()) return m_opaque_sp->GetCompilerType(true).GetNumVirtualBaseClasses(); return 0; } uint32_t SBType::GetNumberOfFields() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetNumberOfFields); + if (IsValid()) return m_opaque_sp->GetCompilerType(true).GetNumFields(); return 0; @@ -296,6 +367,10 @@ bool SBType::GetDescription(SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBType, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + Stream &strm = description.ref(); if (m_opaque_sp) { @@ -307,6 +382,9 @@ } SBTypeMember SBType::GetDirectBaseClassAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBTypeMember, SBType, GetDirectBaseClassAtIndex, + (uint32_t), idx); + SBTypeMember sb_type_member; if (IsValid()) { uint32_t bit_offset = 0; @@ -321,6 +399,9 @@ } SBTypeMember SBType::GetVirtualBaseClassAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBTypeMember, SBType, GetVirtualBaseClassAtIndex, + (uint32_t), idx); + SBTypeMember sb_type_member; if (IsValid()) { uint32_t bit_offset = 0; @@ -335,6 +416,8 @@ } SBTypeEnumMemberList SBType::GetEnumMembers() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeEnumMemberList, SBType, GetEnumMembers); + SBTypeEnumMemberList sb_enum_member_list; if (IsValid()) { CompilerType this_type(m_opaque_sp->GetCompilerType(true)); @@ -355,6 +438,9 @@ } SBTypeMember SBType::GetFieldAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBTypeMember, SBType, GetFieldAtIndex, (uint32_t), + idx); + SBTypeMember sb_type_member; if (IsValid()) { CompilerType this_type(m_opaque_sp->GetCompilerType(false)); @@ -379,42 +465,57 @@ } bool SBType::IsTypeComplete() { + SB_RECORD_METHOD_NO_ARGS(bool, SBType, IsTypeComplete); + if (!IsValid()) return false; return m_opaque_sp->GetCompilerType(false).IsCompleteType(); } uint32_t SBType::GetTypeFlags() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetTypeFlags); + if (!IsValid()) return 0; return m_opaque_sp->GetCompilerType(true).GetTypeInfo(); } const char *SBType::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBType, GetName); + if (!IsValid()) return ""; return m_opaque_sp->GetName().GetCString(); } const char *SBType::GetDisplayTypeName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBType, GetDisplayTypeName); + if (!IsValid()) return ""; return m_opaque_sp->GetDisplayTypeName().GetCString(); } lldb::TypeClass SBType::GetTypeClass() { + SB_RECORD_METHOD_NO_ARGS(lldb::TypeClass, SBType, GetTypeClass); + if (IsValid()) return m_opaque_sp->GetCompilerType(true).GetTypeClass(); return lldb::eTypeClassInvalid; } uint32_t SBType::GetNumberOfTemplateArguments() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBType, GetNumberOfTemplateArguments); + if (IsValid()) return m_opaque_sp->GetCompilerType(false).GetNumTemplateArguments(); return 0; } lldb::SBType SBType::GetTemplateArgumentType(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBType, SBType, GetTemplateArgumentType, (uint32_t), + idx); + if (!IsValid()) return SBType(); @@ -437,23 +538,36 @@ } lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) { + SB_RECORD_METHOD(lldb::TemplateArgumentKind, SBType, GetTemplateArgumentKind, + (uint32_t), idx); + if (IsValid()) return m_opaque_sp->GetCompilerType(false).GetTemplateArgumentKind(idx); return eTemplateArgumentKindNull; } -SBTypeList::SBTypeList() : m_opaque_ap(new TypeListImpl()) {} +SBTypeList::SBTypeList() : m_opaque_ap(new TypeListImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeList); +} SBTypeList::SBTypeList(const SBTypeList &rhs) : m_opaque_ap(new TypeListImpl()) { + SB_RECORD_CONSTRUCTOR(SBTypeList, (const lldb::SBTypeList &), rhs); + for (uint32_t i = 0, rhs_size = const_cast(rhs).GetSize(); i < rhs_size; i++) Append(const_cast(rhs).GetTypeAtIndex(i)); } -bool SBTypeList::IsValid() { return (m_opaque_ap != NULL); } +bool SBTypeList::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeList, IsValid); + return (m_opaque_ap != NULL); +} SBTypeList &SBTypeList::operator=(const SBTypeList &rhs) { + SB_RECORD_METHOD(lldb::SBTypeList &, + SBTypeList, operator=,(const lldb::SBTypeList &), rhs); + if (this != &rhs) { m_opaque_ap.reset(new TypeListImpl()); for (uint32_t i = 0, rhs_size = const_cast(rhs).GetSize(); @@ -464,25 +578,36 @@ } void SBTypeList::Append(SBType type) { + SB_RECORD_METHOD(void, SBTypeList, Append, (lldb::SBType), type); + if (type.IsValid()) m_opaque_ap->Append(type.m_opaque_sp); } SBType SBTypeList::GetTypeAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBType, SBTypeList, GetTypeAtIndex, (uint32_t), index); + if (m_opaque_ap) return SBType(m_opaque_ap->GetTypeAtIndex(index)); return SBType(); } -uint32_t SBTypeList::GetSize() { return m_opaque_ap->GetSize(); } +uint32_t SBTypeList::GetSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeList, GetSize); + return m_opaque_ap->GetSize(); +} SBTypeList::~SBTypeList() {} -SBTypeMember::SBTypeMember() : m_opaque_ap() {} +SBTypeMember::SBTypeMember() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeMember); +} SBTypeMember::~SBTypeMember() {} SBTypeMember::SBTypeMember(const SBTypeMember &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBTypeMember, (const lldb::SBTypeMember &), rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_ap.reset(new TypeMemberImpl(rhs.ref())); @@ -490,6 +615,9 @@ } lldb::SBTypeMember &SBTypeMember::operator=(const lldb::SBTypeMember &rhs) { + SB_RECORD_METHOD(lldb::SBTypeMember &, + SBTypeMember, operator=,(const lldb::SBTypeMember &), rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_ap.reset(new TypeMemberImpl(rhs.ref())); @@ -497,15 +625,22 @@ return *this; } -bool SBTypeMember::IsValid() const { return m_opaque_ap.get(); } +bool SBTypeMember::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMember, IsValid); + return m_opaque_ap.get(); +} const char *SBTypeMember::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeMember, GetName); + if (m_opaque_ap) return m_opaque_ap->GetName().GetCString(); return NULL; } SBType SBTypeMember::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeMember, GetType); + SBType sb_type; if (m_opaque_ap) { sb_type.SetSP(m_opaque_ap->GetTypeImpl()); @@ -514,24 +649,32 @@ } uint64_t SBTypeMember::GetOffsetInBytes() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBTypeMember, GetOffsetInBytes); + if (m_opaque_ap) return m_opaque_ap->GetBitOffset() / 8u; return 0; } uint64_t SBTypeMember::GetOffsetInBits() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBTypeMember, GetOffsetInBits); + if (m_opaque_ap) return m_opaque_ap->GetBitOffset(); return 0; } bool SBTypeMember::IsBitfield() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeMember, IsBitfield); + if (m_opaque_ap) return m_opaque_ap->GetIsBitfield(); return false; } uint32_t SBTypeMember::GetBitfieldSizeInBits() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeMember, GetBitfieldSizeInBits); + if (m_opaque_ap) return m_opaque_ap->GetBitfieldBitSize(); return 0; @@ -539,6 +682,10 @@ bool SBTypeMember::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeMember, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + Stream &strm = description.ref(); if (m_opaque_ap) { @@ -578,29 +725,47 @@ const TypeMemberImpl &SBTypeMember::ref() const { return *m_opaque_ap; } -SBTypeMemberFunction::SBTypeMemberFunction() : m_opaque_sp() {} +SBTypeMemberFunction::SBTypeMemberFunction() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeMemberFunction); +} SBTypeMemberFunction::~SBTypeMemberFunction() {} SBTypeMemberFunction::SBTypeMemberFunction(const SBTypeMemberFunction &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeMemberFunction, + (const lldb::SBTypeMemberFunction &), rhs); +} lldb::SBTypeMemberFunction &SBTypeMemberFunction:: operator=(const lldb::SBTypeMemberFunction &rhs) { + SB_RECORD_METHOD( + lldb::SBTypeMemberFunction &, + SBTypeMemberFunction, operator=,(const lldb::SBTypeMemberFunction &), + rhs); + if (this != &rhs) m_opaque_sp = rhs.m_opaque_sp; return *this; } -bool SBTypeMemberFunction::IsValid() const { return m_opaque_sp.get(); } +bool SBTypeMemberFunction::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMemberFunction, IsValid); + return m_opaque_sp.get(); +} const char *SBTypeMemberFunction::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeMemberFunction, GetName); + if (m_opaque_sp) return m_opaque_sp->GetName().GetCString(); return NULL; } const char *SBTypeMemberFunction::GetDemangledName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeMemberFunction, + GetDemangledName); + if (m_opaque_sp) { ConstString mangled_str = m_opaque_sp->GetMangledName(); if (mangled_str) { @@ -612,12 +777,16 @@ } const char *SBTypeMemberFunction::GetMangledName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeMemberFunction, GetMangledName); + if (m_opaque_sp) return m_opaque_sp->GetMangledName().GetCString(); return NULL; } SBType SBTypeMemberFunction::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeMemberFunction, GetType); + SBType sb_type; if (m_opaque_sp) { sb_type.SetSP(lldb::TypeImplSP(new TypeImpl(m_opaque_sp->GetType()))); @@ -626,6 +795,8 @@ } lldb::SBType SBTypeMemberFunction::GetReturnType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeMemberFunction, GetReturnType); + SBType sb_type; if (m_opaque_sp) { sb_type.SetSP(lldb::TypeImplSP(new TypeImpl(m_opaque_sp->GetReturnType()))); @@ -634,12 +805,18 @@ } uint32_t SBTypeMemberFunction::GetNumberOfArguments() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeMemberFunction, + GetNumberOfArguments); + if (m_opaque_sp) return m_opaque_sp->GetNumArguments(); return 0; } lldb::SBType SBTypeMemberFunction::GetArgumentTypeAtIndex(uint32_t i) { + SB_RECORD_METHOD(lldb::SBType, SBTypeMemberFunction, GetArgumentTypeAtIndex, + (uint32_t), i); + SBType sb_type; if (m_opaque_sp) { sb_type.SetSP( @@ -649,6 +826,9 @@ } lldb::MemberFunctionKind SBTypeMemberFunction::GetKind() { + SB_RECORD_METHOD_NO_ARGS(lldb::MemberFunctionKind, SBTypeMemberFunction, + GetKind); + if (m_opaque_sp) return m_opaque_sp->GetKind(); return lldb::eMemberFunctionKindUnknown; @@ -656,6 +836,10 @@ bool SBTypeMemberFunction::GetDescription( lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeMemberFunction, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + Stream &strm = description.ref(); if (m_opaque_sp) Index: source/API/SBTypeCategory.cpp =================================================================== --- source/API/SBTypeCategory.cpp +++ source/API/SBTypeCategory.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeCategory.h" #include "lldb/API/SBStream.h" @@ -26,26 +28,37 @@ typedef std::pair ImplType; -SBTypeCategory::SBTypeCategory() : m_opaque_sp() {} +SBTypeCategory::SBTypeCategory() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeCategory); +} SBTypeCategory::SBTypeCategory(const char *name) : m_opaque_sp() { DataVisualization::Categories::GetCategory(ConstString(name), m_opaque_sp); } SBTypeCategory::SBTypeCategory(const lldb::SBTypeCategory &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeCategory, (const lldb::SBTypeCategory &), rhs); +} SBTypeCategory::~SBTypeCategory() {} -bool SBTypeCategory::IsValid() const { return (m_opaque_sp.get() != NULL); } +bool SBTypeCategory::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeCategory, IsValid); + return (m_opaque_sp.get() != NULL); +} bool SBTypeCategory::GetEnabled() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeCategory, GetEnabled); + if (!IsValid()) return false; return m_opaque_sp->IsEnabled(); } void SBTypeCategory::SetEnabled(bool enabled) { + SB_RECORD_METHOD(void, SBTypeCategory, SetEnabled, (bool), enabled); + if (!IsValid()) return; if (enabled) @@ -55,29 +68,41 @@ } const char *SBTypeCategory::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeCategory, GetName); + if (!IsValid()) return NULL; return m_opaque_sp->GetName(); } lldb::LanguageType SBTypeCategory::GetLanguageAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::LanguageType, SBTypeCategory, GetLanguageAtIndex, + (uint32_t), idx); + if (IsValid()) return m_opaque_sp->GetLanguageAtIndex(idx); return lldb::eLanguageTypeUnknown; } uint32_t SBTypeCategory::GetNumLanguages() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeCategory, GetNumLanguages); + if (IsValid()) return m_opaque_sp->GetNumLanguages(); return 0; } void SBTypeCategory::AddLanguage(lldb::LanguageType language) { + SB_RECORD_METHOD(void, SBTypeCategory, AddLanguage, (lldb::LanguageType), + language); + if (IsValid()) m_opaque_sp->AddLanguage(language); } uint32_t SBTypeCategory::GetNumFormats() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeCategory, GetNumFormats); + if (!IsValid()) return 0; @@ -86,6 +111,8 @@ } uint32_t SBTypeCategory::GetNumSummaries() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeCategory, GetNumSummaries); + if (!IsValid()) return 0; return m_opaque_sp->GetTypeSummariesContainer()->GetCount() + @@ -93,6 +120,8 @@ } uint32_t SBTypeCategory::GetNumFilters() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeCategory, GetNumFilters); + if (!IsValid()) return 0; return m_opaque_sp->GetTypeFiltersContainer()->GetCount() + @@ -101,6 +130,8 @@ #ifndef LLDB_DISABLE_PYTHON uint32_t SBTypeCategory::GetNumSynthetics() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeCategory, GetNumSynthetics); + if (!IsValid()) return 0; return m_opaque_sp->GetTypeSyntheticsContainer()->GetCount() + @@ -110,6 +141,9 @@ lldb::SBTypeNameSpecifier SBTypeCategory::GetTypeNameSpecifierForFilterAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForFilterAtIndex, (uint32_t), index); + if (!IsValid()) return SBTypeNameSpecifier(); return SBTypeNameSpecifier( @@ -118,6 +152,9 @@ lldb::SBTypeNameSpecifier SBTypeCategory::GetTypeNameSpecifierForFormatAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForFormatAtIndex, (uint32_t), index); + if (!IsValid()) return SBTypeNameSpecifier(); return SBTypeNameSpecifier( @@ -126,6 +163,9 @@ lldb::SBTypeNameSpecifier SBTypeCategory::GetTypeNameSpecifierForSummaryAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForSummaryAtIndex, (uint32_t), index); + if (!IsValid()) return SBTypeNameSpecifier(); return SBTypeNameSpecifier( @@ -135,6 +175,9 @@ #ifndef LLDB_DISABLE_PYTHON lldb::SBTypeNameSpecifier SBTypeCategory::GetTypeNameSpecifierForSyntheticAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory, + GetTypeNameSpecifierForSyntheticAtIndex, (uint32_t), index); + if (!IsValid()) return SBTypeNameSpecifier(); return SBTypeNameSpecifier( @@ -143,6 +186,9 @@ #endif SBTypeFilter SBTypeCategory::GetFilterForType(SBTypeNameSpecifier spec) { + SB_RECORD_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType, + (lldb::SBTypeNameSpecifier), spec); + if (!IsValid()) return SBTypeFilter(); @@ -167,6 +213,9 @@ return lldb::SBTypeFilter(filter_sp); } SBTypeFormat SBTypeCategory::GetFormatForType(SBTypeNameSpecifier spec) { + SB_RECORD_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType, + (lldb::SBTypeNameSpecifier), spec); + if (!IsValid()) return SBTypeFormat(); @@ -190,6 +239,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSummary SBTypeCategory::GetSummaryForType(SBTypeNameSpecifier spec) { + SB_RECORD_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryForType, + (lldb::SBTypeNameSpecifier), spec); + if (!IsValid()) return SBTypeSummary(); @@ -214,6 +266,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSynthetic SBTypeCategory::GetSyntheticForType(SBTypeNameSpecifier spec) { + SB_RECORD_METHOD(lldb::SBTypeSynthetic, SBTypeCategory, GetSyntheticForType, + (lldb::SBTypeNameSpecifier), spec); + if (!IsValid()) return SBTypeSynthetic(); @@ -241,6 +296,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeFilter SBTypeCategory::GetFilterAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterAtIndex, + (uint32_t), index); + if (!IsValid()) return SBTypeFilter(); lldb::SyntheticChildrenSP children_sp = @@ -257,6 +315,9 @@ #endif SBTypeFormat SBTypeCategory::GetFormatAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex, + (uint32_t), index); + if (!IsValid()) return SBTypeFormat(); return SBTypeFormat(m_opaque_sp->GetFormatAtIndex((index))); @@ -264,6 +325,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSummary SBTypeCategory::GetSummaryAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryAtIndex, + (uint32_t), index); + if (!IsValid()) return SBTypeSummary(); return SBTypeSummary(m_opaque_sp->GetSummaryAtIndex((index))); @@ -272,6 +336,9 @@ #ifndef LLDB_DISABLE_PYTHON SBTypeSynthetic SBTypeCategory::GetSyntheticAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeSynthetic, SBTypeCategory, GetSyntheticAtIndex, + (uint32_t), index); + if (!IsValid()) return SBTypeSynthetic(); lldb::SyntheticChildrenSP children_sp = @@ -289,6 +356,10 @@ bool SBTypeCategory::AddTypeFormat(SBTypeNameSpecifier type_name, SBTypeFormat format) { + SB_RECORD_METHOD(bool, SBTypeCategory, AddTypeFormat, + (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat), type_name, + format); + if (!IsValid()) return false; @@ -311,6 +382,9 @@ } bool SBTypeCategory::DeleteTypeFormat(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(bool, SBTypeCategory, DeleteTypeFormat, + (lldb::SBTypeNameSpecifier), type_name); + if (!IsValid()) return false; @@ -328,6 +402,10 @@ #ifndef LLDB_DISABLE_PYTHON bool SBTypeCategory::AddTypeSummary(SBTypeNameSpecifier type_name, SBTypeSummary summary) { + SB_RECORD_METHOD(bool, SBTypeCategory, AddTypeSummary, + (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary), type_name, + summary); + if (!IsValid()) return false; @@ -385,6 +463,9 @@ #endif bool SBTypeCategory::DeleteTypeSummary(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(bool, SBTypeCategory, DeleteTypeSummary, + (lldb::SBTypeNameSpecifier), type_name); + if (!IsValid()) return false; @@ -401,6 +482,10 @@ bool SBTypeCategory::AddTypeFilter(SBTypeNameSpecifier type_name, SBTypeFilter filter) { + SB_RECORD_METHOD(bool, SBTypeCategory, AddTypeFilter, + (lldb::SBTypeNameSpecifier, lldb::SBTypeFilter), type_name, + filter); + if (!IsValid()) return false; @@ -423,6 +508,9 @@ } bool SBTypeCategory::DeleteTypeFilter(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(bool, SBTypeCategory, DeleteTypeFilter, + (lldb::SBTypeNameSpecifier), type_name); + if (!IsValid()) return false; @@ -440,6 +528,10 @@ #ifndef LLDB_DISABLE_PYTHON bool SBTypeCategory::AddTypeSynthetic(SBTypeNameSpecifier type_name, SBTypeSynthetic synth) { + SB_RECORD_METHOD(bool, SBTypeCategory, AddTypeSynthetic, + (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic), + type_name, synth); + if (!IsValid()) return false; @@ -496,6 +588,9 @@ } bool SBTypeCategory::DeleteTypeSynthetic(SBTypeNameSpecifier type_name) { + SB_RECORD_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic, + (lldb::SBTypeNameSpecifier), type_name); + if (!IsValid()) return false; @@ -513,6 +608,10 @@ bool SBTypeCategory::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeCategory, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (!IsValid()) return false; description.Printf("Category name: %s\n", GetName()); @@ -521,6 +620,10 @@ lldb::SBTypeCategory &SBTypeCategory:: operator=(const lldb::SBTypeCategory &rhs) { + SB_RECORD_METHOD(lldb::SBTypeCategory &, + SBTypeCategory, operator=,(const lldb::SBTypeCategory &), + rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -528,6 +631,9 @@ } bool SBTypeCategory::operator==(lldb::SBTypeCategory &rhs) { + SB_RECORD_METHOD(bool, SBTypeCategory, operator==,(lldb::SBTypeCategory &), + rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -535,6 +641,9 @@ } bool SBTypeCategory::operator!=(lldb::SBTypeCategory &rhs) { + SB_RECORD_METHOD(bool, SBTypeCategory, operator!=,(lldb::SBTypeCategory &), + rhs); + if (!IsValid()) return rhs.IsValid(); Index: source/API/SBTypeEnumMember.cpp =================================================================== --- source/API/SBTypeEnumMember.cpp +++ source/API/SBTypeEnumMember.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeEnumMember.h" #include "lldb/API/SBDefines.h" #include "lldb/API/SBStream.h" @@ -17,7 +19,9 @@ using namespace lldb; using namespace lldb_private; -SBTypeEnumMember::SBTypeEnumMember() : m_opaque_sp() {} +SBTypeEnumMember::SBTypeEnumMember() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeEnumMember); +} SBTypeEnumMember::~SBTypeEnumMember() {} SBTypeEnumMember::SBTypeEnumMember( @@ -26,6 +30,9 @@ SBTypeEnumMember::SBTypeEnumMember(const SBTypeEnumMember &rhs) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBTypeEnumMember, (const lldb::SBTypeEnumMember &), + rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_sp.reset(new TypeEnumMemberImpl(rhs.ref())); @@ -33,6 +40,10 @@ } SBTypeEnumMember &SBTypeEnumMember::operator=(const SBTypeEnumMember &rhs) { + SB_RECORD_METHOD(lldb::SBTypeEnumMember &, + SBTypeEnumMember, operator=,(const lldb::SBTypeEnumMember &), + rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_sp.reset(new TypeEnumMemberImpl(rhs.ref())); @@ -40,27 +51,38 @@ return *this; } -bool SBTypeEnumMember::IsValid() const { return m_opaque_sp.get(); } +bool SBTypeEnumMember::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeEnumMember, IsValid); + return m_opaque_sp.get(); +} const char *SBTypeEnumMember::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeEnumMember, GetName); + if (m_opaque_sp.get()) return m_opaque_sp->GetName().GetCString(); return NULL; } int64_t SBTypeEnumMember::GetValueAsSigned() { + SB_RECORD_METHOD_NO_ARGS(int64_t, SBTypeEnumMember, GetValueAsSigned); + if (m_opaque_sp.get()) return m_opaque_sp->GetValueAsSigned(); return 0; } uint64_t SBTypeEnumMember::GetValueAsUnsigned() { + SB_RECORD_METHOD_NO_ARGS(uint64_t, SBTypeEnumMember, GetValueAsUnsigned); + if (m_opaque_sp.get()) return m_opaque_sp->GetValueAsUnsigned(); return 0; } SBType SBTypeEnumMember::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeEnumMember, GetType); + SBType sb_type; if (m_opaque_sp.get()) { sb_type.SetSP(m_opaque_sp->GetIntegerType()); @@ -83,20 +105,33 @@ } SBTypeEnumMemberList::SBTypeEnumMemberList() - : m_opaque_ap(new TypeEnumMemberListImpl()) {} + : m_opaque_ap(new TypeEnumMemberListImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeEnumMemberList); +} SBTypeEnumMemberList::SBTypeEnumMemberList(const SBTypeEnumMemberList &rhs) : m_opaque_ap(new TypeEnumMemberListImpl()) { + SB_RECORD_CONSTRUCTOR(SBTypeEnumMemberList, + (const lldb::SBTypeEnumMemberList &), rhs); + for (uint32_t i = 0, rhs_size = const_cast(rhs).GetSize(); i < rhs_size; i++) Append(const_cast(rhs).GetTypeEnumMemberAtIndex(i)); } -bool SBTypeEnumMemberList::IsValid() { return (m_opaque_ap != NULL); } +bool SBTypeEnumMemberList::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeEnumMemberList, IsValid); + return (m_opaque_ap != NULL); +} SBTypeEnumMemberList &SBTypeEnumMemberList:: operator=(const SBTypeEnumMemberList &rhs) { + SB_RECORD_METHOD( + lldb::SBTypeEnumMemberList &, + SBTypeEnumMemberList, operator=,(const lldb::SBTypeEnumMemberList &), + rhs); + if (this != &rhs) { m_opaque_ap.reset(new TypeEnumMemberListImpl()); for (uint32_t i = 0, @@ -109,23 +144,36 @@ } void SBTypeEnumMemberList::Append(SBTypeEnumMember enum_member) { + SB_RECORD_METHOD(void, SBTypeEnumMemberList, Append, (lldb::SBTypeEnumMember), + enum_member); + if (enum_member.IsValid()) m_opaque_ap->Append(enum_member.m_opaque_sp); } SBTypeEnumMember SBTypeEnumMemberList::GetTypeEnumMemberAtIndex(uint32_t index) { + SB_RECORD_METHOD(lldb::SBTypeEnumMember, SBTypeEnumMemberList, + GetTypeEnumMemberAtIndex, (uint32_t), index); + if (m_opaque_ap) return SBTypeEnumMember(m_opaque_ap->GetTypeEnumMemberAtIndex(index)); return SBTypeEnumMember(); } -uint32_t SBTypeEnumMemberList::GetSize() { return m_opaque_ap->GetSize(); } +uint32_t SBTypeEnumMemberList::GetSize() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeEnumMemberList, GetSize); + return m_opaque_ap->GetSize(); +} SBTypeEnumMemberList::~SBTypeEnumMemberList() {} bool SBTypeEnumMember::GetDescription( lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeEnumMember, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + Stream &strm = description.ref(); if (m_opaque_sp.get()) { Index: source/API/SBTypeFilter.cpp =================================================================== --- source/API/SBTypeFilter.cpp +++ source/API/SBTypeFilter.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeFilter.h" #include "lldb/API/SBStream.h" @@ -16,31 +18,48 @@ using namespace lldb; using namespace lldb_private; -SBTypeFilter::SBTypeFilter() : m_opaque_sp() {} +SBTypeFilter::SBTypeFilter() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeFilter); +} SBTypeFilter::SBTypeFilter(uint32_t options) - : m_opaque_sp(TypeFilterImplSP(new TypeFilterImpl(options))) {} + : m_opaque_sp(TypeFilterImplSP(new TypeFilterImpl(options))) { + SB_RECORD_CONSTRUCTOR(SBTypeFilter, (uint32_t), options); +} SBTypeFilter::SBTypeFilter(const lldb::SBTypeFilter &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeFilter, (const lldb::SBTypeFilter &), rhs); +} SBTypeFilter::~SBTypeFilter() {} -bool SBTypeFilter::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBTypeFilter::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFilter, IsValid); + return m_opaque_sp.get() != NULL; +} uint32_t SBTypeFilter::GetOptions() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeFilter, GetOptions); + if (IsValid()) return m_opaque_sp->GetOptions(); return 0; } void SBTypeFilter::SetOptions(uint32_t value) { + SB_RECORD_METHOD(void, SBTypeFilter, SetOptions, (uint32_t), value); + if (CopyOnWrite_Impl()) m_opaque_sp->SetOptions(value); } bool SBTypeFilter::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeFilter, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (!IsValid()) return false; else { @@ -50,17 +69,24 @@ } void SBTypeFilter::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBTypeFilter, Clear); + if (CopyOnWrite_Impl()) m_opaque_sp->Clear(); } uint32_t SBTypeFilter::GetNumberOfExpressionPaths() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeFilter, GetNumberOfExpressionPaths); + if (IsValid()) return m_opaque_sp->GetCount(); return 0; } const char *SBTypeFilter::GetExpressionPathAtIndex(uint32_t i) { + SB_RECORD_METHOD(const char *, SBTypeFilter, GetExpressionPathAtIndex, + (uint32_t), i); + if (IsValid()) { const char *item = m_opaque_sp->GetExpressionPathAtIndex(i); if (item && *item == '.') @@ -71,6 +97,9 @@ } bool SBTypeFilter::ReplaceExpressionPathAtIndex(uint32_t i, const char *item) { + SB_RECORD_METHOD(bool, SBTypeFilter, ReplaceExpressionPathAtIndex, + (uint32_t, const char *), i, item); + if (CopyOnWrite_Impl()) return m_opaque_sp->SetExpressionPathAtIndex(i, item); else @@ -78,11 +107,17 @@ } void SBTypeFilter::AppendExpressionPath(const char *item) { + SB_RECORD_METHOD(void, SBTypeFilter, AppendExpressionPath, (const char *), + item); + if (CopyOnWrite_Impl()) m_opaque_sp->AddExpressionPath(item); } lldb::SBTypeFilter &SBTypeFilter::operator=(const lldb::SBTypeFilter &rhs) { + SB_RECORD_METHOD(lldb::SBTypeFilter &, + SBTypeFilter, operator=,(const lldb::SBTypeFilter &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -90,6 +125,8 @@ } bool SBTypeFilter::operator==(lldb::SBTypeFilter &rhs) { + SB_RECORD_METHOD(bool, SBTypeFilter, operator==,(lldb::SBTypeFilter &), rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -97,6 +134,8 @@ } bool SBTypeFilter::IsEqualTo(lldb::SBTypeFilter &rhs) { + SB_RECORD_METHOD(bool, SBTypeFilter, IsEqualTo, (lldb::SBTypeFilter &), rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -112,6 +151,8 @@ } bool SBTypeFilter::operator!=(lldb::SBTypeFilter &rhs) { + SB_RECORD_METHOD(bool, SBTypeFilter, operator!=,(lldb::SBTypeFilter &), rhs); + if (!IsValid()) return !rhs.IsValid(); Index: source/API/SBTypeFormat.cpp =================================================================== --- source/API/SBTypeFormat.cpp +++ source/API/SBTypeFormat.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeFormat.h" #include "lldb/API/SBStream.h" @@ -16,30 +18,46 @@ using namespace lldb; using namespace lldb_private; -SBTypeFormat::SBTypeFormat() : m_opaque_sp() {} +SBTypeFormat::SBTypeFormat() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeFormat); +} SBTypeFormat::SBTypeFormat(lldb::Format format, uint32_t options) : m_opaque_sp( - TypeFormatImplSP(new TypeFormatImpl_Format(format, options))) {} + TypeFormatImplSP(new TypeFormatImpl_Format(format, options))) { + SB_RECORD_CONSTRUCTOR(SBTypeFormat, (lldb::Format, uint32_t), format, + options); +} SBTypeFormat::SBTypeFormat(const char *type, uint32_t options) : m_opaque_sp(TypeFormatImplSP(new TypeFormatImpl_EnumType( - ConstString(type ? type : ""), options))) {} + ConstString(type ? type : ""), options))) { + SB_RECORD_CONSTRUCTOR(SBTypeFormat, (const char *, uint32_t), type, options); +} SBTypeFormat::SBTypeFormat(const lldb::SBTypeFormat &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeFormat, (const lldb::SBTypeFormat &), rhs); +} SBTypeFormat::~SBTypeFormat() {} -bool SBTypeFormat::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBTypeFormat::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFormat, IsValid); + return m_opaque_sp.get() != NULL; +} lldb::Format SBTypeFormat::GetFormat() { + SB_RECORD_METHOD_NO_ARGS(lldb::Format, SBTypeFormat, GetFormat); + if (IsValid() && m_opaque_sp->GetType() == TypeFormatImpl::Type::eTypeFormat) return ((TypeFormatImpl_Format *)m_opaque_sp.get())->GetFormat(); return lldb::eFormatInvalid; } const char *SBTypeFormat::GetTypeName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeFormat, GetTypeName); + if (IsValid() && m_opaque_sp->GetType() == TypeFormatImpl::Type::eTypeEnum) return ((TypeFormatImpl_EnumType *)m_opaque_sp.get()) ->GetTypeName() @@ -48,29 +66,41 @@ } uint32_t SBTypeFormat::GetOptions() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeFormat, GetOptions); + if (IsValid()) return m_opaque_sp->GetOptions(); return 0; } void SBTypeFormat::SetFormat(lldb::Format fmt) { + SB_RECORD_METHOD(void, SBTypeFormat, SetFormat, (lldb::Format), fmt); + if (CopyOnWrite_Impl(Type::eTypeFormat)) ((TypeFormatImpl_Format *)m_opaque_sp.get())->SetFormat(fmt); } void SBTypeFormat::SetTypeName(const char *type) { + SB_RECORD_METHOD(void, SBTypeFormat, SetTypeName, (const char *), type); + if (CopyOnWrite_Impl(Type::eTypeEnum)) ((TypeFormatImpl_EnumType *)m_opaque_sp.get()) ->SetTypeName(ConstString(type ? type : "")); } void SBTypeFormat::SetOptions(uint32_t value) { + SB_RECORD_METHOD(void, SBTypeFormat, SetOptions, (uint32_t), value); + if (CopyOnWrite_Impl(Type::eTypeKeepSame)) m_opaque_sp->SetOptions(value); } bool SBTypeFormat::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeFormat, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (!IsValid()) return false; else { @@ -80,6 +110,9 @@ } lldb::SBTypeFormat &SBTypeFormat::operator=(const lldb::SBTypeFormat &rhs) { + SB_RECORD_METHOD(lldb::SBTypeFormat &, + SBTypeFormat, operator=,(const lldb::SBTypeFormat &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -87,12 +120,16 @@ } bool SBTypeFormat::operator==(lldb::SBTypeFormat &rhs) { + SB_RECORD_METHOD(bool, SBTypeFormat, operator==,(lldb::SBTypeFormat &), rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp == rhs.m_opaque_sp; } bool SBTypeFormat::IsEqualTo(lldb::SBTypeFormat &rhs) { + SB_RECORD_METHOD(bool, SBTypeFormat, IsEqualTo, (lldb::SBTypeFormat &), rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -103,6 +140,8 @@ } bool SBTypeFormat::operator!=(lldb::SBTypeFormat &rhs) { + SB_RECORD_METHOD(bool, SBTypeFormat, operator!=,(lldb::SBTypeFormat &), rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp != rhs.m_opaque_sp; Index: source/API/SBTypeNameSpecifier.cpp =================================================================== --- source/API/SBTypeNameSpecifier.cpp +++ source/API/SBTypeNameSpecifier.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeNameSpecifier.h" #include "lldb/API/SBStream.h" @@ -17,28 +19,43 @@ using namespace lldb; using namespace lldb_private; -SBTypeNameSpecifier::SBTypeNameSpecifier() : m_opaque_sp() {} +SBTypeNameSpecifier::SBTypeNameSpecifier() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeNameSpecifier); +} SBTypeNameSpecifier::SBTypeNameSpecifier(const char *name, bool is_regex) : m_opaque_sp(new TypeNameSpecifierImpl(name, is_regex)) { + SB_RECORD_CONSTRUCTOR(SBTypeNameSpecifier, (const char *, bool), name, + is_regex); + if (name == NULL || (*name) == 0) m_opaque_sp.reset(); } SBTypeNameSpecifier::SBTypeNameSpecifier(SBType type) : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR(SBTypeNameSpecifier, (lldb::SBType), type); + if (type.IsValid()) m_opaque_sp = TypeNameSpecifierImplSP( new TypeNameSpecifierImpl(type.m_opaque_sp->GetCompilerType(true))); } SBTypeNameSpecifier::SBTypeNameSpecifier(const lldb::SBTypeNameSpecifier &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeNameSpecifier, + (const lldb::SBTypeNameSpecifier &), rhs); +} SBTypeNameSpecifier::~SBTypeNameSpecifier() {} -bool SBTypeNameSpecifier::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBTypeNameSpecifier::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeNameSpecifier, IsValid); + return m_opaque_sp.get() != NULL; +} const char *SBTypeNameSpecifier::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeNameSpecifier, GetName); + if (!IsValid()) return NULL; @@ -46,6 +63,8 @@ } SBType SBTypeNameSpecifier::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeNameSpecifier, GetType); + if (!IsValid()) return SBType(); lldb_private::CompilerType c_type = m_opaque_sp->GetCompilerType(); @@ -55,6 +74,8 @@ } bool SBTypeNameSpecifier::IsRegex() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeNameSpecifier, IsRegex); + if (!IsValid()) return false; @@ -63,6 +84,10 @@ bool SBTypeNameSpecifier::GetDescription( lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeNameSpecifier, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (!IsValid()) return false; description.Printf("SBTypeNameSpecifier(%s,%s)", GetName(), @@ -72,6 +97,10 @@ lldb::SBTypeNameSpecifier &SBTypeNameSpecifier:: operator=(const lldb::SBTypeNameSpecifier &rhs) { + SB_RECORD_METHOD( + lldb::SBTypeNameSpecifier &, + SBTypeNameSpecifier, operator=,(const lldb::SBTypeNameSpecifier &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -79,12 +108,18 @@ } bool SBTypeNameSpecifier::operator==(lldb::SBTypeNameSpecifier &rhs) { + SB_RECORD_METHOD( + bool, SBTypeNameSpecifier, operator==,(lldb::SBTypeNameSpecifier &), rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp == rhs.m_opaque_sp; } bool SBTypeNameSpecifier::IsEqualTo(lldb::SBTypeNameSpecifier &rhs) { + SB_RECORD_METHOD(bool, SBTypeNameSpecifier, IsEqualTo, + (lldb::SBTypeNameSpecifier &), rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -97,6 +132,9 @@ } bool SBTypeNameSpecifier::operator!=(lldb::SBTypeNameSpecifier &rhs) { + SB_RECORD_METHOD( + bool, SBTypeNameSpecifier, operator!=,(lldb::SBTypeNameSpecifier &), rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp != rhs.m_opaque_sp; Index: source/API/SBTypeSummary.cpp =================================================================== --- source/API/SBTypeSummary.cpp +++ source/API/SBTypeSummary.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBTypeSummary.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBValue.h" @@ -18,11 +20,16 @@ using namespace lldb_private; SBTypeSummaryOptions::SBTypeSummaryOptions() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeSummaryOptions); + m_opaque_ap.reset(new TypeSummaryOptions()); } SBTypeSummaryOptions::SBTypeSummaryOptions( const lldb::SBTypeSummaryOptions &rhs) { + SB_RECORD_CONSTRUCTOR(SBTypeSummaryOptions, + (const lldb::SBTypeSummaryOptions &), rhs); + if (rhs.m_opaque_ap) m_opaque_ap.reset(new TypeSummaryOptions(*rhs.m_opaque_ap)); else @@ -31,26 +38,41 @@ SBTypeSummaryOptions::~SBTypeSummaryOptions() {} -bool SBTypeSummaryOptions::IsValid() { return m_opaque_ap.get(); } +bool SBTypeSummaryOptions::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSummaryOptions, IsValid); + return m_opaque_ap.get(); +} lldb::LanguageType SBTypeSummaryOptions::GetLanguage() { + SB_RECORD_METHOD_NO_ARGS(lldb::LanguageType, SBTypeSummaryOptions, + GetLanguage); + if (IsValid()) return m_opaque_ap->GetLanguage(); return lldb::eLanguageTypeUnknown; } lldb::TypeSummaryCapping SBTypeSummaryOptions::GetCapping() { + SB_RECORD_METHOD_NO_ARGS(lldb::TypeSummaryCapping, SBTypeSummaryOptions, + GetCapping); + if (IsValid()) return m_opaque_ap->GetCapping(); return eTypeSummaryCapped; } void SBTypeSummaryOptions::SetLanguage(lldb::LanguageType l) { + SB_RECORD_METHOD(void, SBTypeSummaryOptions, SetLanguage, + (lldb::LanguageType), l); + if (IsValid()) m_opaque_ap->SetLanguage(l); } void SBTypeSummaryOptions::SetCapping(lldb::TypeSummaryCapping c) { + SB_RECORD_METHOD(void, SBTypeSummaryOptions, SetCapping, + (lldb::TypeSummaryCapping), c); + if (IsValid()) m_opaque_ap->SetCapping(c); } @@ -78,6 +100,10 @@ SBTypeSummaryOptions::SBTypeSummaryOptions( const lldb_private::TypeSummaryOptions *lldb_object_ptr) { + SB_RECORD_CONSTRUCTOR(SBTypeSummaryOptions, + (const lldb_private::TypeSummaryOptions *), + lldb_object_ptr); + SetOptions(lldb_object_ptr); } @@ -89,10 +115,16 @@ m_opaque_ap.reset(new TypeSummaryOptions()); } -SBTypeSummary::SBTypeSummary() : m_opaque_sp() {} +SBTypeSummary::SBTypeSummary() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeSummary); +} SBTypeSummary SBTypeSummary::CreateWithSummaryString(const char *data, uint32_t options) { + SB_RECORD_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithSummaryString, (const char *, uint32_t), + data, options); + if (!data || data[0] == 0) return SBTypeSummary(); @@ -102,6 +134,10 @@ SBTypeSummary SBTypeSummary::CreateWithFunctionName(const char *data, uint32_t options) { + SB_RECORD_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithFunctionName, (const char *, uint32_t), + data, options); + if (!data || data[0] == 0) return SBTypeSummary(); @@ -111,6 +147,10 @@ SBTypeSummary SBTypeSummary::CreateWithScriptCode(const char *data, uint32_t options) { + SB_RECORD_STATIC_METHOD(lldb::SBTypeSummary, SBTypeSummary, + CreateWithScriptCode, (const char *, uint32_t), data, + options); + if (!data || data[0] == 0) return SBTypeSummary(); @@ -142,13 +182,20 @@ } SBTypeSummary::SBTypeSummary(const lldb::SBTypeSummary &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeSummary, (const lldb::SBTypeSummary &), rhs); +} SBTypeSummary::~SBTypeSummary() {} -bool SBTypeSummary::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBTypeSummary::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSummary, IsValid); + return m_opaque_sp.get() != NULL; +} bool SBTypeSummary::IsFunctionCode() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSummary, IsFunctionCode); + if (!IsValid()) return false; if (ScriptSummaryFormat *script_summary_ptr = @@ -160,6 +207,8 @@ } bool SBTypeSummary::IsFunctionName() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSummary, IsFunctionName); + if (!IsValid()) return false; if (ScriptSummaryFormat *script_summary_ptr = @@ -171,6 +220,8 @@ } bool SBTypeSummary::IsSummaryString() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSummary, IsSummaryString); + if (!IsValid()) return false; @@ -178,6 +229,8 @@ } const char *SBTypeSummary::GetData() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeSummary, GetData); + if (!IsValid()) return NULL; if (ScriptSummaryFormat *script_summary_ptr = @@ -194,18 +247,24 @@ } uint32_t SBTypeSummary::GetOptions() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeSummary, GetOptions); + if (!IsValid()) return lldb::eTypeOptionNone; return m_opaque_sp->GetOptions(); } void SBTypeSummary::SetOptions(uint32_t value) { + SB_RECORD_METHOD(void, SBTypeSummary, SetOptions, (uint32_t), value); + if (!CopyOnWrite_Impl()) return; m_opaque_sp->SetOptions(value); } void SBTypeSummary::SetSummaryString(const char *data) { + SB_RECORD_METHOD(void, SBTypeSummary, SetSummaryString, (const char *), data); + if (!IsValid()) return; if (!llvm::isa(m_opaque_sp.get())) @@ -216,6 +275,8 @@ } void SBTypeSummary::SetFunctionName(const char *data) { + SB_RECORD_METHOD(void, SBTypeSummary, SetFunctionName, (const char *), data); + if (!IsValid()) return; if (!llvm::isa(m_opaque_sp.get())) @@ -226,6 +287,8 @@ } void SBTypeSummary::SetFunctionCode(const char *data) { + SB_RECORD_METHOD(void, SBTypeSummary, SetFunctionCode, (const char *), data); + if (!IsValid()) return; if (!llvm::isa(m_opaque_sp.get())) @@ -237,6 +300,10 @@ bool SBTypeSummary::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeSummary, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (!CopyOnWrite_Impl()) return false; else { @@ -246,6 +313,8 @@ } bool SBTypeSummary::DoesPrintValue(lldb::SBValue value) { + SB_RECORD_METHOD(bool, SBTypeSummary, DoesPrintValue, (lldb::SBValue), value); + if (!IsValid()) return false; lldb::ValueObjectSP value_sp = value.GetSP(); @@ -253,6 +322,9 @@ } lldb::SBTypeSummary &SBTypeSummary::operator=(const lldb::SBTypeSummary &rhs) { + SB_RECORD_METHOD(lldb::SBTypeSummary &, + SBTypeSummary, operator=,(const lldb::SBTypeSummary &), rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -260,12 +332,18 @@ } bool SBTypeSummary::operator==(lldb::SBTypeSummary &rhs) { + SB_RECORD_METHOD(bool, SBTypeSummary, operator==,(lldb::SBTypeSummary &), + rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp == rhs.m_opaque_sp; } bool SBTypeSummary::IsEqualTo(lldb::SBTypeSummary &rhs) { + SB_RECORD_METHOD(bool, SBTypeSummary, IsEqualTo, (lldb::SBTypeSummary &), + rhs); + if (IsValid()) { // valid and invalid are different if (!rhs.IsValid()) @@ -304,6 +382,9 @@ } bool SBTypeSummary::operator!=(lldb::SBTypeSummary &rhs) { + SB_RECORD_METHOD(bool, SBTypeSummary, operator!=,(lldb::SBTypeSummary &), + rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp != rhs.m_opaque_sp; Index: source/API/SBTypeSynthetic.cpp =================================================================== --- source/API/SBTypeSynthetic.cpp +++ source/API/SBTypeSynthetic.cpp @@ -7,9 +7,10 @@ // //===----------------------------------------------------------------------===// -#include "lldb/API/SBTypeSynthetic.h" +#include "SBReproducerPrivate.h" #include "lldb/API/SBStream.h" +#include "lldb/API/SBTypeSynthetic.h" #include "lldb/DataFormatters/DataVisualization.h" @@ -18,10 +19,16 @@ #ifndef LLDB_DISABLE_PYTHON -SBTypeSynthetic::SBTypeSynthetic() : m_opaque_sp() {} +SBTypeSynthetic::SBTypeSynthetic() : m_opaque_sp() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeSynthetic); +} SBTypeSynthetic SBTypeSynthetic::CreateWithClassName(const char *data, uint32_t options) { + SB_RECORD_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, + CreateWithClassName, (const char *, uint32_t), data, + options); + if (!data || data[0] == 0) return SBTypeSynthetic(); return SBTypeSynthetic(ScriptedSyntheticChildrenSP( @@ -30,6 +37,10 @@ SBTypeSynthetic SBTypeSynthetic::CreateWithScriptCode(const char *data, uint32_t options) { + SB_RECORD_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, + CreateWithScriptCode, (const char *, uint32_t), data, + options); + if (!data || data[0] == 0) return SBTypeSynthetic(); return SBTypeSynthetic(ScriptedSyntheticChildrenSP( @@ -37,13 +48,20 @@ } SBTypeSynthetic::SBTypeSynthetic(const lldb::SBTypeSynthetic &rhs) - : m_opaque_sp(rhs.m_opaque_sp) {} + : m_opaque_sp(rhs.m_opaque_sp) { + SB_RECORD_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &), rhs); +} SBTypeSynthetic::~SBTypeSynthetic() {} -bool SBTypeSynthetic::IsValid() const { return m_opaque_sp.get() != NULL; } +bool SBTypeSynthetic::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSynthetic, IsValid); + return m_opaque_sp.get() != NULL; +} bool SBTypeSynthetic::IsClassCode() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSynthetic, IsClassCode); + if (!IsValid()) return false; const char *code = m_opaque_sp->GetPythonCode(); @@ -51,12 +69,16 @@ } bool SBTypeSynthetic::IsClassName() { + SB_RECORD_METHOD_NO_ARGS(bool, SBTypeSynthetic, IsClassName); + if (!IsValid()) return false; return !IsClassCode(); } const char *SBTypeSynthetic::GetData() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBTypeSynthetic, GetData); + if (!IsValid()) return NULL; if (IsClassCode()) @@ -66,22 +88,30 @@ } void SBTypeSynthetic::SetClassName(const char *data) { + SB_RECORD_METHOD(void, SBTypeSynthetic, SetClassName, (const char *), data); + if (IsValid() && data && *data) m_opaque_sp->SetPythonClassName(data); } void SBTypeSynthetic::SetClassCode(const char *data) { + SB_RECORD_METHOD(void, SBTypeSynthetic, SetClassCode, (const char *), data); + if (IsValid() && data && *data) m_opaque_sp->SetPythonCode(data); } uint32_t SBTypeSynthetic::GetOptions() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeSynthetic, GetOptions); + if (!IsValid()) return lldb::eTypeOptionNone; return m_opaque_sp->GetOptions(); } void SBTypeSynthetic::SetOptions(uint32_t value) { + SB_RECORD_METHOD(void, SBTypeSynthetic, SetOptions, (uint32_t), value); + if (!CopyOnWrite_Impl()) return; m_opaque_sp->SetOptions(value); @@ -89,6 +119,10 @@ bool SBTypeSynthetic::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { + SB_RECORD_METHOD(bool, SBTypeSynthetic, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + description_level); + if (m_opaque_sp) { description.Printf("%s\n", m_opaque_sp->GetDescription().c_str()); return true; @@ -98,6 +132,10 @@ lldb::SBTypeSynthetic &SBTypeSynthetic:: operator=(const lldb::SBTypeSynthetic &rhs) { + SB_RECORD_METHOD(lldb::SBTypeSynthetic &, + SBTypeSynthetic, operator=,(const lldb::SBTypeSynthetic &), + rhs); + if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } @@ -105,12 +143,18 @@ } bool SBTypeSynthetic::operator==(lldb::SBTypeSynthetic &rhs) { + SB_RECORD_METHOD(bool, SBTypeSynthetic, operator==,(lldb::SBTypeSynthetic &), + rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp == rhs.m_opaque_sp; } bool SBTypeSynthetic::IsEqualTo(lldb::SBTypeSynthetic &rhs) { + SB_RECORD_METHOD(bool, SBTypeSynthetic, IsEqualTo, (lldb::SBTypeSynthetic &), + rhs); + if (!IsValid()) return !rhs.IsValid(); @@ -127,6 +171,9 @@ } bool SBTypeSynthetic::operator!=(lldb::SBTypeSynthetic &rhs) { + SB_RECORD_METHOD(bool, SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &), + rhs); + if (!IsValid()) return !rhs.IsValid(); return m_opaque_sp != rhs.m_opaque_sp; Index: source/API/SBUnixSignals.cpp =================================================================== --- source/API/SBUnixSignals.cpp +++ source/API/SBUnixSignals.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" #include "lldb/Target/UnixSignals.h" @@ -18,10 +20,12 @@ using namespace lldb; using namespace lldb_private; -SBUnixSignals::SBUnixSignals() {} +SBUnixSignals::SBUnixSignals() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBUnixSignals); } SBUnixSignals::SBUnixSignals(const SBUnixSignals &rhs) - : m_opaque_wp(rhs.m_opaque_wp) {} + : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &), rhs); +} SBUnixSignals::SBUnixSignals(ProcessSP &process_sp) : m_opaque_wp(process_sp ? process_sp->GetUnixSignals() : nullptr) {} @@ -30,6 +34,9 @@ : m_opaque_wp(platform_sp ? platform_sp->GetUnixSignals() : nullptr) {} const SBUnixSignals &SBUnixSignals::operator=(const SBUnixSignals &rhs) { + SB_RECORD_METHOD(const lldb::SBUnixSignals &, + SBUnixSignals, operator=,(const lldb::SBUnixSignals &), rhs); + if (this != &rhs) m_opaque_wp = rhs.m_opaque_wp; return *this; @@ -43,11 +50,20 @@ m_opaque_wp = signals_sp; } -void SBUnixSignals::Clear() { m_opaque_wp.reset(); } +void SBUnixSignals::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBUnixSignals, Clear); + m_opaque_wp.reset(); +} -bool SBUnixSignals::IsValid() const { return static_cast(GetSP()); } +bool SBUnixSignals::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBUnixSignals, IsValid); + return static_cast(GetSP()); +} const char *SBUnixSignals::GetSignalAsCString(int32_t signo) const { + SB_RECORD_METHOD_CONST(const char *, SBUnixSignals, GetSignalAsCString, + (int32_t), signo); + if (auto signals_sp = GetSP()) return signals_sp->GetSignalAsCString(signo); @@ -55,6 +71,9 @@ } int32_t SBUnixSignals::GetSignalNumberFromName(const char *name) const { + SB_RECORD_METHOD_CONST(int32_t, SBUnixSignals, GetSignalNumberFromName, + (const char *), name); + if (auto signals_sp = GetSP()) return signals_sp->GetSignalNumberFromName(name); @@ -62,6 +81,9 @@ } bool SBUnixSignals::GetShouldSuppress(int32_t signo) const { + SB_RECORD_METHOD_CONST(bool, SBUnixSignals, GetShouldSuppress, (int32_t), + signo); + if (auto signals_sp = GetSP()) return signals_sp->GetShouldSuppress(signo); @@ -69,6 +91,9 @@ } bool SBUnixSignals::SetShouldSuppress(int32_t signo, bool value) { + SB_RECORD_METHOD(bool, SBUnixSignals, SetShouldSuppress, (int32_t, bool), + signo, value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); auto signals_sp = GetSP(); @@ -84,6 +109,8 @@ } bool SBUnixSignals::GetShouldStop(int32_t signo) const { + SB_RECORD_METHOD_CONST(bool, SBUnixSignals, GetShouldStop, (int32_t), signo); + if (auto signals_sp = GetSP()) return signals_sp->GetShouldStop(signo); @@ -91,6 +118,9 @@ } bool SBUnixSignals::SetShouldStop(int32_t signo, bool value) { + SB_RECORD_METHOD(bool, SBUnixSignals, SetShouldStop, (int32_t, bool), signo, + value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); auto signals_sp = GetSP(); @@ -106,6 +136,9 @@ } bool SBUnixSignals::GetShouldNotify(int32_t signo) const { + SB_RECORD_METHOD_CONST(bool, SBUnixSignals, GetShouldNotify, (int32_t), + signo); + if (auto signals_sp = GetSP()) return signals_sp->GetShouldNotify(signo); @@ -113,6 +146,9 @@ } bool SBUnixSignals::SetShouldNotify(int32_t signo, bool value) { + SB_RECORD_METHOD(bool, SBUnixSignals, SetShouldNotify, (int32_t, bool), signo, + value); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); auto signals_sp = GetSP(); @@ -128,6 +164,8 @@ } int32_t SBUnixSignals::GetNumSignals() const { + SB_RECORD_METHOD_CONST_NO_ARGS(int32_t, SBUnixSignals, GetNumSignals); + if (auto signals_sp = GetSP()) return signals_sp->GetNumSignals(); @@ -135,6 +173,9 @@ } int32_t SBUnixSignals::GetSignalAtIndex(int32_t index) const { + SB_RECORD_METHOD_CONST(int32_t, SBUnixSignals, GetSignalAtIndex, (int32_t), + index); + if (auto signals_sp = GetSP()) return signals_sp->GetSignalAtIndex(index); Index: source/API/SBValue.cpp =================================================================== --- source/API/SBValue.cpp +++ source/API/SBValue.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBValue.h" #include "lldb/API/SBDeclaration.h" @@ -217,13 +219,22 @@ Status m_lock_error; }; -SBValue::SBValue() : m_opaque_sp() {} +SBValue::SBValue() : m_opaque_sp() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBValue); } -SBValue::SBValue(const lldb::ValueObjectSP &value_sp) { SetSP(value_sp); } +SBValue::SBValue(const lldb::ValueObjectSP &value_sp) { + SB_RECORD_CONSTRUCTOR(SBValue, (const lldb::ValueObjectSP &), value_sp); + SetSP(value_sp); +} -SBValue::SBValue(const SBValue &rhs) { SetSP(rhs.m_opaque_sp); } +SBValue::SBValue(const SBValue &rhs) { + SB_RECORD_CONSTRUCTOR(SBValue, (const lldb::SBValue &), rhs); + SetSP(rhs.m_opaque_sp); +} SBValue &SBValue::operator=(const SBValue &rhs) { + SB_RECORD_METHOD(lldb::SBValue &, SBValue, operator=,(const lldb::SBValue &), + rhs); + if (this != &rhs) { SetSP(rhs.m_opaque_sp); } @@ -233,6 +244,8 @@ SBValue::~SBValue() {} bool SBValue::IsValid() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsValid); + // If this function ever changes to anything that does more than just check // if the opaque shared pointer is non NULL, then we need to update all "if // (m_opaque_sp)" code in this file. @@ -240,9 +253,14 @@ m_opaque_sp->GetRootSP().get() != NULL; } -void SBValue::Clear() { m_opaque_sp.reset(); } +void SBValue::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBValue, Clear); + m_opaque_sp.reset(); +} SBError SBValue::GetError() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBValue, GetError); + SBError sb_error; ValueLocker locker; @@ -257,6 +275,8 @@ } user_id_t SBValue::GetID() { + SB_RECORD_METHOD_NO_ARGS(lldb::user_id_t, SBValue, GetID); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -265,6 +285,8 @@ } const char *SBValue::GetName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetName); + const char *name = NULL; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -285,6 +307,8 @@ } const char *SBValue::GetTypeName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetTypeName); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *name = NULL; ValueLocker locker; @@ -306,6 +330,8 @@ } const char *SBValue::GetDisplayTypeName() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetDisplayTypeName); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *name = NULL; ValueLocker locker; @@ -327,6 +353,8 @@ } size_t SBValue::GetByteSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBValue, GetByteSize); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); size_t result = 0; @@ -345,6 +373,8 @@ } bool SBValue::IsInScope() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsInScope); + bool result = false; ValueLocker locker; @@ -362,6 +392,8 @@ } const char *SBValue::GetValue() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetValue); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *cstr = NULL; @@ -383,6 +415,8 @@ } ValueType SBValue::GetValueType() { + SB_RECORD_METHOD_NO_ARGS(lldb::ValueType, SBValue, GetValueType); + ValueType result = eValueTypeInvalid; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -435,6 +469,8 @@ } const char *SBValue::GetObjectDescription() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetObjectDescription); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *cstr = NULL; ValueLocker locker; @@ -454,6 +490,8 @@ } const char *SBValue::GetTypeValidatorResult() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetTypeValidatorResult); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *cstr = NULL; ValueLocker locker; @@ -479,6 +517,8 @@ } SBType SBValue::GetType() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBValue, GetType); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBType sb_type; ValueLocker locker; @@ -501,6 +541,8 @@ } bool SBValue::GetValueDidChange() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, GetValueDidChange); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool result = false; ValueLocker locker; @@ -517,6 +559,8 @@ } const char *SBValue::GetSummary() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetSummary); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *cstr = NULL; ValueLocker locker; @@ -537,6 +581,10 @@ const char *SBValue::GetSummary(lldb::SBStream &stream, lldb::SBTypeSummaryOptions &options) { + SB_RECORD_METHOD(const char *, SBValue, GetSummary, + (lldb::SBStream &, lldb::SBTypeSummaryOptions &), stream, + options); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -558,6 +606,8 @@ } const char *SBValue::GetLocation() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetLocation); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); const char *cstr = NULL; ValueLocker locker; @@ -578,11 +628,17 @@ // Deprecated - use the one that takes an lldb::SBError bool SBValue::SetValueFromCString(const char *value_str) { + SB_RECORD_METHOD(bool, SBValue, SetValueFromCString, (const char *), + value_str); + lldb::SBError dummy; return SetValueFromCString(value_str, dummy); } bool SBValue::SetValueFromCString(const char *value_str, lldb::SBError &error) { + SB_RECORD_METHOD(bool, SBValue, SetValueFromCString, + (const char *, lldb::SBError &), value_str, error); + bool success = false; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -601,6 +657,8 @@ } lldb::SBTypeFormat SBValue::GetTypeFormat() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeFormat, SBValue, GetTypeFormat); + lldb::SBTypeFormat format; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -615,6 +673,8 @@ } lldb::SBTypeSummary SBValue::GetTypeSummary() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeSummary, SBValue, GetTypeSummary); + lldb::SBTypeSummary summary; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -629,6 +689,8 @@ } lldb::SBTypeFilter SBValue::GetTypeFilter() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeFilter, SBValue, GetTypeFilter); + lldb::SBTypeFilter filter; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -648,6 +710,8 @@ #ifndef LLDB_DISABLE_PYTHON lldb::SBTypeSynthetic SBValue::GetTypeSynthetic() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTypeSynthetic, SBValue, GetTypeSynthetic); + lldb::SBTypeSynthetic synthetic; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -668,6 +732,9 @@ lldb::SBValue SBValue::CreateChildAtOffset(const char *name, uint32_t offset, SBType type) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, CreateChildAtOffset, + (const char *, uint32_t, lldb::SBType), name, offset, type); + lldb::SBValue sb_value; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -694,6 +761,8 @@ } lldb::SBValue SBValue::Cast(SBType type) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, Cast, (lldb::SBType), type); + lldb::SBValue sb_value; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -706,6 +775,9 @@ lldb::SBValue SBValue::CreateValueFromExpression(const char *name, const char *expression) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, CreateValueFromExpression, + (const char *, const char *), name, expression); + SBExpressionOptions options; options.ref().SetKeepInMemory(true); return CreateValueFromExpression(name, expression, options); @@ -714,6 +786,10 @@ lldb::SBValue SBValue::CreateValueFromExpression(const char *name, const char *expression, SBExpressionOptions &options) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, CreateValueFromExpression, + (const char *, const char *, lldb::SBExpressionOptions &), + name, expression, options); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::SBValue sb_value; ValueLocker locker; @@ -744,6 +820,10 @@ lldb::SBValue SBValue::CreateValueFromAddress(const char *name, lldb::addr_t address, SBType sb_type) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, CreateValueFromAddress, + (const char *, lldb::addr_t, lldb::SBType), name, address, + sb_type); + lldb::SBValue sb_value; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -771,6 +851,10 @@ lldb::SBValue SBValue::CreateValueFromData(const char *name, SBData data, SBType sb_type) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, CreateValueFromData, + (const char *, lldb::SBData, lldb::SBType), name, data, + sb_type); + lldb::SBValue sb_value; lldb::ValueObjectSP new_value_sp; ValueLocker locker; @@ -797,6 +881,8 @@ } SBValue SBValue::GetChildAtIndex(uint32_t idx) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetChildAtIndex, (uint32_t), idx); + const bool can_create_synthetic = false; lldb::DynamicValueType use_dynamic = eNoDynamicValues; TargetSP target_sp; @@ -812,6 +898,10 @@ SBValue SBValue::GetChildAtIndex(uint32_t idx, lldb::DynamicValueType use_dynamic, bool can_create_synthetic) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetChildAtIndex, + (uint32_t, lldb::DynamicValueType, bool), idx, use_dynamic, + can_create_synthetic); + lldb::ValueObjectSP child_sp; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -836,6 +926,9 @@ } uint32_t SBValue::GetIndexOfChildWithName(const char *name) { + SB_RECORD_METHOD(uint32_t, SBValue, GetIndexOfChildWithName, (const char *), + name); + uint32_t idx = UINT32_MAX; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -856,6 +949,9 @@ } SBValue SBValue::GetChildMemberWithName(const char *name) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName, + (const char *), name); + lldb::DynamicValueType use_dynamic_value = eNoDynamicValues; TargetSP target_sp; if (m_opaque_sp) @@ -869,6 +965,10 @@ SBValue SBValue::GetChildMemberWithName(const char *name, lldb::DynamicValueType use_dynamic_value) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetChildMemberWithName, + (const char *, lldb::DynamicValueType), name, + use_dynamic_value); + lldb::ValueObjectSP child_sp; const ConstString str_name(name); @@ -893,6 +993,9 @@ } lldb::SBValue SBValue::GetDynamicValue(lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetDynamicValue, + (lldb::DynamicValueType), use_dynamic); + SBValue value_sb; if (IsValid()) { ValueImplSP proxy_sp(new ValueImpl(m_opaque_sp->GetRootSP(), use_dynamic, @@ -903,6 +1006,8 @@ } lldb::SBValue SBValue::GetStaticValue() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBValue, GetStaticValue); + SBValue value_sb; if (IsValid()) { ValueImplSP proxy_sp(new ValueImpl(m_opaque_sp->GetRootSP(), @@ -914,6 +1019,8 @@ } lldb::SBValue SBValue::GetNonSyntheticValue() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBValue, GetNonSyntheticValue); + SBValue value_sb; if (IsValid()) { ValueImplSP proxy_sp(new ValueImpl(m_opaque_sp->GetRootSP(), @@ -924,28 +1031,41 @@ } lldb::DynamicValueType SBValue::GetPreferDynamicValue() { + SB_RECORD_METHOD_NO_ARGS(lldb::DynamicValueType, SBValue, + GetPreferDynamicValue); + if (!IsValid()) return eNoDynamicValues; return m_opaque_sp->GetUseDynamic(); } void SBValue::SetPreferDynamicValue(lldb::DynamicValueType use_dynamic) { + SB_RECORD_METHOD(void, SBValue, SetPreferDynamicValue, + (lldb::DynamicValueType), use_dynamic); + if (IsValid()) return m_opaque_sp->SetUseDynamic(use_dynamic); } bool SBValue::GetPreferSyntheticValue() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, GetPreferSyntheticValue); + if (!IsValid()) return false; return m_opaque_sp->GetUseSynthetic(); } void SBValue::SetPreferSyntheticValue(bool use_synthetic) { + SB_RECORD_METHOD(void, SBValue, SetPreferSyntheticValue, (bool), + use_synthetic); + if (IsValid()) return m_opaque_sp->SetUseSynthetic(use_synthetic); } bool SBValue::IsDynamic() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsDynamic); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -954,6 +1074,8 @@ } bool SBValue::IsSynthetic() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsSynthetic); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -962,6 +1084,8 @@ } bool SBValue::IsSyntheticChildrenGenerated() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsSyntheticChildrenGenerated); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -970,6 +1094,8 @@ } void SBValue::SetSyntheticChildrenGenerated(bool is) { + SB_RECORD_METHOD(void, SBValue, SetSyntheticChildrenGenerated, (bool), is); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -977,6 +1103,9 @@ } lldb::SBValue SBValue::GetValueForExpressionPath(const char *expr_path) { + SB_RECORD_METHOD(lldb::SBValue, SBValue, GetValueForExpressionPath, + (const char *), expr_path); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::ValueObjectSP child_sp; ValueLocker locker; @@ -999,6 +1128,9 @@ } int64_t SBValue::GetValueAsSigned(SBError &error, int64_t fail_value) { + SB_RECORD_METHOD(int64_t, SBValue, GetValueAsSigned, + (lldb::SBError &, int64_t), error, fail_value); + error.Clear(); ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1017,6 +1149,9 @@ } uint64_t SBValue::GetValueAsUnsigned(SBError &error, uint64_t fail_value) { + SB_RECORD_METHOD(uint64_t, SBValue, GetValueAsUnsigned, + (lldb::SBError &, uint64_t), error, fail_value); + error.Clear(); ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1035,6 +1170,8 @@ } int64_t SBValue::GetValueAsSigned(int64_t fail_value) { + SB_RECORD_METHOD(int64_t, SBValue, GetValueAsSigned, (int64_t), fail_value); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) { @@ -1044,6 +1181,9 @@ } uint64_t SBValue::GetValueAsUnsigned(uint64_t fail_value) { + SB_RECORD_METHOD(uint64_t, SBValue, GetValueAsUnsigned, (uint64_t), + fail_value); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) { @@ -1053,6 +1193,8 @@ } bool SBValue::MightHaveChildren() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, MightHaveChildren); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool has_children = false; ValueLocker locker; @@ -1067,6 +1209,8 @@ } bool SBValue::IsRuntimeSupportValue() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsRuntimeSupportValue); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); bool is_support = false; ValueLocker locker; @@ -1080,9 +1224,14 @@ return is_support; } -uint32_t SBValue::GetNumChildren() { return GetNumChildren(UINT32_MAX); } +uint32_t SBValue::GetNumChildren() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBValue, GetNumChildren); + return GetNumChildren(UINT32_MAX); +} uint32_t SBValue::GetNumChildren(uint32_t max) { + SB_RECORD_METHOD(uint32_t, SBValue, GetNumChildren, (uint32_t), max); + uint32_t num_children = 0; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); @@ -1099,6 +1248,8 @@ } SBValue SBValue::Dereference() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBValue, Dereference); + SBValue sb_value; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1116,9 +1267,14 @@ } // Deprecated - please use GetType().IsPointerType() instead. -bool SBValue::TypeIsPointerType() { return GetType().IsPointerType(); } +bool SBValue::TypeIsPointerType() { + SB_RECORD_METHOD_NO_ARGS(bool, SBValue, TypeIsPointerType); + return GetType().IsPointerType(); +} void *SBValue::GetOpaqueType() { + SB_RECORD_METHOD_NO_ARGS(void *, SBValue, GetOpaqueType); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -1127,6 +1283,8 @@ } lldb::SBTarget SBValue::GetTarget() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBTarget, SBValue, GetTarget); + SBTarget sb_target; TargetSP target_sp; if (m_opaque_sp) { @@ -1147,6 +1305,8 @@ } lldb::SBProcess SBValue::GetProcess() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBValue, GetProcess); + SBProcess sb_process; ProcessSP process_sp; if (m_opaque_sp) { @@ -1167,6 +1327,8 @@ } lldb::SBThread SBValue::GetThread() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBThread, SBValue, GetThread); + SBThread sb_thread; ThreadSP thread_sp; if (m_opaque_sp) { @@ -1187,6 +1349,8 @@ } lldb::SBFrame SBValue::GetFrame() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBFrame, SBValue, GetFrame); + SBFrame sb_frame; StackFrameSP frame_sp; if (m_opaque_sp) { @@ -1215,6 +1379,8 @@ } lldb::ValueObjectSP SBValue::GetSP() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::ValueObjectSP, SBValue, GetSP); + ValueLocker locker; return GetSP(locker); } @@ -1274,6 +1440,9 @@ } bool SBValue::GetExpressionPath(SBStream &description) { + SB_RECORD_METHOD(bool, SBValue, GetExpressionPath, (lldb::SBStream &), + description); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) { @@ -1285,6 +1454,9 @@ bool SBValue::GetExpressionPath(SBStream &description, bool qualify_cxx_base_classes) { + SB_RECORD_METHOD(bool, SBValue, GetExpressionPath, (lldb::SBStream &, bool), + description, qualify_cxx_base_classes); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) { @@ -1295,6 +1467,9 @@ } bool SBValue::GetDescription(SBStream &description) { + SB_RECORD_METHOD(bool, SBValue, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); ValueLocker locker; @@ -1308,6 +1483,8 @@ } lldb::Format SBValue::GetFormat() { + SB_RECORD_METHOD_NO_ARGS(lldb::Format, SBValue, GetFormat); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -1316,6 +1493,8 @@ } void SBValue::SetFormat(lldb::Format format) { + SB_RECORD_METHOD(void, SBValue, SetFormat, (lldb::Format), format); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); if (value_sp) @@ -1323,6 +1502,8 @@ } lldb::SBValue SBValue::AddressOf() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBValue, AddressOf); + SBValue sb_value; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1341,6 +1522,8 @@ } lldb::addr_t SBValue::GetLoadAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBValue, GetLoadAddress); + lldb::addr_t value = LLDB_INVALID_ADDRESS; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1373,6 +1556,8 @@ } lldb::SBAddress SBValue::GetAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBValue, GetAddress); + Address addr; ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1406,6 +1591,9 @@ } lldb::SBData SBValue::GetPointeeData(uint32_t item_idx, uint32_t item_count) { + SB_RECORD_METHOD(lldb::SBData, SBValue, GetPointeeData, (uint32_t, uint32_t), + item_idx, item_count); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::SBData sb_data; ValueLocker locker; @@ -1428,6 +1616,8 @@ } lldb::SBData SBValue::GetData() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBValue, GetData); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); lldb::SBData sb_data; ValueLocker locker; @@ -1448,6 +1638,9 @@ } bool SBValue::SetData(lldb::SBData &data, SBError &error) { + SB_RECORD_METHOD(bool, SBValue, SetData, (lldb::SBData &, lldb::SBError &), + data, error); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); @@ -1489,6 +1682,8 @@ } lldb::SBDeclaration SBValue::GetDeclaration() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBDeclaration, SBValue, GetDeclaration); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); SBDeclaration decl_sb; @@ -1502,6 +1697,10 @@ lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read, bool write, SBError &error) { + SB_RECORD_METHOD(lldb::SBWatchpoint, SBValue, Watch, + (bool, bool, bool, lldb::SBError &), resolve_location, read, + write, error); + SBWatchpoint sb_watchpoint; // If the SBValue is not valid, there's no point in even trying to watch it. @@ -1573,12 +1772,19 @@ // Backward compatibility fix in the interim. lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read, bool write) { + SB_RECORD_METHOD(lldb::SBWatchpoint, SBValue, Watch, (bool, bool, bool), + resolve_location, read, write); + SBError error; return Watch(resolve_location, read, write, error); } lldb::SBWatchpoint SBValue::WatchPointee(bool resolve_location, bool read, bool write, SBError &error) { + SB_RECORD_METHOD(lldb::SBWatchpoint, SBValue, WatchPointee, + (bool, bool, bool, lldb::SBError &), resolve_location, read, + write, error); + SBWatchpoint sb_watchpoint; if (IsInScope() && GetType().IsPointerType()) sb_watchpoint = Dereference().Watch(resolve_location, read, write, error); @@ -1586,6 +1792,8 @@ } lldb::SBValue SBValue::Persist() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBValue, Persist); + ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); SBValue persisted_sb; Index: source/API/SBValueList.cpp =================================================================== --- source/API/SBValueList.cpp +++ source/API/SBValueList.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBValueList.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBValue.h" @@ -67,9 +69,13 @@ std::vector m_values; }; -SBValueList::SBValueList() : m_opaque_ap() {} +SBValueList::SBValueList() : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBValueList); +} SBValueList::SBValueList(const SBValueList &rhs) : m_opaque_ap() { + SB_RECORD_CONSTRUCTOR(SBValueList, (const lldb::SBValueList &), rhs); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (rhs.IsValid()) @@ -98,11 +104,20 @@ SBValueList::~SBValueList() {} -bool SBValueList::IsValid() const { return (m_opaque_ap != NULL); } +bool SBValueList::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBValueList, IsValid); + return (m_opaque_ap != NULL); +} -void SBValueList::Clear() { m_opaque_ap.reset(); } +void SBValueList::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBValueList, Clear); + m_opaque_ap.reset(); +} const SBValueList &SBValueList::operator=(const SBValueList &rhs) { + SB_RECORD_METHOD(const lldb::SBValueList &, + SBValueList, operator=,(const lldb::SBValueList &), rhs); + if (this != &rhs) { if (rhs.IsValid()) m_opaque_ap.reset(new ValueListImpl(*rhs)); @@ -123,6 +138,8 @@ const ValueListImpl &SBValueList::operator*() const { return *m_opaque_ap; } void SBValueList::Append(const SBValue &val_obj) { + SB_RECORD_METHOD(void, SBValueList, Append, (const lldb::SBValue &), val_obj); + CreateIfNeeded(); m_opaque_ap->Append(val_obj); } @@ -135,6 +152,9 @@ } void SBValueList::Append(const lldb::SBValueList &value_list) { + SB_RECORD_METHOD(void, SBValueList, Append, (const lldb::SBValueList &), + value_list); + if (value_list.IsValid()) { CreateIfNeeded(); m_opaque_ap->Append(*value_list); @@ -142,6 +162,9 @@ } SBValue SBValueList::GetValueAtIndex(uint32_t idx) const { + SB_RECORD_METHOD_CONST(lldb::SBValue, SBValueList, GetValueAtIndex, + (uint32_t), idx); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); // if (log) @@ -165,6 +188,8 @@ } uint32_t SBValueList::GetSize() const { + SB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBValueList, GetSize); + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); // if (log) @@ -187,6 +212,9 @@ } SBValue SBValueList::FindValueObjectByUID(lldb::user_id_t uid) { + SB_RECORD_METHOD(lldb::SBValue, SBValueList, FindValueObjectByUID, + (lldb::user_id_t), uid); + SBValue sb_value; if (m_opaque_ap) sb_value = m_opaque_ap->FindValueByUID(uid); @@ -194,6 +222,9 @@ } SBValue SBValueList::GetFirstValueByName(const char *name) const { + SB_RECORD_METHOD_CONST(lldb::SBValue, SBValueList, GetFirstValueByName, + (const char *), name); + SBValue sb_value; if (m_opaque_ap) sb_value = m_opaque_ap->GetFirstValueByName(name); Index: source/API/SBVariablesOptions.cpp =================================================================== --- source/API/SBVariablesOptions.cpp +++ source/API/SBVariablesOptions.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBVariablesOptions.h" #include "lldb/API/SBTarget.h" #include "lldb/Target/Target.h" @@ -80,76 +82,127 @@ }; SBVariablesOptions::SBVariablesOptions() - : m_opaque_ap(new VariablesOptionsImpl()) {} + : m_opaque_ap(new VariablesOptionsImpl()) { + SB_RECORD_CONSTRUCTOR_NO_ARGS(SBVariablesOptions); +} SBVariablesOptions::SBVariablesOptions(const SBVariablesOptions &options) - : m_opaque_ap(new VariablesOptionsImpl(options.ref())) {} + : m_opaque_ap(new VariablesOptionsImpl(options.ref())) { + SB_RECORD_CONSTRUCTOR(SBVariablesOptions, (const lldb::SBVariablesOptions &), + options); +} SBVariablesOptions &SBVariablesOptions:: operator=(const SBVariablesOptions &options) { + SB_RECORD_METHOD( + lldb::SBVariablesOptions &, + SBVariablesOptions, operator=,(const lldb::SBVariablesOptions &), + options); + m_opaque_ap.reset(new VariablesOptionsImpl(options.ref())); return *this; } SBVariablesOptions::~SBVariablesOptions() = default; -bool SBVariablesOptions::IsValid() const { return m_opaque_ap != nullptr; } +bool SBVariablesOptions::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, IsValid); + return m_opaque_ap != nullptr; +} bool SBVariablesOptions::GetIncludeArguments() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, GetIncludeArguments); + return m_opaque_ap->GetIncludeArguments(); } void SBVariablesOptions::SetIncludeArguments(bool arguments) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetIncludeArguments, (bool), + arguments); + m_opaque_ap->SetIncludeArguments(arguments); } bool SBVariablesOptions::GetIncludeRecognizedArguments( const lldb::SBTarget &target) const { + SB_RECORD_METHOD_CONST(bool, SBVariablesOptions, + GetIncludeRecognizedArguments, + (const lldb::SBTarget &), target); + return m_opaque_ap->GetIncludeRecognizedArguments(target.GetSP()); } void SBVariablesOptions::SetIncludeRecognizedArguments(bool arguments) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetIncludeRecognizedArguments, + (bool), arguments); + m_opaque_ap->SetIncludeRecognizedArguments(arguments); } bool SBVariablesOptions::GetIncludeLocals() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, GetIncludeLocals); + return m_opaque_ap->GetIncludeLocals(); } void SBVariablesOptions::SetIncludeLocals(bool locals) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetIncludeLocals, (bool), locals); + m_opaque_ap->SetIncludeLocals(locals); } bool SBVariablesOptions::GetIncludeStatics() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, GetIncludeStatics); + return m_opaque_ap->GetIncludeStatics(); } void SBVariablesOptions::SetIncludeStatics(bool statics) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetIncludeStatics, (bool), + statics); + m_opaque_ap->SetIncludeStatics(statics); } bool SBVariablesOptions::GetInScopeOnly() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, GetInScopeOnly); + return m_opaque_ap->GetInScopeOnly(); } void SBVariablesOptions::SetInScopeOnly(bool in_scope_only) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetInScopeOnly, (bool), + in_scope_only); + m_opaque_ap->SetInScopeOnly(in_scope_only); } bool SBVariablesOptions::GetIncludeRuntimeSupportValues() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, + GetIncludeRuntimeSupportValues); + return m_opaque_ap->GetIncludeRuntimeSupportValues(); } void SBVariablesOptions::SetIncludeRuntimeSupportValues( bool runtime_support_values) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetIncludeRuntimeSupportValues, + (bool), runtime_support_values); + m_opaque_ap->SetIncludeRuntimeSupportValues(runtime_support_values); } lldb::DynamicValueType SBVariablesOptions::GetUseDynamic() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::DynamicValueType, SBVariablesOptions, + GetUseDynamic); + return m_opaque_ap->GetUseDynamic(); } void SBVariablesOptions::SetUseDynamic(lldb::DynamicValueType dynamic) { + SB_RECORD_METHOD(void, SBVariablesOptions, SetUseDynamic, + (lldb::DynamicValueType), dynamic); + m_opaque_ap->SetUseDynamic(dynamic); } Index: source/API/SBWatchpoint.cpp =================================================================== --- source/API/SBWatchpoint.cpp +++ source/API/SBWatchpoint.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "SBReproducerPrivate.h" + #include "lldb/API/SBWatchpoint.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBDebugger.h" @@ -26,10 +28,12 @@ using namespace lldb; using namespace lldb_private; -SBWatchpoint::SBWatchpoint() {} +SBWatchpoint::SBWatchpoint() { SB_RECORD_CONSTRUCTOR_NO_ARGS(SBWatchpoint); } SBWatchpoint::SBWatchpoint(const lldb::WatchpointSP &wp_sp) : m_opaque_wp(wp_sp) { + SB_RECORD_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &), wp_sp); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) { @@ -40,9 +44,14 @@ } SBWatchpoint::SBWatchpoint(const SBWatchpoint &rhs) - : m_opaque_wp(rhs.m_opaque_wp) {} + : m_opaque_wp(rhs.m_opaque_wp) { + SB_RECORD_CONSTRUCTOR(SBWatchpoint, (const lldb::SBWatchpoint &), rhs); +} const SBWatchpoint &SBWatchpoint::operator=(const SBWatchpoint &rhs) { + SB_RECORD_METHOD(const lldb::SBWatchpoint &, + SBWatchpoint, operator=,(const lldb::SBWatchpoint &), rhs); + m_opaque_wp = rhs.m_opaque_wp; return *this; } @@ -50,6 +59,8 @@ SBWatchpoint::~SBWatchpoint() {} watch_id_t SBWatchpoint::GetID() { + SB_RECORD_METHOD_NO_ARGS(lldb::watch_id_t, SBWatchpoint, GetID); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); watch_id_t watch_id = LLDB_INVALID_WATCH_ID; @@ -69,9 +80,14 @@ return watch_id; } -bool SBWatchpoint::IsValid() const { return bool(m_opaque_wp.lock()); } +bool SBWatchpoint::IsValid() const { + SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBWatchpoint, IsValid); + return bool(m_opaque_wp.lock()); +} SBError SBWatchpoint::GetError() { + SB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBWatchpoint, GetError); + SBError sb_error; lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { @@ -81,6 +97,8 @@ } int32_t SBWatchpoint::GetHardwareIndex() { + SB_RECORD_METHOD_NO_ARGS(int32_t, SBWatchpoint, GetHardwareIndex); + int32_t hw_index = -1; lldb::WatchpointSP watchpoint_sp(GetSP()); @@ -94,6 +112,8 @@ } addr_t SBWatchpoint::GetWatchAddress() { + SB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBWatchpoint, GetWatchAddress); + addr_t ret_addr = LLDB_INVALID_ADDRESS; lldb::WatchpointSP watchpoint_sp(GetSP()); @@ -107,6 +127,8 @@ } size_t SBWatchpoint::GetWatchSize() { + SB_RECORD_METHOD_NO_ARGS(size_t, SBWatchpoint, GetWatchSize); + size_t watch_size = 0; lldb::WatchpointSP watchpoint_sp(GetSP()); @@ -120,6 +142,8 @@ } void SBWatchpoint::SetEnabled(bool enabled) { + SB_RECORD_METHOD(void, SBWatchpoint, SetEnabled, (bool), enabled); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { Target &target = watchpoint_sp->GetTarget(); @@ -138,6 +162,8 @@ } bool SBWatchpoint::IsEnabled() { + SB_RECORD_METHOD_NO_ARGS(bool, SBWatchpoint, IsEnabled); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { std::lock_guard guard( @@ -148,6 +174,8 @@ } uint32_t SBWatchpoint::GetHitCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBWatchpoint, GetHitCount); + uint32_t count = 0; lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { @@ -165,6 +193,8 @@ } uint32_t SBWatchpoint::GetIgnoreCount() { + SB_RECORD_METHOD_NO_ARGS(uint32_t, SBWatchpoint, GetIgnoreCount); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { std::lock_guard guard( @@ -175,6 +205,8 @@ } void SBWatchpoint::SetIgnoreCount(uint32_t n) { + SB_RECORD_METHOD(void, SBWatchpoint, SetIgnoreCount, (uint32_t), n); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { std::lock_guard guard( @@ -184,6 +216,8 @@ } const char *SBWatchpoint::GetCondition() { + SB_RECORD_METHOD_NO_ARGS(const char *, SBWatchpoint, GetCondition); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { std::lock_guard guard( @@ -194,6 +228,8 @@ } void SBWatchpoint::SetCondition(const char *condition) { + SB_RECORD_METHOD(void, SBWatchpoint, SetCondition, (const char *), condition); + lldb::WatchpointSP watchpoint_sp(GetSP()); if (watchpoint_sp) { std::lock_guard guard( @@ -204,6 +240,10 @@ bool SBWatchpoint::GetDescription(SBStream &description, DescriptionLevel level) { + SB_RECORD_METHOD(bool, SBWatchpoint, GetDescription, + (lldb::SBStream &, lldb::DescriptionLevel), description, + level); + Stream &strm = description.ref(); lldb::WatchpointSP watchpoint_sp(GetSP()); @@ -218,19 +258,35 @@ return true; } -void SBWatchpoint::Clear() { m_opaque_wp.reset(); } +void SBWatchpoint::Clear() { + SB_RECORD_METHOD_NO_ARGS(void, SBWatchpoint, Clear); + m_opaque_wp.reset(); +} -lldb::WatchpointSP SBWatchpoint::GetSP() const { return m_opaque_wp.lock(); } +lldb::WatchpointSP SBWatchpoint::GetSP() const { + SB_RECORD_METHOD_CONST_NO_ARGS(lldb::WatchpointSP, SBWatchpoint, GetSP); + return m_opaque_wp.lock(); +} -void SBWatchpoint::SetSP(const lldb::WatchpointSP &sp) { m_opaque_wp = sp; } +void SBWatchpoint::SetSP(const lldb::WatchpointSP &sp) { + SB_RECORD_METHOD(void, SBWatchpoint, SetSP, (const lldb::WatchpointSP &), sp); + m_opaque_wp = sp; +} bool SBWatchpoint::EventIsWatchpointEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(bool, SBWatchpoint, EventIsWatchpointEvent, + (const lldb::SBEvent &), event); + return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) != NULL; } WatchpointEventType SBWatchpoint::GetWatchpointEventTypeFromEvent(const SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::WatchpointEventType, SBWatchpoint, + GetWatchpointEventTypeFromEvent, + (const lldb::SBEvent &), event); + if (event.IsValid()) return Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent( event.GetSP()); @@ -238,6 +294,10 @@ } SBWatchpoint SBWatchpoint::GetWatchpointFromEvent(const lldb::SBEvent &event) { + SB_RECORD_STATIC_METHOD(lldb::SBWatchpoint, SBWatchpoint, + GetWatchpointFromEvent, (const lldb::SBEvent &), + event); + SBWatchpoint sb_watchpoint; if (event.IsValid()) sb_watchpoint =