LLDB mainline
PseudoConsole.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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#ifndef LIBLLDB_HOST_WINDOWS_PSEUDOCONSOLE_H_
10#define LIBLLDB_HOST_WINDOWS_PSEUDOCONSOLE_H_
11
12#include "llvm/Support/Error.h"
13#include <string>
14
15#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x20016
16typedef void *HANDLE;
17typedef void *HPCON;
18
19namespace lldb_private {
20
22
23public:
24 llvm::Error OpenPseudoConsole();
25
26 /// Close the ConPTY, its read/write handles and invalidate them.
27 void Close();
28
29 /// The ConPTY HPCON handle accessor.
30 ///
31 /// This object retains ownership of the HPCON when this accessor is used.
32 ///
33 /// \return
34 /// The ConPTY HPCON handle, or INVALID_HANDLE_VALUE if it is currently
35 /// invalid.
37
38 /// The STDOUT read HANDLE accessor.
39 ///
40 /// This object retains ownership of the HANDLE when this accessor is used.
41 ///
42 /// \return
43 /// The STDOUT read HANDLE, or INVALID_HANDLE_VALUE if it is currently
44 /// invalid.
46
47 /// The STDIN write HANDLE accessor.
48 ///
49 /// This object retains ownership of the HANDLE when this accessor is used.
50 ///
51 /// \return
52 /// The STDIN write HANDLE, or INVALID_HANDLE_VALUE if it is currently
53 /// invalid.
55
56protected:
57 HANDLE m_conpty_handle = ((HANDLE)(long long)-1);
58 HANDLE m_conpty_output = ((HANDLE)(long long)-1);
59 HANDLE m_conpty_input = ((HANDLE)(long long)-1);
60};
61}; // namespace lldb_private
62
63#endif // LIBLLDB_HOST_WINDOWS_PSEUDOCONSOLE_H_
void * HPCON
void * HANDLE
HANDLE GetSTDOUTHandle() const
The STDOUT read HANDLE accessor.
void Close()
Close the ConPTY, its read/write handles and invalidate them.
HPCON GetPseudoTerminalHandle()
The ConPTY HPCON handle accessor.
HANDLE GetSTDINHandle() const
The STDIN write HANDLE accessor.
A class that represents a running process on the host machine.