]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h
Update LLDB snapshot to upstream r241361
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBExpressionOptions.h
1 //===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLDB_SBExpressionOptions_h_
11 #define LLDB_SBExpressionOptions_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 #include <vector>
16
17 namespace lldb {
18
19
20 class LLDB_API SBExpressionOptions
21 {
22 public:
23     SBExpressionOptions();
24
25     SBExpressionOptions (const lldb::SBExpressionOptions &rhs);
26     
27     ~SBExpressionOptions();
28
29     const SBExpressionOptions &
30     operator = (const lldb::SBExpressionOptions &rhs);
31
32     bool
33     GetCoerceResultToId () const;
34     
35     void
36     SetCoerceResultToId (bool coerce = true);
37     
38     bool
39     GetUnwindOnError () const;
40     
41     void
42     SetUnwindOnError (bool unwind = true);
43     
44     bool
45     GetIgnoreBreakpoints () const;
46     
47     void
48     SetIgnoreBreakpoints (bool ignore = true);
49     
50     lldb::DynamicValueType
51     GetFetchDynamicValue () const;
52     
53     void
54     SetFetchDynamicValue (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget);
55     
56     uint32_t
57     GetTimeoutInMicroSeconds () const;
58     
59     // Set the timeout for the expression, 0 means wait forever.
60     void
61     SetTimeoutInMicroSeconds (uint32_t timeout = 0);
62     
63     uint32_t
64     GetOneThreadTimeoutInMicroSeconds () const;
65     
66     // Set the timeout for running on one thread, 0 means use the default behavior.
67     // If you set this higher than the overall timeout, you'll get an error when you
68     // try to run the expression.
69     void
70     SetOneThreadTimeoutInMicroSeconds (uint32_t timeout = 0);
71     
72     bool
73     GetTryAllThreads () const;
74     
75     void
76     SetTryAllThreads (bool run_others = true);
77     
78     bool
79     GetStopOthers() const;
80     
81     void
82     SetStopOthers(bool stop_others = true);
83
84     bool
85     GetTrapExceptions () const;
86     
87     void
88     SetTrapExceptions (bool trap_exceptions = true);
89     
90     void
91     SetLanguage (lldb::LanguageType language);
92
93     void
94     SetCancelCallback (lldb::ExpressionCancelCallback callback, void *baton);
95
96     bool
97     GetGenerateDebugInfo ();
98     
99     void
100     SetGenerateDebugInfo (bool b = true);
101     
102     bool
103     GetSuppressPersistentResult ();
104     
105     void
106     SetSuppressPersistentResult (bool b = false);
107
108     const char *
109     GetPrefix () const;
110
111     void
112     SetPrefix (const char *prefix);
113
114 protected:
115
116     SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options);
117
118     lldb_private::EvaluateExpressionOptions *
119     get () const;
120
121     lldb_private::EvaluateExpressionOptions &
122     ref () const;
123
124     friend class SBFrame;
125     friend class SBValue;
126     friend class SBTarget;
127
128 private:
129     // This auto_pointer is made in the constructor and is always valid.
130     mutable std::unique_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
131 };
132
133 } // namespace lldb
134
135 #endif  // LLDB_SBExpressionOptions_h_