LLDB mainline
lldb_private::EvaluateExpressionOptions Class Reference

#include <Target.h>

Public Member Functions

 EvaluateExpressionOptions ()=default
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)

Static Public Attributes

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

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
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 307 of file Target.h.

Constructor & Destructor Documentation

◆ EvaluateExpressionOptions()

lldb_private::EvaluateExpressionOptions::EvaluateExpressionOptions ( )
default

Member Function Documentation

◆ DoesCoerceToId()

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

Definition at line 354 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 379 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 471 of file Target.h.

References m_auto_apply_fixits.

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

◆ GetColorizeErrors()

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

Definition at line 422 of file Target.h.

References m_ansi_color_errors.

◆ GetDebug()

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

Definition at line 410 of file Target.h.

References m_debug.

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

◆ GetExecutionPolicy()

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

Definition at line 327 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 418 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 333 of file Target.h.

References m_language.

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

◆ GetOneThreadTimeout()

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

◆ GetPoundLineFilePath()

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

Definition at line 457 of file Target.h.

References m_pound_line_file.

◆ GetPoundLineLine()

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

Definition at line 461 of file Target.h.

References m_pound_line_line.

◆ GetPreferredSymbolContexts()

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

Definition at line 343 of file Target.h.

References m_preferred_lookup_contexts.

◆ GetPrefix()

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

Definition at line 356 of file Target.h.

References m_prefix.

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

◆ GetREPLEnabled()

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

Definition at line 430 of file Target.h.

References m_repl.

◆ GetRetriesWithFixIts()

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

Definition at line 477 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 406 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 465 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 426 of file Target.h.

References m_trap_exceptions.

◆ GetTryAllThreads()

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

Definition at line 402 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 383 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 439 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 479 of file Target.h.

References m_running_utility_expression.

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

◆ SetAutoApplyFixIts()

◆ SetCancelCallback()

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

Definition at line 434 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 424 of file Target.h.

References m_ansi_color_errors.

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

◆ 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 350 of file Target.h.

References m_language.

◆ SetOneThreadTimeout()

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

Definition at line 398 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 447 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 432 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 EvaluateExpressionOptions::default_timeout {500}
staticconstexpr

Definition at line 317 of file Target.h.

◆ m_ansi_color_errors

bool lldb_private::EvaluateExpressionOptions::m_ansi_color_errors = false
private

Definition at line 497 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 499 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 508 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 509 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 487 of file Target.h.

Referenced by DoesCoerceToId(), and SetCoerceToId().

◆ m_debug

bool lldb_private::EvaluateExpressionOptions::m_debug = false
private

Definition at line 493 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 484 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 496 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 489 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 490 of file Target.h.

Referenced by DoesKeepInMemory(), and SetKeepInMemory().

◆ m_language

SourceLanguage lldb_private::EvaluateExpressionOptions::m_language
private

Definition at line 485 of file Target.h.

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

◆ m_one_thread_timeout

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

Definition at line 507 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 513 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 514 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 519 of file Target.h.

Referenced by GetPreferredSymbolContexts(), and SetPreferredSymbolContexts().

◆ m_prefix

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

Definition at line 486 of file Target.h.

Referenced by GetPrefix(), and SetPrefix().

◆ m_repl

bool lldb_private::EvaluateExpressionOptions::m_repl = false
private

Definition at line 495 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 500 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 503 of file Target.h.

Referenced by IsForUtilityExpr(), and SetIsForUtilityExpr().

◆ m_stop_others

bool lldb_private::EvaluateExpressionOptions::m_stop_others = true
private

Definition at line 492 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 498 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 506 of file Target.h.

Referenced by GetTimeout(), and SetTimeout().

◆ m_trap_exceptions

bool lldb_private::EvaluateExpressionOptions::m_trap_exceptions = true
private

Definition at line 494 of file Target.h.

Referenced by GetTrapExceptions(), and SetTrapExceptions().

◆ m_try_others

bool lldb_private::EvaluateExpressionOptions::m_try_others = true
private

Definition at line 491 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 488 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 505 of file Target.h.

Referenced by GetUseDynamic(), and SetUseDynamic().


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