================
@@ -993,6 +996,27 @@ class IOHandlerProcessSTDIOWindows : public IOHandler {
case WAIT_FAILED:
goto exit_loop;
case WAIT_OBJECT_0: {
+ if (isConsole) {
+ while (true) {
+ INPUT_RECORD inputRecord;
+ DWORD numRead = 0;
+ if (!PeekConsoleInput(hStdin, &inputRecord, 1, &numRead) ||
+ numRead == 0)
+ goto exit_loop;
----------------
Nerixyz wrote:
If `PeekConsoleInput` succeeds but `numRead` is 0, then we need to continue the
outer loop instead of exiting.
I tested this with the following program:
```cpp
#include <iostream>
int main() {
std::string s;
std::cin >> s;
return 0;
}
```
And running
```sh
b main
r
# *breakpoint hit*
b test.cpp:6 # at return 0;
c
# this should not show the lldb prompt until the breakpoint is hit
# *breakpoint hit*
c
```
https://github.com/llvm/llvm-project/pull/175812
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits