LLDB mainline
lldb_private::EvaluateExpressionOptions Class Reference

#include <Target.h>

Public Member Functions

 EvaluateExpressionOptions ()
ExecutionPolicy GetExecutionPolicy () const
void SetExecutionPolicy (ExecutionPolicy policy=eExecutionPolicyAlways)
SourceLanguage GetLanguage () const
void SetLanguage (lldb::LanguageType language_type)
void SetPreferredSymbolContexts (SymbolContextList contexts)
const SymbolContextListGetPreferredSymbolContexts () const
void SetLanguage (uint16_t name, uint32_t version)
 Set the language using a pair of language code and version as defined by the DWARF 6 specification.
bool DoesCoerceToId () const
const char * GetPrefix () const
void SetPrefix (const char *prefix)
void SetCoerceToId (bool coerce=true)
bool DoesUnwindOnError () const
void SetUnwindOnError (bool unwind=false)
bool DoesIgnoreBreakpoints () const
void SetIgnoreBreakpoints (bool ignore=false)
bool DoesKeepInMemory () const
void SetKeepInMemory (bool keep=true)
lldb::DynamicValueType GetUseDynamic () const
void SetUseDynamic (lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
const Timeout< std::micro > & GetTimeout () const
void SetTimeout (const Timeout< std::micro > &timeout)
const Timeout< std::micro > & GetOneThreadTimeout () const
void SetOneThreadTimeout (const Timeout< std::micro > &timeout)
bool GetTryAllThreads () const
void SetTryAllThreads (bool try_others=true)
bool GetStopOthers () const
void SetStopOthers (bool stop_others=true)
bool GetDebug () const
void SetDebug (bool b)
bool GetGenerateDebugInfo () const
void SetGenerateDebugInfo (bool b)
bool GetColorizeErrors () const
void SetColorizeErrors (bool b)
bool GetTrapExceptions () const
void SetTrapExceptions (bool b)
bool GetREPLEnabled () const
void SetREPLEnabled (bool b)
void SetCancelCallback (lldb::ExpressionCancelCallback callback, void *baton)
bool InvokeCancelCallback (lldb::ExpressionEvaluationPhase phase) const
void SetPoundLine (const char *path, uint32_t line) const
const char * GetPoundLineFilePath () const
uint32_t GetPoundLineLine () const
void SetSuppressPersistentResult (bool b)
bool GetSuppressPersistentResult () const
void SetAutoApplyFixIts (bool b)
bool GetAutoApplyFixIts () const
void SetRetriesWithFixIts (uint64_t number_of_retries)
uint64_t GetRetriesWithFixIts () const
bool IsForUtilityExpr () const
void SetIsForUtilityExpr (bool b)
llvm::Error SetBooleanLanguageOption (llvm::StringRef option_name, bool value)
 Set language-plugin specific option called option_name to the specified boolean value.
llvm::Expected< boolGetBooleanLanguageOption (llvm::StringRef option_name) const
 Get the language-plugin specific boolean option called option_name.
void SetCppIgnoreContextQualifiers (bool value)
bool GetCppIgnoreContextQualifiers () const

Static Public Attributes

static constexpr std::chrono::milliseconds default_timeout {500}
static constexpr ExecutionPolicy default_execution_policy

Private Member Functions

const StructuredData::DictionaryGetLanguageOptions () const
StructuredData::DictionaryGetLanguageOptions ()

Private Attributes

ExecutionPolicy m_execution_policy = default_execution_policy
SourceLanguage m_language
std::string m_prefix
bool m_coerce_to_id = false
bool m_unwind_on_error = true
bool m_ignore_breakpoints = false
bool m_keep_in_memory = false
bool m_try_others = true
bool m_stop_others = true
bool m_debug = false
bool m_trap_exceptions = true
bool m_repl = false
bool m_generate_debug_info = false
bool m_ansi_color_errors = false
bool m_suppress_persistent_result = false
bool m_auto_apply_fixits = true
uint64_t m_retries_with_fixits = 1
bool m_running_utility_expression = false
 True if the executed code should be treated as utility code that is only used by LLDB internally.
lldb::DynamicValueType m_use_dynamic = lldb::eNoDynamicValues
Timeout< std::micro > m_timeout = default_timeout
Timeout< std::micro > m_one_thread_timeout = std::nullopt
lldb::ExpressionCancelCallback m_cancel_callback = nullptr
void * m_cancel_callback_baton = nullptr
std::string m_pound_line_file
uint32_t m_pound_line_line = 0
StructuredData::DictionarySP m_language_options_sp = nullptr
 Dictionary mapping names of language-plugin specific options to values.
SymbolContextList m_preferred_lookup_contexts
 During expression evaluation, any SymbolContext in this list will be used for symbol/function lookup before any other context (except for the module corresponding to the current frame).

Detailed Description

Definition at line 326 of file Target.h.

Constructor & Destructor Documentation

◆ EvaluateExpressionOptions()

EvaluateExpressionOptions::EvaluateExpressionOptions ( )

Definition at line 5514 of file Target.cpp.

References m_language_options_sp, and SetCppIgnoreContextQualifiers().

Member Function Documentation

◆ DoesCoerceToId()

bool lldb_private::EvaluateExpressionOptions::DoesCoerceToId ( ) const
inline

Definition at line 373 of file Target.h.

References m_coerce_to_id.

Referenced by lldb_private::UserExpression::Evaluate().

◆ DoesIgnoreBreakpoints()

bool lldb_private::EvaluateExpressionOptions::DoesIgnoreBreakpoints ( ) const
inline

◆ DoesKeepInMemory()

bool lldb_private::EvaluateExpressionOptions::DoesKeepInMemory ( ) const
inline

Definition at line 398 of file Target.h.

References m_keep_in_memory.

◆ DoesUnwindOnError()

bool lldb_private::EvaluateExpressionOptions::DoesUnwindOnError ( ) const
inline

◆ GetAutoApplyFixIts()

bool lldb_private::EvaluateExpressionOptions::GetAutoApplyFixIts ( ) const
inline

Definition at line 490 of file Target.h.

References m_auto_apply_fixits.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetBooleanLanguageOption()

llvm::Expected< bool > EvaluateExpressionOptions::GetBooleanLanguageOption ( llvm::StringRef option_name) const

Get the language-plugin specific boolean option called option_name.

If the option doesn't exist or is not a boolean option, returns false. Otherwise returns the boolean value of the option.

Definition at line 5481 of file Target.cpp.

References GetLanguageOptions(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsBoolean(), and lldb_private::StructuredData::Dictionary::HasKey().

Referenced by GetCppIgnoreContextQualifiers().

◆ GetColorizeErrors()

bool lldb_private::EvaluateExpressionOptions::GetColorizeErrors ( ) const
inline

Definition at line 441 of file Target.h.

References m_ansi_color_errors.

◆ GetCppIgnoreContextQualifiers()

bool EvaluateExpressionOptions::GetCppIgnoreContextQualifiers ( ) const

◆ GetDebug()

bool lldb_private::EvaluateExpressionOptions::GetDebug ( ) const
inline

Definition at line 429 of file Target.h.

References m_debug.

Referenced by lldb_private::Process::RunThreadPlan().

◆ GetExecutionPolicy()

ExecutionPolicy lldb_private::EvaluateExpressionOptions::GetExecutionPolicy ( ) const
inline

Definition at line 346 of file Target.h.

References m_execution_policy.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetGenerateDebugInfo()

bool lldb_private::EvaluateExpressionOptions::GetGenerateDebugInfo ( ) const
inline

Definition at line 437 of file Target.h.

References m_generate_debug_info.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetLanguage()

SourceLanguage lldb_private::EvaluateExpressionOptions::GetLanguage ( ) const
inline

Definition at line 352 of file Target.h.

References m_language.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetLanguageOptions() [1/2]

StructuredData::Dictionary & EvaluateExpressionOptions::GetLanguageOptions ( )
private

Definition at line 5503 of file Target.cpp.

References m_language_options_sp.

◆ GetLanguageOptions() [2/2]

const StructuredData::Dictionary & EvaluateExpressionOptions::GetLanguageOptions ( ) const
private

Definition at line 5497 of file Target.cpp.

References m_language_options_sp.

Referenced by GetBooleanLanguageOption(), and SetBooleanLanguageOption().

◆ GetOneThreadTimeout()

const Timeout< std::micro > & lldb_private::EvaluateExpressionOptions::GetOneThreadTimeout ( ) const
inline

◆ GetPoundLineFilePath()

const char * lldb_private::EvaluateExpressionOptions::GetPoundLineFilePath ( ) const
inline

Definition at line 476 of file Target.h.

References m_pound_line_file.

◆ GetPoundLineLine()

uint32_t lldb_private::EvaluateExpressionOptions::GetPoundLineLine ( ) const
inline

Definition at line 480 of file Target.h.

References m_pound_line_line.

◆ GetPreferredSymbolContexts()

const SymbolContextList & lldb_private::EvaluateExpressionOptions::GetPreferredSymbolContexts ( ) const
inline

Definition at line 362 of file Target.h.

References m_preferred_lookup_contexts.

◆ GetPrefix()

const char * lldb_private::EvaluateExpressionOptions::GetPrefix ( ) const
inline

Definition at line 375 of file Target.h.

References m_prefix.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetREPLEnabled()

bool lldb_private::EvaluateExpressionOptions::GetREPLEnabled ( ) const
inline

Definition at line 449 of file Target.h.

References m_repl.

◆ GetRetriesWithFixIts()

uint64_t lldb_private::EvaluateExpressionOptions::GetRetriesWithFixIts ( ) const
inline

Definition at line 496 of file Target.h.

References m_retries_with_fixits.

Referenced by lldb_private::UserExpression::Evaluate().

◆ GetStopOthers()

bool lldb_private::EvaluateExpressionOptions::GetStopOthers ( ) const
inline

Definition at line 425 of file Target.h.

References m_stop_others.

Referenced by GetExpressionTimeout(), and lldb_private::Process::RunThreadPlan().

◆ GetSuppressPersistentResult()

bool lldb_private::EvaluateExpressionOptions::GetSuppressPersistentResult ( ) const
inline

Definition at line 484 of file Target.h.

References m_suppress_persistent_result.

Referenced by lldb_private::UserExpression::Execute().

◆ GetTimeout()

const Timeout< std::micro > & lldb_private::EvaluateExpressionOptions::GetTimeout ( ) const
inline

◆ GetTrapExceptions()

bool lldb_private::EvaluateExpressionOptions::GetTrapExceptions ( ) const
inline

Definition at line 445 of file Target.h.

References m_trap_exceptions.

◆ GetTryAllThreads()

bool lldb_private::EvaluateExpressionOptions::GetTryAllThreads ( ) const
inline

Definition at line 421 of file Target.h.

References m_try_others.

Referenced by GetExpressionTimeout(), and lldb_private::Process::RunThreadPlan().

◆ GetUseDynamic()

lldb::DynamicValueType lldb_private::EvaluateExpressionOptions::GetUseDynamic ( ) const
inline

Definition at line 402 of file Target.h.

References m_use_dynamic.

Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute().

◆ InvokeCancelCallback()

bool lldb_private::EvaluateExpressionOptions::InvokeCancelCallback ( lldb::ExpressionEvaluationPhase phase) const
inline

Definition at line 458 of file Target.h.

References m_cancel_callback, and m_cancel_callback_baton.

Referenced by lldb_private::UserExpression::Evaluate().

◆ IsForUtilityExpr()

bool lldb_private::EvaluateExpressionOptions::IsForUtilityExpr ( ) const
inline

Definition at line 498 of file Target.h.

References m_running_utility_expression.

Referenced by lldb_private::Process::RunThreadPlan().

◆ SetAutoApplyFixIts()

◆ SetBooleanLanguageOption()

llvm::Error EvaluateExpressionOptions::SetBooleanLanguageOption ( llvm::StringRef option_name,
bool value )

Set language-plugin specific option called option_name to the specified boolean value.

Definition at line 5464 of file Target.cpp.

References lldb::eStructuredDataTypeBoolean, and GetLanguageOptions().

Referenced by SetCppIgnoreContextQualifiers().

◆ SetCancelCallback()

void lldb_private::EvaluateExpressionOptions::SetCancelCallback ( lldb::ExpressionCancelCallback callback,
void * baton )
inline

Definition at line 453 of file Target.h.

References m_cancel_callback, and m_cancel_callback_baton.

◆ SetCoerceToId()

◆ SetColorizeErrors()

void lldb_private::EvaluateExpressionOptions::SetColorizeErrors ( bool b)
inline

Definition at line 443 of file Target.h.

References m_ansi_color_errors.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ SetCppIgnoreContextQualifiers()

void EvaluateExpressionOptions::SetCppIgnoreContextQualifiers ( bool value)

◆ SetDebug()

◆ SetExecutionPolicy()

◆ SetGenerateDebugInfo()

void lldb_private::EvaluateExpressionOptions::SetGenerateDebugInfo ( bool b)
inline

◆ SetIgnoreBreakpoints()

◆ SetIsForUtilityExpr()

◆ SetKeepInMemory()

◆ SetLanguage() [1/2]

◆ SetLanguage() [2/2]

void lldb_private::EvaluateExpressionOptions::SetLanguage ( uint16_t name,
uint32_t version )
inline

Set the language using a pair of language code and version as defined by the DWARF 6 specification.

WARNING: These codes may change until DWARF 6 is finalized.

Definition at line 369 of file Target.h.

References m_language.

◆ SetOneThreadTimeout()

void lldb_private::EvaluateExpressionOptions::SetOneThreadTimeout ( const Timeout< std::micro > & timeout)
inline

Definition at line 417 of file Target.h.

References m_one_thread_timeout.

◆ SetPoundLine()

void lldb_private::EvaluateExpressionOptions::SetPoundLine ( const char * path,
uint32_t line ) const
inline

Definition at line 466 of file Target.h.

References m_pound_line_file, and m_pound_line_line.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ SetPreferredSymbolContexts()

void lldb_private::EvaluateExpressionOptions::SetPreferredSymbolContexts ( SymbolContextList contexts)
inline

◆ SetPrefix()

◆ SetREPLEnabled()

void lldb_private::EvaluateExpressionOptions::SetREPLEnabled ( bool b)
inline

Definition at line 451 of file Target.h.

References m_repl.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ SetRetriesWithFixIts()

void lldb_private::EvaluateExpressionOptions::SetRetriesWithFixIts ( uint64_t number_of_retries)
inline

◆ SetStopOthers()

◆ SetSuppressPersistentResult()

void lldb_private::EvaluateExpressionOptions::SetSuppressPersistentResult ( bool b)
inline

◆ SetTimeout()

◆ SetTrapExceptions()

◆ SetTryAllThreads()

◆ SetUnwindOnError()

void lldb_private::EvaluateExpressionOptions::SetUnwindOnError ( bool unwind = false)
inline

◆ SetUseDynamic()

Member Data Documentation

◆ default_execution_policy

ExecutionPolicy lldb_private::EvaluateExpressionOptions::default_execution_policy
staticconstexpr

◆ default_timeout

std::chrono::milliseconds lldb_private::EvaluateExpressionOptions::default_timeout {500}
staticconstexpr

Definition at line 338 of file Target.h.

◆ m_ansi_color_errors

bool lldb_private::EvaluateExpressionOptions::m_ansi_color_errors = false
private

Definition at line 535 of file Target.h.

Referenced by GetColorizeErrors(), and SetColorizeErrors().

◆ m_auto_apply_fixits

bool lldb_private::EvaluateExpressionOptions::m_auto_apply_fixits = true
private

Definition at line 537 of file Target.h.

Referenced by GetAutoApplyFixIts(), and SetAutoApplyFixIts().

◆ m_cancel_callback

lldb::ExpressionCancelCallback lldb_private::EvaluateExpressionOptions::m_cancel_callback = nullptr
private

Definition at line 546 of file Target.h.

Referenced by InvokeCancelCallback(), and SetCancelCallback().

◆ m_cancel_callback_baton

void* lldb_private::EvaluateExpressionOptions::m_cancel_callback_baton = nullptr
private

Definition at line 547 of file Target.h.

Referenced by InvokeCancelCallback(), and SetCancelCallback().

◆ m_coerce_to_id

bool lldb_private::EvaluateExpressionOptions::m_coerce_to_id = false
private

Definition at line 525 of file Target.h.

Referenced by DoesCoerceToId(), and SetCoerceToId().

◆ m_debug

bool lldb_private::EvaluateExpressionOptions::m_debug = false
private

Definition at line 531 of file Target.h.

Referenced by GetDebug(), and SetDebug().

◆ m_execution_policy

ExecutionPolicy lldb_private::EvaluateExpressionOptions::m_execution_policy = default_execution_policy
private

Definition at line 522 of file Target.h.

Referenced by GetExecutionPolicy(), and SetExecutionPolicy().

◆ m_generate_debug_info

bool lldb_private::EvaluateExpressionOptions::m_generate_debug_info = false
private

Definition at line 534 of file Target.h.

Referenced by GetGenerateDebugInfo(), SetDebug(), and SetGenerateDebugInfo().

◆ m_ignore_breakpoints

bool lldb_private::EvaluateExpressionOptions::m_ignore_breakpoints = false
private

Definition at line 527 of file Target.h.

Referenced by DoesIgnoreBreakpoints(), and SetIgnoreBreakpoints().

◆ m_keep_in_memory

bool lldb_private::EvaluateExpressionOptions::m_keep_in_memory = false
private

Definition at line 528 of file Target.h.

Referenced by DoesKeepInMemory(), and SetKeepInMemory().

◆ m_language

SourceLanguage lldb_private::EvaluateExpressionOptions::m_language
private

Definition at line 523 of file Target.h.

Referenced by GetLanguage(), SetLanguage(), and SetLanguage().

◆ m_language_options_sp

StructuredData::DictionarySP lldb_private::EvaluateExpressionOptions::m_language_options_sp = nullptr
private

Dictionary mapping names of language-plugin specific options to values.

Definition at line 556 of file Target.h.

Referenced by EvaluateExpressionOptions(), GetLanguageOptions(), and GetLanguageOptions().

◆ m_one_thread_timeout

Timeout<std::micro> lldb_private::EvaluateExpressionOptions::m_one_thread_timeout = std::nullopt
private

Definition at line 545 of file Target.h.

Referenced by GetOneThreadTimeout(), and SetOneThreadTimeout().

◆ m_pound_line_file

std::string lldb_private::EvaluateExpressionOptions::m_pound_line_file
mutableprivate

Definition at line 551 of file Target.h.

Referenced by GetPoundLineFilePath(), and SetPoundLine().

◆ m_pound_line_line

uint32_t lldb_private::EvaluateExpressionOptions::m_pound_line_line = 0
mutableprivate

Definition at line 552 of file Target.h.

Referenced by GetPoundLineLine(), and SetPoundLine().

◆ m_preferred_lookup_contexts

SymbolContextList lldb_private::EvaluateExpressionOptions::m_preferred_lookup_contexts
private

During expression evaluation, any SymbolContext in this list will be used for symbol/function lookup before any other context (except for the module corresponding to the current frame).

Definition at line 561 of file Target.h.

Referenced by GetPreferredSymbolContexts(), and SetPreferredSymbolContexts().

◆ m_prefix

std::string lldb_private::EvaluateExpressionOptions::m_prefix
private

Definition at line 524 of file Target.h.

Referenced by GetPrefix(), and SetPrefix().

◆ m_repl

bool lldb_private::EvaluateExpressionOptions::m_repl = false
private

Definition at line 533 of file Target.h.

Referenced by GetREPLEnabled(), and SetREPLEnabled().

◆ m_retries_with_fixits

uint64_t lldb_private::EvaluateExpressionOptions::m_retries_with_fixits = 1
private

Definition at line 538 of file Target.h.

Referenced by GetRetriesWithFixIts(), and SetRetriesWithFixIts().

◆ m_running_utility_expression

bool lldb_private::EvaluateExpressionOptions::m_running_utility_expression = false
private

True if the executed code should be treated as utility code that is only used by LLDB internally.

Definition at line 541 of file Target.h.

Referenced by IsForUtilityExpr(), and SetIsForUtilityExpr().

◆ m_stop_others

bool lldb_private::EvaluateExpressionOptions::m_stop_others = true
private

Definition at line 530 of file Target.h.

Referenced by GetStopOthers(), and SetStopOthers().

◆ m_suppress_persistent_result

bool lldb_private::EvaluateExpressionOptions::m_suppress_persistent_result = false
private

Definition at line 536 of file Target.h.

Referenced by GetSuppressPersistentResult(), and SetSuppressPersistentResult().

◆ m_timeout

Timeout<std::micro> lldb_private::EvaluateExpressionOptions::m_timeout = default_timeout
private

Definition at line 544 of file Target.h.

Referenced by GetTimeout(), and SetTimeout().

◆ m_trap_exceptions

bool lldb_private::EvaluateExpressionOptions::m_trap_exceptions = true
private

Definition at line 532 of file Target.h.

Referenced by GetTrapExceptions(), and SetTrapExceptions().

◆ m_try_others

bool lldb_private::EvaluateExpressionOptions::m_try_others = true
private

Definition at line 529 of file Target.h.

Referenced by GetTryAllThreads(), and SetTryAllThreads().

◆ m_unwind_on_error

bool lldb_private::EvaluateExpressionOptions::m_unwind_on_error = true
private

Definition at line 526 of file Target.h.

Referenced by DoesUnwindOnError(), and SetUnwindOnError().

◆ m_use_dynamic

lldb::DynamicValueType lldb_private::EvaluateExpressionOptions::m_use_dynamic = lldb::eNoDynamicValues
private

Definition at line 543 of file Target.h.

Referenced by GetUseDynamic(), and SetUseDynamic().


The documentation for this class was generated from the following files: