diff options
Diffstat (limited to 'lldb/source/API/SBSection.cpp')
-rw-r--r-- | lldb/source/API/SBSection.cpp | 81 |
1 files changed, 67 insertions, 14 deletions
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp index b76714bb175..7ad7df963a7 100644 --- a/lldb/source/API/SBSection.cpp +++ b/lldb/source/API/SBSection.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBSection.h" +#include "SBReproducerPrivate.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBTarget.h" #include "lldb/Core/Module.h" @@ -20,9 +21,13 @@ using namespace lldb; using namespace lldb_private; -SBSection::SBSection() : m_opaque_wp() {} +SBSection::SBSection() : m_opaque_wp() { + LLDB_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) { + LLDB_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 +38,9 @@ SBSection::SBSection(const lldb::SectionSP §ion_sp) } const SBSection &SBSection::operator=(const SBSection &rhs) { + LLDB_RECORD_METHOD(const lldb::SBSection &, + SBSection, operator=,(const lldb::SBSection &), rhs); + m_opaque_wp = rhs.m_opaque_wp; return *this; } @@ -40,11 +48,15 @@ const SBSection &SBSection::operator=(const SBSection &rhs) { SBSection::~SBSection() {} bool SBSection::IsValid() const { + LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, IsValid); + SectionSP section_sp(GetSP()); return section_sp && section_sp->GetModule().get() != NULL; } const char *SBSection::GetName() { + LLDB_RECORD_METHOD_NO_ARGS(const char *, SBSection, GetName); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetName().GetCString(); @@ -52,6 +64,8 @@ const char *SBSection::GetName() { } lldb::SBSection SBSection::GetParent() { + LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSection, SBSection, GetParent); + lldb::SBSection sb_section; SectionSP section_sp(GetSP()); if (section_sp) { @@ -59,10 +73,13 @@ lldb::SBSection SBSection::GetParent() { if (parent_section_sp) sb_section.SetSP(parent_section_sp); } - return sb_section; + return LLDB_RECORD_RESULT(sb_section); } lldb::SBSection SBSection::FindSubSection(const char *sect_name) { + LLDB_RECORD_METHOD(lldb::SBSection, SBSection, FindSubSection, (const char *), + sect_name); + lldb::SBSection sb_section; if (sect_name) { SectionSP section_sp(GetSP()); @@ -72,10 +89,12 @@ lldb::SBSection SBSection::FindSubSection(const char *sect_name) { section_sp->GetChildren().FindSectionByName(const_sect_name)); } } - return sb_section; + return LLDB_RECORD_RESULT(sb_section); } size_t SBSection::GetNumSubSections() { + LLDB_RECORD_METHOD_NO_ARGS(size_t, SBSection, GetNumSubSections); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetChildren().GetSize(); @@ -83,11 +102,14 @@ size_t SBSection::GetNumSubSections() { } lldb::SBSection SBSection::GetSubSectionAtIndex(size_t idx) { + LLDB_RECORD_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex, (size_t), + idx); + lldb::SBSection sb_section; SectionSP section_sp(GetSP()); if (section_sp) sb_section.SetSP(section_sp->GetChildren().GetSectionAtIndex(idx)); - return sb_section; + return LLDB_RECORD_RESULT(sb_section); } lldb::SectionSP SBSection::GetSP() const { return m_opaque_wp.lock(); } @@ -97,6 +119,8 @@ void SBSection::SetSP(const lldb::SectionSP §ion_sp) { } lldb::addr_t SBSection::GetFileAddress() { + LLDB_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 +129,9 @@ lldb::addr_t SBSection::GetFileAddress() { } lldb::addr_t SBSection::GetLoadAddress(lldb::SBTarget &sb_target) { + LLDB_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 +142,8 @@ lldb::addr_t SBSection::GetLoadAddress(lldb::SBTarget &sb_target) { } lldb::addr_t SBSection::GetByteSize() { + LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBSection, GetByteSize); + SectionSP section_sp(GetSP()); if (section_sp) return section_sp->GetByteSize(); @@ -122,6 +151,8 @@ lldb::addr_t SBSection::GetByteSize() { } uint64_t SBSection::GetFileOffset() { + LLDB_RECORD_METHOD_NO_ARGS(uint64_t, SBSection, GetFileOffset); + SectionSP section_sp(GetSP()); if (section_sp) { ModuleSP module_sp(section_sp->GetModule()); @@ -135,15 +166,24 @@ uint64_t SBSection::GetFileOffset() { } uint64_t SBSection::GetFileByteSize() { + LLDB_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() { + LLDB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBSection, GetSectionData); + + return LLDB_RECORD_RESULT(GetSectionData(0, UINT64_MAX)); +} SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) { + LLDB_RECORD_METHOD(lldb::SBData, SBSection, GetSectionData, + (uint64_t, uint64_t), offset, size); + SBData sb_data; SectionSP section_sp(GetSP()); if (section_sp) { @@ -177,26 +217,30 @@ SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) { } } } - return sb_data; + return LLDB_RECORD_RESULT(sb_data); } SectionType SBSection::GetSectionType() { + LLDB_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 { + LLDB_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() { + LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBSection, GetTargetByteSize); + SectionSP section_sp(GetSP()); if (section_sp.get()) return section_sp->GetTargetByteSize(); @@ -204,6 +248,9 @@ uint32_t SBSection::GetTargetByteSize() { } bool SBSection::operator==(const SBSection &rhs) { + LLDB_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 +259,18 @@ bool SBSection::operator==(const SBSection &rhs) { } bool SBSection::operator!=(const SBSection &rhs) { + LLDB_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) { + LLDB_RECORD_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &), + description); + Stream &strm = description.ref(); SectionSP section_sp(GetSP()); |