summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBBlock.cpp')
-rw-r--r--lldb/source/API/SBBlock.cpp78
1 files changed, 66 insertions, 12 deletions
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index 4f131cd2429..ce5a4e4ceb0 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBBlock.h"
+#include "SBReproducerPrivate.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBFrame.h"
@@ -25,29 +26,44 @@
using namespace lldb;
using namespace lldb_private;
-SBBlock::SBBlock() : m_opaque_ptr(NULL) {}
+SBBlock::SBBlock() : m_opaque_ptr(NULL) {
+ LLDB_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) {
+ LLDB_RECORD_CONSTRUCTOR(SBBlock, (const lldb::SBBlock &), rhs);
+}
const SBBlock &SBBlock::operator=(const SBBlock &rhs) {
+ LLDB_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 {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsValid);
+
+ return m_opaque_ptr != NULL;
+}
bool SBBlock::IsInlined() const {
+ LLDB_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 {
+ LLDB_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 @@ const char *SBBlock::GetInlinedName() const {
}
SBFileSpec SBBlock::GetInlinedCallSiteFile() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBBlock,
+ GetInlinedCallSiteFile);
+
SBFileSpec sb_file;
if (m_opaque_ptr) {
const InlineFunctionInfo *inlined_info =
@@ -72,10 +91,12 @@ SBFileSpec SBBlock::GetInlinedCallSiteFile() const {
if (inlined_info)
sb_file.SetFileSpec(inlined_info->GetCallSite().GetFile());
}
- return sb_file;
+ return LLDB_RECORD_RESULT(sb_file);
}
uint32_t SBBlock::GetInlinedCallSiteLine() const {
+ LLDB_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::GetInlinedCallSiteLine() const {
}
uint32_t SBBlock::GetInlinedCallSiteColumn() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBlock, GetInlinedCallSiteColumn);
+
if (m_opaque_ptr) {
const InlineFunctionInfo *inlined_info =
m_opaque_ptr->GetInlinedFunctionInfo();
@@ -105,31 +128,39 @@ void SBBlock::AppendVariables(bool can_create, bool get_parent_variables,
}
SBBlock SBBlock::GetParent() {
+ LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetParent);
+
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetParent();
- return sb_block;
+ return LLDB_RECORD_RESULT(sb_block);
}
lldb::SBBlock SBBlock::GetContainingInlinedBlock() {
+ LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetContainingInlinedBlock);
+
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetContainingInlinedBlock();
- return sb_block;
+ return LLDB_RECORD_RESULT(sb_block);
}
SBBlock SBBlock::GetSibling() {
+ LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetSibling);
+
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetSibling();
- return sb_block;
+ return LLDB_RECORD_RESULT(sb_block);
}
SBBlock SBBlock::GetFirstChild() {
+ LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBBlock, GetFirstChild);
+
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetFirstChild();
- return sb_block;
+ return LLDB_RECORD_RESULT(sb_block);
}
lldb_private::Block *SBBlock::GetPtr() { return m_opaque_ptr; }
@@ -137,6 +168,9 @@ lldb_private::Block *SBBlock::GetPtr() { return m_opaque_ptr; }
void SBBlock::SetPtr(lldb_private::Block *block) { m_opaque_ptr = block; }
bool SBBlock::GetDescription(SBStream &description) {
+ LLDB_RECORD_METHOD(bool, SBBlock, GetDescription, (lldb::SBStream &),
+ description);
+
Stream &strm = description.ref();
if (m_opaque_ptr) {
@@ -159,12 +193,17 @@ bool SBBlock::GetDescription(SBStream &description) {
}
uint32_t SBBlock::GetNumRanges() {
+ LLDB_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) {
+ LLDB_RECORD_METHOD(lldb::SBAddress, SBBlock, GetRangeStartAddress, (uint32_t),
+ idx);
+
lldb::SBAddress sb_addr;
if (m_opaque_ptr) {
AddressRange range;
@@ -172,10 +211,13 @@ lldb::SBAddress SBBlock::GetRangeStartAddress(uint32_t idx) {
sb_addr.ref() = range.GetBaseAddress();
}
}
- return sb_addr;
+ return LLDB_RECORD_RESULT(sb_addr);
}
lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) {
+ LLDB_RECORD_METHOD(lldb::SBAddress, SBBlock, GetRangeEndAddress, (uint32_t),
+ idx);
+
lldb::SBAddress sb_addr;
if (m_opaque_ptr) {
AddressRange range;
@@ -184,10 +226,13 @@ lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) {
sb_addr.ref().Slide(range.GetByteSize());
}
}
- return sb_addr;
+ return LLDB_RECORD_RESULT(sb_addr);
}
uint32_t SBBlock::GetRangeIndexForBlockAddress(lldb::SBAddress block_addr) {
+ LLDB_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,11 @@ uint32_t SBBlock::GetRangeIndexForBlockAddress(lldb::SBAddress block_addr) {
lldb::SBValueList SBBlock::GetVariables(lldb::SBFrame &frame, bool arguments,
bool locals, bool statics,
lldb::DynamicValueType use_dynamic) {
+ LLDB_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) {
@@ -244,11 +294,15 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBFrame &frame, bool arguments,
}
}
}
- return value_list;
+ return LLDB_RECORD_RESULT(value_list);
}
lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments,
bool locals, bool statics) {
+ LLDB_RECORD_METHOD(lldb::SBValueList, SBBlock, GetVariables,
+ (lldb::SBTarget &, bool, bool, bool), target, arguments,
+ locals, statics);
+
Block *block = GetPtr();
SBValueList value_list;
@@ -292,5 +346,5 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments,
}
}
}
- return value_list;
+ return LLDB_RECORD_RESULT(value_list);
}
OpenPOWER on IntegriCloud