Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 1 | //===-- 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 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "A container for options to use when evaluating expressions." |
| 14 | ) SBExpressionOptions; |
| 15 | |
| 16 | class SBExpressionOptions |
| 17 | { |
| 18 | friend class SBFrame; |
| 19 | friend class SBValue; |
| 20 | |
| 21 | public: |
| 22 | SBExpressionOptions(); |
| 23 | |
| 24 | SBExpressionOptions (const lldb::SBExpressionOptions &rhs); |
| 25 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 26 | ~SBExpressionOptions(); |
| 27 | |
| 28 | bool |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 29 | GetCoerceResultToId () const; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 30 | |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 31 | %feature("docstring", "Sets whether to coerce the expression result to ObjC id type after evaluation.") SetCoerceResultToId; |
| 32 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 33 | void |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 34 | SetCoerceResultToId (bool coerce = true); |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 35 | |
| 36 | bool |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 37 | GetUnwindOnError () const; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 38 | |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 39 | %feature("docstring", "Sets whether to unwind the expression stack on error.") SetUnwindOnError; |
| 40 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 41 | void |
Jim Ingham | 89e248f | 2013-02-09 01:29:05 +0000 | [diff] [blame^] | 42 | SetUnwindOnError (bool unwind = true); |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 43 | |
Jim Ingham | b794020 | 2013-01-15 02:47:48 +0000 | [diff] [blame] | 44 | bool |
| 45 | GetIgnoreBreakpoints () const; |
| 46 | |
| 47 | %feature("docstring", "Sets whether to ignore breakpoint hits while running expressions.") SetUnwindOnError; |
| 48 | |
| 49 | void |
Jim Ingham | 89e248f | 2013-02-09 01:29:05 +0000 | [diff] [blame^] | 50 | SetIgnoreBreakpoints (bool ignore = true); |
Jim Ingham | b794020 | 2013-01-15 02:47:48 +0000 | [diff] [blame] | 51 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 52 | lldb::DynamicValueType |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 53 | GetFetchDynamicValue () const; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 54 | |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 55 | %feature("docstring", "Sets whether to cast the expression result to its dynamic type.") SetFetchDynamicValue; |
| 56 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 57 | void |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 58 | SetFetchDynamicValue (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget); |
| 59 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 60 | uint32_t |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 61 | GetTimeoutInMicroSeconds () const; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 62 | |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 63 | %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 Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 64 | void |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 65 | SetTimeoutInMicroSeconds (uint32_t timeout = 0); |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 66 | |
| 67 | bool |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 68 | GetTryAllThreads () const; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 69 | |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 70 | %feature("docstring", "Sets whether to run all threads if the expression does not complete on one thread.") SetTryAllThreads; |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 71 | void |
Greg Clayton | 75a443b | 2012-10-16 22:58:25 +0000 | [diff] [blame] | 72 | SetTryAllThreads (bool run_others = true); |
| 73 | |
Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame] | 74 | protected: |
| 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 | |
| 84 | private: |
| 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 |