1 //===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBExpressionOptions_h_
11 #define LLDB_SBExpressionOptions_h_
13 #include "lldb/API/SBDefines.h"
19 class LLDB_API SBExpressionOptions {
21 SBExpressionOptions();
23 SBExpressionOptions(const lldb::SBExpressionOptions &rhs);
25 ~SBExpressionOptions();
27 const SBExpressionOptions &operator=(const lldb::SBExpressionOptions &rhs);
29 bool GetCoerceResultToId() const;
31 void SetCoerceResultToId(bool coerce = true);
33 bool GetUnwindOnError() const;
35 void SetUnwindOnError(bool unwind = true);
37 bool GetIgnoreBreakpoints() const;
39 void SetIgnoreBreakpoints(bool ignore = true);
41 lldb::DynamicValueType GetFetchDynamicValue() const;
43 void SetFetchDynamicValue(
44 lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget);
46 uint32_t GetTimeoutInMicroSeconds() const;
48 // Set the timeout for the expression, 0 means wait forever.
49 void SetTimeoutInMicroSeconds(uint32_t timeout = 0);
51 uint32_t GetOneThreadTimeoutInMicroSeconds() const;
53 // Set the timeout for running on one thread, 0 means use the default
54 // behavior. If you set this higher than the overall timeout, you'll get an
55 // error when you try to run the expression.
56 void SetOneThreadTimeoutInMicroSeconds(uint32_t timeout = 0);
58 bool GetTryAllThreads() const;
60 void SetTryAllThreads(bool run_others = true);
62 bool GetStopOthers() const;
64 void SetStopOthers(bool stop_others = true);
66 bool GetTrapExceptions() const;
68 void SetTrapExceptions(bool trap_exceptions = true);
70 void SetLanguage(lldb::LanguageType language);
72 void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton);
74 bool GetGenerateDebugInfo();
76 void SetGenerateDebugInfo(bool b = true);
78 bool GetSuppressPersistentResult();
80 void SetSuppressPersistentResult(bool b = false);
82 const char *GetPrefix() const;
84 void SetPrefix(const char *prefix);
86 void SetAutoApplyFixIts(bool b = true);
88 bool GetAutoApplyFixIts();
92 void SetTopLevel(bool b = true);
96 lldb_private::EvaluateExpressionOptions &expression_options);
98 lldb_private::EvaluateExpressionOptions *get() const;
100 lldb_private::EvaluateExpressionOptions &ref() const;
102 friend class SBFrame;
103 friend class SBValue;
104 friend class SBTarget;
107 // This auto_pointer is made in the constructor and is always valid.
108 mutable std::unique_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
113 #endif // LLDB_SBExpressionOptions_h_