1 //===-- SWIG Interface for SBLaunchInfo--------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 namespace lldb {
10 
11 class SBLaunchInfo
12 {
13 public:
14     SBLaunchInfo (const char **argv);
15 
16     pid_t
17     GetProcessID();
18 
19     uint32_t
20     GetUserID();
21 
22     uint32_t
23     GetGroupID();
24 
25     bool
26     UserIDIsValid ();
27 
28     bool
29     GroupIDIsValid ();
30 
31     void
32     SetUserID (uint32_t uid);
33 
34     void
35     SetGroupID (uint32_t gid);
36 
37     lldb::SBFileSpec
38     GetExecutableFile ();
39 
40     void
41     SetExecutableFile (lldb::SBFileSpec exe_file, bool add_as_first_arg);
42 
43     lldb::SBListener
44     GetListener ();
45 
46     void
47     SetListener (lldb::SBListener &listener);
48 
49     uint32_t
50     GetNumArguments ();
51 
52     const char *
53     GetArgumentAtIndex (uint32_t idx);
54 
55     void
56     SetArguments (const char **argv, bool append);
57 
58     uint32_t
59     GetNumEnvironmentEntries ();
60 
61     const char *
62     GetEnvironmentEntryAtIndex (uint32_t idx);
63 
64     void
65     SetEnvironmentEntries (const char **envp, bool append);
66 
67     void
68     Clear ();
69 
70     const char *
71     GetWorkingDirectory () const;
72 
73     void
74     SetWorkingDirectory (const char *working_dir);
75 
76     uint32_t
77     GetLaunchFlags ();
78 
79     void
80     SetLaunchFlags (uint32_t flags);
81 
82     const char *
83     GetProcessPluginName ();
84 
85     void
86     SetProcessPluginName (const char *plugin_name);
87 
88     const char *
89     GetShell ();
90 
91     void
92     SetShell (const char * path);
93 
94     bool
95     GetShellExpandArguments ();
96 
97     void
98     SetShellExpandArguments (bool expand);
99 
100     uint32_t
101     GetResumeCount ();
102 
103     void
104     SetResumeCount (uint32_t c);
105 
106     bool
107     AddCloseFileAction (int fd);
108 
109     bool
110     AddDuplicateFileAction (int fd, int dup_fd);
111 
112     bool
113     AddOpenFileAction (int fd, const char *path, bool read, bool write);
114 
115     bool
116     AddSuppressFileAction (int fd, bool read, bool write);
117 
118     void
119     SetLaunchEventData (const char *data);
120 
121     const char *
122     GetLaunchEventData () const;
123 
124     bool
125     GetDetachOnError() const;
126 
127     void
128     SetDetachOnError(bool enable);
129 };
130 
131 } // namespace lldb
132