blob: 1f11862b36219f6bee1005c4114472a577041d6a [file] [log] [blame]
Jim Ingham47beabb2012-10-16 21:41:58 +00001//===-- SWIG interface for SBExpressionOptions -----------------------------------------------*- 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
10namespace lldb {
11
12%feature("docstring",
13"A container for options to use when evaluating expressions."
14) SBExpressionOptions;
15
16class SBExpressionOptions
17{
18friend class SBFrame;
19friend class SBValue;
20
21public:
22 SBExpressionOptions();
23
24 SBExpressionOptions (const lldb::SBExpressionOptions &rhs);
25
Jim Ingham47beabb2012-10-16 21:41:58 +000026 ~SBExpressionOptions();
27
28 bool
Greg Clayton75a443b2012-10-16 22:58:25 +000029 GetCoerceResultToId () const;
Jim Ingham47beabb2012-10-16 21:41:58 +000030
Greg Clayton75a443b2012-10-16 22:58:25 +000031 %feature("docstring", "Sets whether to coerce the expression result to ObjC id type after evaluation.") SetCoerceResultToId;
32
Jim Ingham47beabb2012-10-16 21:41:58 +000033 void
Greg Clayton75a443b2012-10-16 22:58:25 +000034 SetCoerceResultToId (bool coerce = true);
Jim Ingham47beabb2012-10-16 21:41:58 +000035
36 bool
Greg Clayton75a443b2012-10-16 22:58:25 +000037 GetUnwindOnError () const;
Jim Ingham47beabb2012-10-16 21:41:58 +000038
Greg Clayton75a443b2012-10-16 22:58:25 +000039 %feature("docstring", "Sets whether to unwind the expression stack on error.") SetUnwindOnError;
40
Jim Ingham47beabb2012-10-16 21:41:58 +000041 void
Jim Ingham89e248f2013-02-09 01:29:05 +000042 SetUnwindOnError (bool unwind = true);
Jim Ingham47beabb2012-10-16 21:41:58 +000043
Jim Inghamb7940202013-01-15 02:47:48 +000044 bool
45 GetIgnoreBreakpoints () const;
46
47 %feature("docstring", "Sets whether to ignore breakpoint hits while running expressions.") SetUnwindOnError;
48
49 void
Jim Ingham89e248f2013-02-09 01:29:05 +000050 SetIgnoreBreakpoints (bool ignore = true);
Jim Inghamb7940202013-01-15 02:47:48 +000051
Jim Ingham47beabb2012-10-16 21:41:58 +000052 lldb::DynamicValueType
Greg Clayton75a443b2012-10-16 22:58:25 +000053 GetFetchDynamicValue () const;
Jim Ingham47beabb2012-10-16 21:41:58 +000054
Greg Clayton75a443b2012-10-16 22:58:25 +000055 %feature("docstring", "Sets whether to cast the expression result to its dynamic type.") SetFetchDynamicValue;
56
Jim Ingham47beabb2012-10-16 21:41:58 +000057 void
Greg Clayton75a443b2012-10-16 22:58:25 +000058 SetFetchDynamicValue (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget);
59
Jim Ingham47beabb2012-10-16 21:41:58 +000060 uint32_t
Greg Clayton75a443b2012-10-16 22:58:25 +000061 GetTimeoutInMicroSeconds () const;
Jim Ingham47beabb2012-10-16 21:41:58 +000062
Greg Clayton75a443b2012-10-16 22:58:25 +000063 %feature("docstring", "Sets the timeout in microseconds to run the expression for. If try all threads is set to true and the expression doesn't complete within the specified timeout, all threads will be resumed for the same timeout to see if the expresson will finish.") SetTimeoutInMicroSeconds;
Jim Ingham47beabb2012-10-16 21:41:58 +000064 void
Greg Clayton75a443b2012-10-16 22:58:25 +000065 SetTimeoutInMicroSeconds (uint32_t timeout = 0);
Jim Ingham47beabb2012-10-16 21:41:58 +000066
67 bool
Greg Clayton75a443b2012-10-16 22:58:25 +000068 GetTryAllThreads () const;
Jim Ingham47beabb2012-10-16 21:41:58 +000069
Greg Clayton75a443b2012-10-16 22:58:25 +000070 %feature("docstring", "Sets whether to run all threads if the expression does not complete on one thread.") SetTryAllThreads;
Jim Ingham47beabb2012-10-16 21:41:58 +000071 void
Greg Clayton75a443b2012-10-16 22:58:25 +000072 SetTryAllThreads (bool run_others = true);
73
Jim Ingham47beabb2012-10-16 21:41:58 +000074protected:
75
76 SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options);
77
78 lldb_private::EvaluateExpressionOptions *
79 get () const;
80
81 lldb_private::EvaluateExpressionOptions &
82 ref () const;
83
84private:
85 // This auto_pointer is made in the constructor and is always valid.
86 mutable std::auto_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
87};
88
89} // namespace lldb