diff options
Diffstat (limited to 'lldb/source/API/SBBreakpointName.cpp')
| -rw-r--r-- | lldb/source/API/SBBreakpointName.cpp | 196 |
1 files changed, 50 insertions, 146 deletions
diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp index b5c700c78bbb..796229d04ce4 100644 --- a/lldb/source/API/SBBreakpointName.cpp +++ b/lldb/source/API/SBBreakpointName.cpp @@ -7,13 +7,13 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBBreakpointName.h" -#include "SBReproducerPrivate.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBStringList.h" #include "lldb/API/SBStructuredData.h" #include "lldb/API/SBTarget.h" +#include "lldb/Utility/Instrumentation.h" #include "lldb/Breakpoint/BreakpointName.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" @@ -107,13 +107,10 @@ lldb_private::BreakpointName *SBBreakpointNameImpl::GetBreakpointName() const { } // namespace lldb -SBBreakpointName::SBBreakpointName() { - LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpointName); -} +SBBreakpointName::SBBreakpointName() { LLDB_INSTRUMENT_VA(this); } SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) { - LLDB_RECORD_CONSTRUCTOR(SBBreakpointName, (lldb::SBTarget &, const char *), - sb_target, name); + LLDB_INSTRUMENT_VA(this, sb_target, name); m_impl_up = std::make_unique<SBBreakpointNameImpl>(sb_target, name); // Call FindBreakpointName here to make sure the name is valid, reset if not: @@ -123,8 +120,7 @@ SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) { } SBBreakpointName::SBBreakpointName(SBBreakpoint &sb_bkpt, const char *name) { - LLDB_RECORD_CONSTRUCTOR(SBBreakpointName, - (lldb::SBBreakpoint &, const char *), sb_bkpt, name); + LLDB_INSTRUMENT_VA(this, sb_bkpt, name); if (!sb_bkpt.IsValid()) { m_impl_up.reset(); @@ -149,8 +145,7 @@ SBBreakpointName::SBBreakpointName(SBBreakpoint &sb_bkpt, const char *name) { } SBBreakpointName::SBBreakpointName(const SBBreakpointName &rhs) { - LLDB_RECORD_CONSTRUCTOR(SBBreakpointName, (const lldb::SBBreakpointName &), - rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (!rhs.m_impl_up) return; @@ -163,40 +158,36 @@ SBBreakpointName::~SBBreakpointName() = default; const SBBreakpointName &SBBreakpointName:: operator=(const SBBreakpointName &rhs) { - LLDB_RECORD_METHOD( - const lldb::SBBreakpointName &, - SBBreakpointName, operator=,(const lldb::SBBreakpointName &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (!rhs.m_impl_up) { m_impl_up.reset(); - return LLDB_RECORD_RESULT(*this); + return *this; } m_impl_up = std::make_unique<SBBreakpointNameImpl>(rhs.m_impl_up->GetTarget(), rhs.m_impl_up->GetName()); - return LLDB_RECORD_RESULT(*this); + return *this; } bool SBBreakpointName::operator==(const lldb::SBBreakpointName &rhs) { - LLDB_RECORD_METHOD( - bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); return *m_impl_up == *rhs.m_impl_up; } bool SBBreakpointName::operator!=(const lldb::SBBreakpointName &rhs) { - LLDB_RECORD_METHOD( - bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); return *m_impl_up != *rhs.m_impl_up; } bool SBBreakpointName::IsValid() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsValid); + LLDB_INSTRUMENT_VA(this); return this->operator bool(); } SBBreakpointName::operator bool() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, operator bool); + LLDB_INSTRUMENT_VA(this); if (!m_impl_up) return false; @@ -204,7 +195,7 @@ SBBreakpointName::operator bool() const { } const char *SBBreakpointName::GetName() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, GetName); + LLDB_INSTRUMENT_VA(this); if (!m_impl_up) return "<Invalid Breakpoint Name Object>"; @@ -212,7 +203,7 @@ const char *SBBreakpointName::GetName() const { } void SBBreakpointName::SetEnabled(bool enable) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetEnabled, (bool), enable); + LLDB_INSTRUMENT_VA(this, enable); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -236,7 +227,7 @@ void SBBreakpointName::UpdateName(BreakpointName &bp_name) { } bool SBBreakpointName::IsEnabled() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, IsEnabled); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -249,7 +240,7 @@ bool SBBreakpointName::IsEnabled() { } void SBBreakpointName::SetOneShot(bool one_shot) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetOneShot, (bool), one_shot); + LLDB_INSTRUMENT_VA(this, one_shot); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -263,7 +254,7 @@ void SBBreakpointName::SetOneShot(bool one_shot) { } bool SBBreakpointName::IsOneShot() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsOneShot); + LLDB_INSTRUMENT_VA(this); const BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -276,7 +267,7 @@ bool SBBreakpointName::IsOneShot() const { } void SBBreakpointName::SetIgnoreCount(uint32_t count) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t), count); + LLDB_INSTRUMENT_VA(this, count); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -290,7 +281,7 @@ void SBBreakpointName::SetIgnoreCount(uint32_t count) { } uint32_t SBBreakpointName::GetIgnoreCount() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetIgnoreCount); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -303,8 +294,7 @@ uint32_t SBBreakpointName::GetIgnoreCount() const { } void SBBreakpointName::SetCondition(const char *condition) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetCondition, (const char *), - condition); + LLDB_INSTRUMENT_VA(this, condition); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -318,7 +308,7 @@ void SBBreakpointName::SetCondition(const char *condition) { } const char *SBBreakpointName::GetCondition() { - LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointName, GetCondition); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -331,8 +321,7 @@ const char *SBBreakpointName::GetCondition() { } void SBBreakpointName::SetAutoContinue(bool auto_continue) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetAutoContinue, (bool), - auto_continue); + LLDB_INSTRUMENT_VA(this, auto_continue); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -346,7 +335,7 @@ void SBBreakpointName::SetAutoContinue(bool auto_continue) { } bool SBBreakpointName::GetAutoContinue() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAutoContinue); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -359,7 +348,7 @@ bool SBBreakpointName::GetAutoContinue() { } void SBBreakpointName::SetThreadID(tid_t tid) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t), tid); + LLDB_INSTRUMENT_VA(this, tid); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -373,7 +362,7 @@ void SBBreakpointName::SetThreadID(tid_t tid) { } tid_t SBBreakpointName::GetThreadID() { - LLDB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpointName, GetThreadID); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -386,7 +375,7 @@ tid_t SBBreakpointName::GetThreadID() { } void SBBreakpointName::SetThreadIndex(uint32_t index) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t), index); + LLDB_INSTRUMENT_VA(this, index); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -400,7 +389,7 @@ void SBBreakpointName::SetThreadIndex(uint32_t index) { } uint32_t SBBreakpointName::GetThreadIndex() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetThreadIndex); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -413,8 +402,7 @@ uint32_t SBBreakpointName::GetThreadIndex() const { } void SBBreakpointName::SetThreadName(const char *thread_name) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadName, (const char *), - thread_name); + LLDB_INSTRUMENT_VA(this, thread_name); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -428,8 +416,7 @@ void SBBreakpointName::SetThreadName(const char *thread_name) { } const char *SBBreakpointName::GetThreadName() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, - GetThreadName); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -442,8 +429,7 @@ const char *SBBreakpointName::GetThreadName() const { } void SBBreakpointName::SetQueueName(const char *queue_name) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetQueueName, (const char *), - queue_name); + LLDB_INSTRUMENT_VA(this, queue_name); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -457,8 +443,7 @@ void SBBreakpointName::SetQueueName(const char *queue_name) { } const char *SBBreakpointName::GetQueueName() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, - GetQueueName); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -471,8 +456,7 @@ const char *SBBreakpointName::GetQueueName() const { } void SBBreakpointName::SetCommandLineCommands(SBStringList &commands) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetCommandLineCommands, - (lldb::SBStringList &), commands); + LLDB_INSTRUMENT_VA(this, commands); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -491,8 +475,7 @@ void SBBreakpointName::SetCommandLineCommands(SBStringList &commands) { } bool SBBreakpointName::GetCommandLineCommands(SBStringList &commands) { - LLDB_RECORD_METHOD(bool, SBBreakpointName, GetCommandLineCommands, - (lldb::SBStringList &), commands); + LLDB_INSTRUMENT_VA(this, commands); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -507,8 +490,7 @@ bool SBBreakpointName::GetCommandLineCommands(SBStringList &commands) { } const char *SBBreakpointName::GetHelpString() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, - GetHelpString); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -518,8 +500,7 @@ const char *SBBreakpointName::GetHelpString() const { } void SBBreakpointName::SetHelpString(const char *help_string) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetHelpString, (const char *), - help_string); + LLDB_INSTRUMENT_VA(this, help_string); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -532,8 +513,7 @@ void SBBreakpointName::SetHelpString(const char *help_string) { } bool SBBreakpointName::GetDescription(SBStream &s) { - LLDB_RECORD_METHOD(bool, SBBreakpointName, GetDescription, (lldb::SBStream &), - s); + LLDB_INSTRUMENT_VA(this, s); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -550,8 +530,7 @@ bool SBBreakpointName::GetDescription(SBStream &s) { void SBBreakpointName::SetCallback(SBBreakpointHitCallback callback, void *baton) { - LLDB_RECORD_DUMMY(void, SBBreakpointName, SetCallback, - (lldb::SBBreakpointHitCallback, void *), callback, baton); + LLDB_INSTRUMENT_VA(this, callback, baton); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -569,8 +548,7 @@ void SBBreakpointName::SetCallback(SBBreakpointHitCallback callback, void SBBreakpointName::SetScriptCallbackFunction( const char *callback_function_name) { -LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction, - (const char *), callback_function_name); + LLDB_INSTRUMENT_VA(this, callback_function_name); SBStructuredData empty_args; SetScriptCallbackFunction(callback_function_name, empty_args); } @@ -578,14 +556,12 @@ LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction, SBError SBBreakpointName::SetScriptCallbackFunction( const char *callback_function_name, SBStructuredData &extra_args) { - LLDB_RECORD_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction, - (const char *, SBStructuredData &), - callback_function_name, extra_args); + LLDB_INSTRUMENT_VA(this, callback_function_name, extra_args); SBError sb_error; BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) { sb_error.SetErrorString("unrecognized breakpoint name"); - return LLDB_RECORD_RESULT(sb_error); + return sb_error; } std::lock_guard<std::recursive_mutex> guard( @@ -601,18 +577,17 @@ SBError SBBreakpointName::SetScriptCallbackFunction( extra_args.m_impl_up->GetObjectSP()); sb_error.SetError(error); UpdateName(*bp_name); - return LLDB_RECORD_RESULT(sb_error); + return sb_error; } SBError SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) { - LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody, - (const char *), callback_body_text); + LLDB_INSTRUMENT_VA(this, callback_body_text); SBError sb_error; BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) - return LLDB_RECORD_RESULT(sb_error); + return sb_error; std::lock_guard<std::recursive_mutex> guard( m_impl_up->GetTarget()->GetAPIMutex()); @@ -627,11 +602,11 @@ SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) { if (!sb_error.Fail()) UpdateName(*bp_name); - return LLDB_RECORD_RESULT(sb_error); + return sb_error; } bool SBBreakpointName::GetAllowList() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, GetAllowList); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -640,8 +615,7 @@ bool SBBreakpointName::GetAllowList() const { } void SBBreakpointName::SetAllowList(bool value) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowList, (bool), value); - + LLDB_INSTRUMENT_VA(this, value); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -650,7 +624,7 @@ void SBBreakpointName::SetAllowList(bool value) { } bool SBBreakpointName::GetAllowDelete() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDelete); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -659,8 +633,7 @@ bool SBBreakpointName::GetAllowDelete() { } void SBBreakpointName::SetAllowDelete(bool value) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDelete, (bool), value); - + LLDB_INSTRUMENT_VA(this, value); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -669,7 +642,7 @@ void SBBreakpointName::SetAllowDelete(bool value) { } bool SBBreakpointName::GetAllowDisable() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDisable); + LLDB_INSTRUMENT_VA(this); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -678,7 +651,7 @@ bool SBBreakpointName::GetAllowDisable() { } void SBBreakpointName::SetAllowDisable(bool value) { - LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDisable, (bool), value); + LLDB_INSTRUMENT_VA(this, value); BreakpointName *bp_name = GetBreakpointName(); if (!bp_name) @@ -692,72 +665,3 @@ lldb_private::BreakpointName *SBBreakpointName::GetBreakpointName() const return nullptr; return m_impl_up->GetBreakpointName(); } - - -namespace lldb_private { -namespace repro { - -template <> -void RegisterMethods<SBBreakpointName>(Registry &R) { - LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, ()); - LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, - (lldb::SBTarget &, const char *)); - LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, - (lldb::SBBreakpoint &, const char *)); - LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, - (const lldb::SBBreakpointName &)); - LLDB_REGISTER_METHOD( - const lldb::SBBreakpointName &, - SBBreakpointName, operator=,(const lldb::SBBreakpointName &)); - LLDB_REGISTER_METHOD( - bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &)); - LLDB_REGISTER_METHOD( - bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &)); - LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ()); - LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, operator bool, ()); - LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetName, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetEnabled, (bool)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, IsEnabled, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetOneShot, (bool)); - LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsOneShot, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t)); - LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetIgnoreCount, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCondition, (const char *)); - LLDB_REGISTER_METHOD(const char *, SBBreakpointName, GetCondition, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAutoContinue, (bool)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAutoContinue, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t)); - LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpointName, GetThreadID, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t)); - LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetThreadIndex, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadName, (const char *)); - LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetThreadName, - ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetQueueName, (const char *)); - LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetQueueName, - ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCommandLineCommands, - (lldb::SBStringList &)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetCommandLineCommands, - (lldb::SBStringList &)); - LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetHelpString, - ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetHelpString, (const char *)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetDescription, - (lldb::SBStream &)); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetScriptCallbackFunction, - (const char *)); - LLDB_REGISTER_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction, - (const char *, SBStructuredData &)); - LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody, - (const char *)); - LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, GetAllowList, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowList, (bool)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDelete, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDelete, (bool)); - LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDisable, ()); - LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDisable, (bool)); -} - -} -} |
