diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
commit | 6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch) | |
tree | a1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /lldb/source/API/SBExpressionOptions.cpp | |
parent | 77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff) | |
download | src-6f8fc217eaa12bf657be1c6468ed9938d10168b3.tar.gz src-6f8fc217eaa12bf657be1c6468ed9938d10168b3.zip |
Vendor import of llvm-project main llvmorg-14-init-17616-g024a1fab5c35.vendor/llvm-project/llvmorg-14-init-17616-g024a1fab5c35
Diffstat (limited to 'lldb/source/API/SBExpressionOptions.cpp')
-rw-r--r-- | lldb/source/API/SBExpressionOptions.cpp | 174 |
1 files changed, 40 insertions, 134 deletions
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp index 217e8ad5c21b..191e38fe5cfc 100644 --- a/lldb/source/API/SBExpressionOptions.cpp +++ b/lldb/source/API/SBExpressionOptions.cpp @@ -7,113 +7,99 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBExpressionOptions.h" -#include "SBReproducerPrivate.h" #include "Utils.h" #include "lldb/API/SBStream.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Instrumentation.h" using namespace lldb; using namespace lldb_private; SBExpressionOptions::SBExpressionOptions() : m_opaque_up(new EvaluateExpressionOptions()) { - LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBExpressionOptions); + LLDB_INSTRUMENT_VA(this); } -SBExpressionOptions::SBExpressionOptions(const SBExpressionOptions &rhs) - : m_opaque_up() { - LLDB_RECORD_CONSTRUCTOR(SBExpressionOptions, - (const lldb::SBExpressionOptions &), rhs); +SBExpressionOptions::SBExpressionOptions(const SBExpressionOptions &rhs) { + LLDB_INSTRUMENT_VA(this, rhs); m_opaque_up = clone(rhs.m_opaque_up); } const SBExpressionOptions &SBExpressionOptions:: operator=(const SBExpressionOptions &rhs) { - LLDB_RECORD_METHOD( - const lldb::SBExpressionOptions &, - SBExpressionOptions, operator=,(const lldb::SBExpressionOptions &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (this != &rhs) m_opaque_up = clone(rhs.m_opaque_up); - return LLDB_RECORD_RESULT(*this); + return *this; } SBExpressionOptions::~SBExpressionOptions() = default; bool SBExpressionOptions::GetCoerceResultToId() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, - GetCoerceResultToId); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->DoesCoerceToId(); } void SBExpressionOptions::SetCoerceResultToId(bool coerce) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetCoerceResultToId, (bool), - coerce); + LLDB_INSTRUMENT_VA(this, coerce); m_opaque_up->SetCoerceToId(coerce); } bool SBExpressionOptions::GetUnwindOnError() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetUnwindOnError); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->DoesUnwindOnError(); } void SBExpressionOptions::SetUnwindOnError(bool unwind) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetUnwindOnError, (bool), - unwind); + LLDB_INSTRUMENT_VA(this, unwind); m_opaque_up->SetUnwindOnError(unwind); } bool SBExpressionOptions::GetIgnoreBreakpoints() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, - GetIgnoreBreakpoints); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->DoesIgnoreBreakpoints(); } void SBExpressionOptions::SetIgnoreBreakpoints(bool ignore) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetIgnoreBreakpoints, (bool), - ignore); + LLDB_INSTRUMENT_VA(this, ignore); m_opaque_up->SetIgnoreBreakpoints(ignore); } lldb::DynamicValueType SBExpressionOptions::GetFetchDynamicValue() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::DynamicValueType, SBExpressionOptions, - GetFetchDynamicValue); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetUseDynamic(); } void SBExpressionOptions::SetFetchDynamicValue(lldb::DynamicValueType dynamic) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetFetchDynamicValue, - (lldb::DynamicValueType), dynamic); + LLDB_INSTRUMENT_VA(this, dynamic); m_opaque_up->SetUseDynamic(dynamic); } uint32_t SBExpressionOptions::GetTimeoutInMicroSeconds() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBExpressionOptions, - GetTimeoutInMicroSeconds); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetTimeout() ? m_opaque_up->GetTimeout()->count() : 0; } void SBExpressionOptions::SetTimeoutInMicroSeconds(uint32_t timeout) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetTimeoutInMicroSeconds, - (uint32_t), timeout); + LLDB_INSTRUMENT_VA(this, timeout); m_opaque_up->SetTimeout(timeout == 0 ? Timeout<std::micro>(llvm::None) : std::chrono::microseconds(timeout)); } uint32_t SBExpressionOptions::GetOneThreadTimeoutInMicroSeconds() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBExpressionOptions, - GetOneThreadTimeoutInMicroSeconds); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetOneThreadTimeout() ? m_opaque_up->GetOneThreadTimeout()->count() @@ -121,8 +107,7 @@ uint32_t SBExpressionOptions::GetOneThreadTimeoutInMicroSeconds() const { } void SBExpressionOptions::SetOneThreadTimeoutInMicroSeconds(uint32_t timeout) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, - SetOneThreadTimeoutInMicroSeconds, (uint32_t), timeout); + LLDB_INSTRUMENT_VA(this, timeout); m_opaque_up->SetOneThreadTimeout(timeout == 0 ? Timeout<std::micro>(llvm::None) @@ -130,148 +115,135 @@ void SBExpressionOptions::SetOneThreadTimeoutInMicroSeconds(uint32_t timeout) { } bool SBExpressionOptions::GetTryAllThreads() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetTryAllThreads); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetTryAllThreads(); } void SBExpressionOptions::SetTryAllThreads(bool run_others) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetTryAllThreads, (bool), - run_others); + LLDB_INSTRUMENT_VA(this, run_others); m_opaque_up->SetTryAllThreads(run_others); } bool SBExpressionOptions::GetStopOthers() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, GetStopOthers); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetStopOthers(); } void SBExpressionOptions::SetStopOthers(bool run_others) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetStopOthers, (bool), - run_others); + LLDB_INSTRUMENT_VA(this, run_others); m_opaque_up->SetStopOthers(run_others); } bool SBExpressionOptions::GetTrapExceptions() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBExpressionOptions, - GetTrapExceptions); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetTrapExceptions(); } void SBExpressionOptions::SetTrapExceptions(bool trap_exceptions) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetTrapExceptions, (bool), - trap_exceptions); + LLDB_INSTRUMENT_VA(this, trap_exceptions); m_opaque_up->SetTrapExceptions(trap_exceptions); } void SBExpressionOptions::SetLanguage(lldb::LanguageType language) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetLanguage, - (lldb::LanguageType), language); + LLDB_INSTRUMENT_VA(this, language); m_opaque_up->SetLanguage(language); } void SBExpressionOptions::SetCancelCallback( lldb::ExpressionCancelCallback callback, void *baton) { - LLDB_RECORD_DUMMY(void, SBExpressionOptions, SetCancelCallback, - (lldb::ExpressionCancelCallback, void *), callback, baton); + LLDB_INSTRUMENT_VA(this, callback, baton); m_opaque_up->SetCancelCallback(callback, baton); } bool SBExpressionOptions::GetGenerateDebugInfo() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetGenerateDebugInfo); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetGenerateDebugInfo(); } void SBExpressionOptions::SetGenerateDebugInfo(bool b) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetGenerateDebugInfo, (bool), - b); + LLDB_INSTRUMENT_VA(this, b); return m_opaque_up->SetGenerateDebugInfo(b); } bool SBExpressionOptions::GetSuppressPersistentResult() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, - GetSuppressPersistentResult); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetResultIsInternal(); } void SBExpressionOptions::SetSuppressPersistentResult(bool b) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetSuppressPersistentResult, - (bool), b); + LLDB_INSTRUMENT_VA(this, b); return m_opaque_up->SetResultIsInternal(b); } const char *SBExpressionOptions::GetPrefix() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBExpressionOptions, - GetPrefix); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetPrefix(); } void SBExpressionOptions::SetPrefix(const char *prefix) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetPrefix, (const char *), - prefix); + LLDB_INSTRUMENT_VA(this, prefix); return m_opaque_up->SetPrefix(prefix); } bool SBExpressionOptions::GetAutoApplyFixIts() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetAutoApplyFixIts); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetAutoApplyFixIts(); } void SBExpressionOptions::SetAutoApplyFixIts(bool b) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetAutoApplyFixIts, (bool), b); + LLDB_INSTRUMENT_VA(this, b); return m_opaque_up->SetAutoApplyFixIts(b); } uint64_t SBExpressionOptions::GetRetriesWithFixIts() { - LLDB_RECORD_METHOD_NO_ARGS(uint64_t, SBExpressionOptions, - GetRetriesWithFixIts); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetRetriesWithFixIts(); } void SBExpressionOptions::SetRetriesWithFixIts(uint64_t retries) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetRetriesWithFixIts, - (uint64_t), retries); + LLDB_INSTRUMENT_VA(this, retries); return m_opaque_up->SetRetriesWithFixIts(retries); } bool SBExpressionOptions::GetTopLevel() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetTopLevel); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetExecutionPolicy() == eExecutionPolicyTopLevel; } void SBExpressionOptions::SetTopLevel(bool b) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetTopLevel, (bool), b); + LLDB_INSTRUMENT_VA(this, b); m_opaque_up->SetExecutionPolicy(b ? eExecutionPolicyTopLevel : m_opaque_up->default_execution_policy); } bool SBExpressionOptions::GetAllowJIT() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBExpressionOptions, GetAllowJIT); + LLDB_INSTRUMENT_VA(this); return m_opaque_up->GetExecutionPolicy() != eExecutionPolicyNever; } void SBExpressionOptions::SetAllowJIT(bool allow) { - LLDB_RECORD_METHOD(void, SBExpressionOptions, SetAllowJIT, (bool), allow); + LLDB_INSTRUMENT_VA(this, allow); m_opaque_up->SetExecutionPolicy(allow ? m_opaque_up->default_execution_policy : eExecutionPolicyNever); @@ -284,69 +256,3 @@ EvaluateExpressionOptions *SBExpressionOptions::get() const { EvaluateExpressionOptions &SBExpressionOptions::ref() const { return *(m_opaque_up.get()); } - -namespace lldb_private { -namespace repro { - -template <> -void RegisterMethods<SBExpressionOptions>(Registry &R) { - LLDB_REGISTER_CONSTRUCTOR(SBExpressionOptions, ()); - LLDB_REGISTER_CONSTRUCTOR(SBExpressionOptions, - (const lldb::SBExpressionOptions &)); - LLDB_REGISTER_METHOD( - const lldb::SBExpressionOptions &, - SBExpressionOptions, operator=,(const lldb::SBExpressionOptions &)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetCoerceResultToId, - ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetCoerceResultToId, - (bool)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetUnwindOnError, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetUnwindOnError, (bool)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetIgnoreBreakpoints, - ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetIgnoreBreakpoints, - (bool)); - LLDB_REGISTER_METHOD_CONST(lldb::DynamicValueType, SBExpressionOptions, - GetFetchDynamicValue, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetFetchDynamicValue, - (lldb::DynamicValueType)); - LLDB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions, - GetTimeoutInMicroSeconds, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTimeoutInMicroSeconds, - (uint32_t)); - LLDB_REGISTER_METHOD_CONST(uint32_t, SBExpressionOptions, - GetOneThreadTimeoutInMicroSeconds, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, - SetOneThreadTimeoutInMicroSeconds, (uint32_t)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTryAllThreads, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTryAllThreads, (bool)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetStopOthers, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetStopOthers, (bool)); - LLDB_REGISTER_METHOD_CONST(bool, SBExpressionOptions, GetTrapExceptions, - ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTrapExceptions, (bool)); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetLanguage, - (lldb::LanguageType)); - LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetGenerateDebugInfo, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetGenerateDebugInfo, - (bool)); - LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetSuppressPersistentResult, - ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetSuppressPersistentResult, - (bool)); - LLDB_REGISTER_METHOD_CONST(const char *, SBExpressionOptions, GetPrefix, - ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetPrefix, (const char *)); - LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetAutoApplyFixIts, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetAutoApplyFixIts, (bool)); - LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetTopLevel, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetTopLevel, (bool)); - LLDB_REGISTER_METHOD(bool, SBExpressionOptions, GetAllowJIT, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetAllowJIT, (bool)); - LLDB_REGISTER_METHOD(uint64_t, SBExpressionOptions, GetRetriesWithFixIts, ()); - LLDB_REGISTER_METHOD(void, SBExpressionOptions, SetRetriesWithFixIts, - (uint64_t)); -} - -} -} |