]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/API/SBAttachInfo.h
Import LLDB as of upstream SVN 241361 (git 612c075f)
[FreeBSD/FreeBSD.git] / include / lldb / API / SBAttachInfo.h
1 //===-- SBAttachInfo.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_SBAttachInfo_h_
11 #define LLDB_SBAttachInfo_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 namespace lldb {
16
17 class SBTarget;
18
19 class LLDB_API SBAttachInfo
20 {
21 public:
22     SBAttachInfo ();
23
24     SBAttachInfo (lldb::pid_t pid);
25
26     SBAttachInfo (const char *path, bool wait_for);
27
28     SBAttachInfo (const SBAttachInfo &rhs);
29
30     ~SBAttachInfo();
31
32     SBAttachInfo &
33     operator = (const SBAttachInfo &rhs);
34
35     lldb::pid_t
36     GetProcessID ();
37
38     void
39     SetProcessID (lldb::pid_t pid);
40
41     void
42     SetExecutable (const char *path);
43
44     void
45     SetExecutable (lldb::SBFileSpec exe_file);
46
47     bool
48     GetWaitForLaunch ();
49
50     void
51     SetWaitForLaunch (bool b);
52
53     bool
54     GetIgnoreExisting ();
55
56     void
57     SetIgnoreExisting (bool b);
58
59     uint32_t
60     GetResumeCount ();
61
62     void
63     SetResumeCount (uint32_t c);
64
65     const char *
66     GetProcessPluginName ();
67
68     void
69     SetProcessPluginName (const char *plugin_name);
70
71     uint32_t
72     GetUserID();
73
74     uint32_t
75     GetGroupID();
76
77     bool
78     UserIDIsValid ();
79
80     bool
81     GroupIDIsValid ();
82
83     void
84     SetUserID (uint32_t uid);
85
86     void
87     SetGroupID (uint32_t gid);
88
89     uint32_t
90     GetEffectiveUserID();
91
92     uint32_t
93     GetEffectiveGroupID();
94
95     bool
96     EffectiveUserIDIsValid ();
97
98     bool
99     EffectiveGroupIDIsValid ();
100
101     void
102     SetEffectiveUserID (uint32_t uid);
103
104     void
105     SetEffectiveGroupID (uint32_t gid);
106
107     lldb::pid_t
108     GetParentProcessID ();
109
110     void
111     SetParentProcessID (lldb::pid_t pid);
112
113     bool
114     ParentProcessIDIsValid();
115
116     //----------------------------------------------------------------------
117     /// Get the listener that will be used to receive process events.
118     ///
119     /// If no listener has been set via a call to
120     /// SBLaunchInfo::SetListener(), then an invalid SBListener will be
121     /// returned (SBListener::IsValid() will return false). If a listener
122     /// has been set, then the valid listener object will be returned.
123     //----------------------------------------------------------------------
124     SBListener
125     GetListener ();
126
127     //----------------------------------------------------------------------
128     /// Set the listener that will be used to receive process events.
129     ///
130     /// By default the SBDebugger, which has a listener, that the SBTarget
131     /// belongs to will listen for the process events. Calling this function
132     /// allows a different listener to be used to listen for process events.
133     //----------------------------------------------------------------------
134     void
135     SetListener (SBListener &listener);
136
137
138 protected:
139     friend class SBTarget;
140
141     lldb_private::ProcessAttachInfo &
142     ref ();
143
144     ProcessAttachInfoSP m_opaque_sp;
145 };
146
147 } // namespace lldb
148
149 #endif  // LLDB_SBAttachInfo_h_