aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBFrame.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-01-27 22:06:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-01-27 22:06:42 +0000
commit6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch)
treea1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /lldb/source/API/SBFrame.cpp
parent77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff)
Diffstat (limited to 'lldb/source/API/SBFrame.cpp')
-rw-r--r--lldb/source/API/SBFrame.cpp277
1 files changed, 85 insertions, 192 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index c6bc3288c4b2..ffbbed00f8e2 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -14,7 +14,6 @@
#include "lldb/lldb-types.h"
-#include "SBReproducerPrivate.h"
#include "Utils.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/StreamFile.h"
@@ -38,6 +37,7 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/Instrumentation.h"
#include "lldb/Utility/Stream.h"
#include "lldb/API/SBAddress.h"
@@ -55,17 +55,16 @@ using namespace lldb;
using namespace lldb_private;
SBFrame::SBFrame() : m_opaque_sp(new ExecutionContextRef()) {
- LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFrame);
+ LLDB_INSTRUMENT_VA(this);
}
SBFrame::SBFrame(const StackFrameSP &lldb_object_sp)
: m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) {
- LLDB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &),
- lldb_object_sp);
+ LLDB_INSTRUMENT_VA(this, lldb_object_sp);
}
-SBFrame::SBFrame(const SBFrame &rhs) : m_opaque_sp() {
- LLDB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::SBFrame &), rhs);
+SBFrame::SBFrame(const SBFrame &rhs) {
+ LLDB_INSTRUMENT_VA(this, rhs);
m_opaque_sp = clone(rhs.m_opaque_sp);
}
@@ -73,12 +72,11 @@ SBFrame::SBFrame(const SBFrame &rhs) : m_opaque_sp() {
SBFrame::~SBFrame() = default;
const SBFrame &SBFrame::operator=(const SBFrame &rhs) {
- LLDB_RECORD_METHOD(const lldb::SBFrame &,
- SBFrame, operator=,(const lldb::SBFrame &), rhs);
+ LLDB_INSTRUMENT_VA(this, rhs);
if (this != &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
StackFrameSP SBFrame::GetFrameSP() const {
@@ -90,11 +88,11 @@ void SBFrame::SetFrameSP(const StackFrameSP &lldb_object_sp) {
}
bool SBFrame::IsValid() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsValid);
+ LLDB_INSTRUMENT_VA(this);
return this->operator bool();
}
SBFrame::operator bool() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, operator bool);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -112,8 +110,7 @@ SBFrame::operator bool() const {
}
SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const {
- LLDB_RECORD_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
- (uint32_t), resolve_scope);
+ LLDB_INSTRUMENT_VA(this, resolve_scope);
SBSymbolContext sb_sym_ctx;
std::unique_lock<std::recursive_mutex> lock;
@@ -129,11 +126,11 @@ SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const {
}
}
- return LLDB_RECORD_RESULT(sb_sym_ctx);
+ return sb_sym_ctx;
}
SBModule SBFrame::GetModule() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBModule, SBFrame, GetModule);
+ LLDB_INSTRUMENT_VA(this);
SBModule sb_module;
ModuleSP module_sp;
@@ -154,12 +151,11 @@ SBModule SBFrame::GetModule() const {
}
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
SBCompileUnit SBFrame::GetCompileUnit() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBCompileUnit, SBFrame,
- GetCompileUnit);
+ LLDB_INSTRUMENT_VA(this);
SBCompileUnit sb_comp_unit;
std::unique_lock<std::recursive_mutex> lock;
@@ -179,11 +175,11 @@ SBCompileUnit SBFrame::GetCompileUnit() const {
}
}
- return LLDB_RECORD_RESULT(sb_comp_unit);
+ return sb_comp_unit;
}
SBFunction SBFrame::GetFunction() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFunction, SBFrame, GetFunction);
+ LLDB_INSTRUMENT_VA(this);
SBFunction sb_function;
std::unique_lock<std::recursive_mutex> lock;
@@ -203,11 +199,11 @@ SBFunction SBFrame::GetFunction() const {
}
}
- return LLDB_RECORD_RESULT(sb_function);
+ return sb_function;
}
SBSymbol SBFrame::GetSymbol() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBSymbol, SBFrame, GetSymbol);
+ LLDB_INSTRUMENT_VA(this);
SBSymbol sb_symbol;
std::unique_lock<std::recursive_mutex> lock;
@@ -226,11 +222,11 @@ SBSymbol SBFrame::GetSymbol() const {
}
}
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
SBBlock SBFrame::GetBlock() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetBlock);
+ LLDB_INSTRUMENT_VA(this);
SBBlock sb_block;
std::unique_lock<std::recursive_mutex> lock;
@@ -247,11 +243,11 @@ SBBlock SBFrame::GetBlock() const {
sb_block.SetPtr(frame->GetSymbolContext(eSymbolContextBlock).block);
}
}
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBBlock SBFrame::GetFrameBlock() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetFrameBlock);
+ LLDB_INSTRUMENT_VA(this);
SBBlock sb_block;
std::unique_lock<std::recursive_mutex> lock;
@@ -268,11 +264,11 @@ SBBlock SBFrame::GetFrameBlock() const {
sb_block.SetPtr(frame->GetFrameBlock());
}
}
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBLineEntry SBFrame::GetLineEntry() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLineEntry, SBFrame, GetLineEntry);
+ LLDB_INSTRUMENT_VA(this);
SBLineEntry sb_line_entry;
std::unique_lock<std::recursive_mutex> lock;
@@ -291,11 +287,11 @@ SBLineEntry SBFrame::GetLineEntry() const {
}
}
}
- return LLDB_RECORD_RESULT(sb_line_entry);
+ return sb_line_entry;
}
uint32_t SBFrame::GetFrameID() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBFrame, GetFrameID);
+ LLDB_INSTRUMENT_VA(this);
uint32_t frame_idx = UINT32_MAX;
@@ -310,7 +306,7 @@ uint32_t SBFrame::GetFrameID() const {
}
lldb::addr_t SBFrame::GetCFA() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetCFA);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -322,7 +318,7 @@ lldb::addr_t SBFrame::GetCFA() const {
}
addr_t SBFrame::GetPC() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetPC);
+ LLDB_INSTRUMENT_VA(this);
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
@@ -346,7 +342,7 @@ addr_t SBFrame::GetPC() const {
}
bool SBFrame::SetPC(addr_t new_pc) {
- LLDB_RECORD_METHOD(bool, SBFrame, SetPC, (lldb::addr_t), new_pc);
+ LLDB_INSTRUMENT_VA(this, new_pc);
bool ret_val = false;
std::unique_lock<std::recursive_mutex> lock;
@@ -369,7 +365,7 @@ bool SBFrame::SetPC(addr_t new_pc) {
}
addr_t SBFrame::GetSP() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetSP);
+ LLDB_INSTRUMENT_VA(this);
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
@@ -392,7 +388,7 @@ addr_t SBFrame::GetSP() const {
}
addr_t SBFrame::GetFP() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetFP);
+ LLDB_INSTRUMENT_VA(this);
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
@@ -415,7 +411,7 @@ addr_t SBFrame::GetFP() const {
}
SBAddress SBFrame::GetPCAddress() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBFrame, GetPCAddress);
+ LLDB_INSTRUMENT_VA(this);
SBAddress sb_addr;
std::unique_lock<std::recursive_mutex> lock;
@@ -432,18 +428,17 @@ SBAddress SBFrame::GetPCAddress() const {
sb_addr.SetAddress(frame->GetFrameCodeAddress());
}
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
void SBFrame::Clear() {
- LLDB_RECORD_METHOD_NO_ARGS(void, SBFrame, Clear);
+ LLDB_INSTRUMENT_VA(this);
m_opaque_sp->Clear();
}
lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *), var_path);
+ LLDB_INSTRUMENT_VA(this, var_path);
SBValue sb_value;
std::unique_lock<std::recursive_mutex> lock;
@@ -456,18 +451,16 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path) {
frame->CalculateTarget()->GetPreferDynamicValue();
sb_value = GetValueForVariablePath(var_path, use_dynamic);
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
DynamicValueType use_dynamic) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *, lldb::DynamicValueType), var_path,
- use_dynamic);
+ LLDB_INSTRUMENT_VA(this, var_path, use_dynamic);
SBValue sb_value;
if (var_path == nullptr || var_path[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
std::unique_lock<std::recursive_mutex> lock;
@@ -492,12 +485,11 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
}
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBFrame::FindVariable(const char *name) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable, (const char *),
- name);
+ LLDB_INSTRUMENT_VA(this, name);
SBValue value;
std::unique_lock<std::recursive_mutex> lock;
@@ -510,19 +502,18 @@ SBValue SBFrame::FindVariable(const char *name) {
frame->CalculateTarget()->GetPreferDynamicValue();
value = FindVariable(name, use_dynamic);
}
- return LLDB_RECORD_RESULT(value);
+ return value;
}
SBValue SBFrame::FindVariable(const char *name,
lldb::DynamicValueType use_dynamic) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable,
- (const char *, lldb::DynamicValueType), name, use_dynamic);
+ LLDB_INSTRUMENT_VA(this, name, use_dynamic);
VariableSP var_sp;
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
ValueObjectSP value_sp;
@@ -545,12 +536,11 @@ SBValue SBFrame::FindVariable(const char *name,
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBFrame::FindValue(const char *name, ValueType value_type) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType), name, value_type);
+ LLDB_INSTRUMENT_VA(this, name, value_type);
SBValue value;
std::unique_lock<std::recursive_mutex> lock;
@@ -563,19 +553,17 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type) {
frame->CalculateTarget()->GetPreferDynamicValue();
value = FindValue(name, value_type, use_dynamic);
}
- return LLDB_RECORD_RESULT(value);
+ return value;
}
SBValue SBFrame::FindValue(const char *name, ValueType value_type,
lldb::DynamicValueType use_dynamic) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType, lldb::DynamicValueType),
- name, value_type, use_dynamic);
+ LLDB_INSTRUMENT_VA(this, name, value_type, use_dynamic);
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
ValueObjectSP value_sp;
@@ -678,12 +666,11 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
bool SBFrame::IsEqual(const SBFrame &that) const {
- LLDB_RECORD_METHOD_CONST(bool, SBFrame, IsEqual, (const lldb::SBFrame &),
- that);
+ LLDB_INSTRUMENT_VA(this, that);
lldb::StackFrameSP this_sp = GetFrameSP();
lldb::StackFrameSP that_sp = that.GetFrameSP();
@@ -691,21 +678,19 @@ bool SBFrame::IsEqual(const SBFrame &that) const {
}
bool SBFrame::operator==(const SBFrame &rhs) const {
- LLDB_RECORD_METHOD_CONST(bool, SBFrame, operator==,(const lldb::SBFrame &),
- rhs);
+ LLDB_INSTRUMENT_VA(this, rhs);
return IsEqual(rhs);
}
bool SBFrame::operator!=(const SBFrame &rhs) const {
- LLDB_RECORD_METHOD_CONST(bool, SBFrame, operator!=,(const lldb::SBFrame &),
- rhs);
+ LLDB_INSTRUMENT_VA(this, rhs);
return !IsEqual(rhs);
}
SBThread SBFrame::GetThread() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBFrame, GetThread);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -713,11 +698,11 @@ SBThread SBFrame::GetThread() const {
ThreadSP thread_sp(exe_ctx.GetThreadSP());
SBThread sb_thread(thread_sp);
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
const char *SBFrame::Disassemble() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, Disassemble);
+ LLDB_INSTRUMENT_VA(this);
const char *disassembly = nullptr;
std::unique_lock<std::recursive_mutex> lock;
@@ -741,9 +726,7 @@ const char *SBFrame::Disassemble() const {
SBValueList SBFrame::GetVariables(bool arguments, bool locals, bool statics,
bool in_scope_only) {
- LLDB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool), arguments, locals, statics,
- in_scope_only);
+ LLDB_INSTRUMENT_VA(this, arguments, locals, statics, in_scope_only);
SBValueList value_list;
std::unique_lock<std::recursive_mutex> lock;
@@ -767,15 +750,14 @@ SBValueList SBFrame::GetVariables(bool arguments, bool locals, bool statics,
value_list = GetVariables(options);
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
lldb::SBValueList SBFrame::GetVariables(bool arguments, bool locals,
bool statics, bool in_scope_only,
lldb::DynamicValueType use_dynamic) {
- LLDB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool, lldb::DynamicValueType),
- arguments, locals, statics, in_scope_only, use_dynamic);
+ LLDB_INSTRUMENT_VA(this, arguments, locals, statics, in_scope_only,
+ use_dynamic);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -790,12 +772,11 @@ lldb::SBValueList SBFrame::GetVariables(bool arguments, bool locals,
options.SetInScopeOnly(in_scope_only);
options.SetIncludeRuntimeSupportValues(include_runtime_support_values);
options.SetUseDynamic(use_dynamic);
- return LLDB_RECORD_RESULT(GetVariables(options));
+ return GetVariables(options);
}
SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
- LLDB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (const lldb::SBVariablesOptions &), options);
+ LLDB_INSTRUMENT_VA(this, options);
SBValueList value_list;
std::unique_lock<std::recursive_mutex> lock;
@@ -891,11 +872,11 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
SBValueList SBFrame::GetRegisters() {
- LLDB_RECORD_METHOD_NO_ARGS(lldb::SBValueList, SBFrame, GetRegisters);
+ LLDB_INSTRUMENT_VA(this);
SBValueList value_list;
std::unique_lock<std::recursive_mutex> lock;
@@ -921,12 +902,11 @@ SBValueList SBFrame::GetRegisters() {
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
SBValue SBFrame::FindRegister(const char *name) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *),
- name);
+ LLDB_INSTRUMENT_VA(this, name);
SBValue result;
ValueObjectSP value_sp;
@@ -953,12 +933,11 @@ SBValue SBFrame::FindRegister(const char *name) {
}
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
bool SBFrame::GetDescription(SBStream &description) {
- LLDB_RECORD_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &),
- description);
+ LLDB_INSTRUMENT_VA(this, description);
Stream &strm = description.ref();
@@ -984,8 +963,7 @@ bool SBFrame::GetDescription(SBStream &description) {
}
SBValue SBFrame::EvaluateExpression(const char *expr) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression, (const char *),
- expr);
+ LLDB_INSTRUMENT_VA(this, expr);
SBValue result;
std::unique_lock<std::recursive_mutex> lock;
@@ -1004,17 +982,15 @@ SBValue SBFrame::EvaluateExpression(const char *expr) {
options.SetLanguage(target->GetLanguage());
else
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
SBValue
SBFrame::EvaluateExpression(const char *expr,
lldb::DynamicValueType fetch_dynamic_value) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType), expr,
- fetch_dynamic_value);
+ LLDB_INSTRUMENT_VA(this, expr, fetch_dynamic_value);
SBExpressionOptions options;
options.SetFetchDynamicValue(fetch_dynamic_value);
@@ -1029,15 +1005,13 @@ SBFrame::EvaluateExpression(const char *expr,
options.SetLanguage(target->GetLanguage());
else if (frame)
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
SBValue SBFrame::EvaluateExpression(const char *expr,
lldb::DynamicValueType fetch_dynamic_value,
bool unwind_on_error) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType, bool), expr,
- fetch_dynamic_value, unwind_on_error);
+ LLDB_INSTRUMENT_VA(this, expr, fetch_dynamic_value, unwind_on_error);
SBExpressionOptions options;
std::unique_lock<std::recursive_mutex> lock;
@@ -1052,21 +1026,19 @@ SBValue SBFrame::EvaluateExpression(const char *expr,
options.SetLanguage(target->GetLanguage());
else if (frame)
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
const SBExpressionOptions &options) {
- LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &), expr,
- options);
+ LLDB_INSTRUMENT_VA(this, expr, options);
Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
SBValue expr_result;
if (expr == nullptr || expr[0] == '\0') {
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
ValueObjectSP expr_value_sp;
@@ -1106,17 +1078,17 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
"%s, summary %s **",
expr_result.GetValue(), expr_result.GetSummary());
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
bool SBFrame::IsInlined() {
- LLDB_RECORD_METHOD_NO_ARGS(bool, SBFrame, IsInlined);
+ LLDB_INSTRUMENT_VA(this);
return static_cast<const SBFrame *>(this)->IsInlined();
}
bool SBFrame::IsInlined() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsInlined);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1140,13 +1112,13 @@ bool SBFrame::IsInlined() const {
}
bool SBFrame::IsArtificial() {
- LLDB_RECORD_METHOD_NO_ARGS(bool, SBFrame, IsArtificial);
+ LLDB_INSTRUMENT_VA(this);
return static_cast<const SBFrame *>(this)->IsArtificial();
}
bool SBFrame::IsArtificial() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsArtificial);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1159,13 +1131,13 @@ bool SBFrame::IsArtificial() const {
}
const char *SBFrame::GetFunctionName() {
- LLDB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetFunctionName);
+ LLDB_INSTRUMENT_VA(this);
return static_cast<const SBFrame *>(this)->GetFunctionName();
}
lldb::LanguageType SBFrame::GuessLanguage() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::LanguageType, SBFrame, GuessLanguage);
+ LLDB_INSTRUMENT_VA(this);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1186,7 +1158,7 @@ lldb::LanguageType SBFrame::GuessLanguage() const {
}
const char *SBFrame::GetFunctionName() const {
- LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, GetFunctionName);
+ LLDB_INSTRUMENT_VA(this);
const char *name = nullptr;
std::unique_lock<std::recursive_mutex> lock;
@@ -1228,7 +1200,7 @@ const char *SBFrame::GetFunctionName() const {
}
const char *SBFrame::GetDisplayFunctionName() {
- LLDB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetDisplayFunctionName);
+ LLDB_INSTRUMENT_VA(this);
const char *name = nullptr;
@@ -1269,82 +1241,3 @@ const char *SBFrame::GetDisplayFunctionName() {
}
return name;
}
-
-namespace lldb_private {
-namespace repro {
-
-template <>
-void RegisterMethods<SBFrame>(Registry &R) {
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, ());
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &));
- LLDB_REGISTER_CONSTRUCTOR(SBFrame, (const lldb::SBFrame &));
- LLDB_REGISTER_METHOD(const lldb::SBFrame &,
- SBFrame, operator=,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsValid, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, operator bool, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
- (uint32_t));
- LLDB_REGISTER_METHOD_CONST(lldb::SBModule, SBFrame, GetModule, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBCompileUnit, SBFrame, GetCompileUnit,
- ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBFunction, SBFrame, GetFunction, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBSymbol, SBFrame, GetSymbol, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetBlock, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBBlock, SBFrame, GetFrameBlock, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBLineEntry, SBFrame, GetLineEntry, ());
- LLDB_REGISTER_METHOD_CONST(uint32_t, SBFrame, GetFrameID, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetCFA, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetPC, ());
- LLDB_REGISTER_METHOD(bool, SBFrame, SetPC, (lldb::addr_t));
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetSP, ());
- LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBFrame, GetFP, ());
- LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBFrame, GetPCAddress, ());
- LLDB_REGISTER_METHOD(void, SBFrame, Clear, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, GetValueForVariablePath,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable, (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindVariable,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType));
- LLDB_REGISTER_METHOD(
- lldb::SBValue, SBFrame, FindValue,
- (const char *, lldb::ValueType, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsEqual, (const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFrame, operator==,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(bool,
- SBFrame, operator!=,(const lldb::SBFrame &));
- LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBFrame, GetThread, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFrame, Disassemble, ());
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (bool, bool, bool, bool, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetVariables,
- (const lldb::SBVariablesOptions &));
- LLDB_REGISTER_METHOD(lldb::SBValueList, SBFrame, GetRegisters, ());
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *));
- LLDB_REGISTER_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, lldb::DynamicValueType, bool));
- LLDB_REGISTER_METHOD(lldb::SBValue, SBFrame, EvaluateExpression,
- (const char *, const lldb::SBExpressionOptions &));
- LLDB_REGISTER_METHOD(bool, SBFrame, IsInlined, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsInlined, ());
- LLDB_REGISTER_METHOD(bool, SBFrame, IsArtificial, ());
- LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsArtificial, ());
- LLDB_REGISTER_METHOD(const char *, SBFrame, GetFunctionName, ());
- LLDB_REGISTER_METHOD_CONST(lldb::LanguageType, SBFrame, GuessLanguage, ());
- LLDB_REGISTER_METHOD_CONST(const char *, SBFrame, GetFunctionName, ());
- LLDB_REGISTER_METHOD(const char *, SBFrame, GetDisplayFunctionName, ());
-}
-
-}
-}