summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBExpressionOptions.i
blob: fa58fe36896aac4ab22690908d4d7cf0b1f90562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//===-- SWIG interface for SBExpressionOptions -----------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

namespace lldb {

%feature("docstring",
"A container for options to use when evaluating expressions."
) SBExpressionOptions;

class SBExpressionOptions
{
friend class SBFrame;
friend class SBValue;

public:
    SBExpressionOptions();

    SBExpressionOptions (const lldb::SBExpressionOptions &rhs);
    
    SBExpressionOptions (bool coerce_to_id,
                         bool unwind_on_error,
                         bool keep_in_memory,
                         bool run_others,
                         DynamicValueType use_dynamic,
                         uint32_t timeout_usec);

    ~SBExpressionOptions();

    bool
    DoesCoerceToId () const;
    
    %feature("docstring",
    "Sets whether to coerce the expression result to ObjC id type after evaluation."
    ) SetCoerceToId;
    void
    SetCoerceToId (bool coerce = true);
    
    bool
    DoesUnwindOnError () const;
    
    %feature("docstring",
    "Sets whether to unwind the expression stack on error."
    ) SetUnwindOnError;
    void
    SetUnwindOnError (bool unwind = false);
    
    bool
    DoesKeepInMemory () const;
    
    %feature("docstring",
    "Sets whether to keep the expression result in the target program's memory - forced to true when creating SBValues."
    ) SetKeepInMemory;
    void
    SetKeepInMemory (bool keep = true);

    lldb::DynamicValueType
    GetUseDynamic () const;
    
    %feature("docstring",
    "Sets whether to cast the expression result to its dynamic type."
    ) SetUseDynamic;
    void
    SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget);
    
    uint32_t
    GetTimeoutUsec () const;
    
    %feature("docstring",
    "Sets the duration we will wait before cancelling expression evaluation.  0 means wait forever."
    ) SetTimeoutUsec;
    void
    SetTimeoutUsec (uint32_t timeout = 0);
    
    bool
    GetRunOthers () const;
    
    %feature("docstring",
    "Sets whether to run all threads if the expression does not complete on one thread."
    ) SetRunOthers;
    void
    SetRunOthers (bool run_others = true);

protected:

    SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options);

    lldb_private::EvaluateExpressionOptions *
    get () const;

    lldb_private::EvaluateExpressionOptions &
    ref () const;

private:
    // This auto_pointer is made in the constructor and is always valid.
    mutable std::auto_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
};

} // namespace lldb
OpenPOWER on IntegriCloud