X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fser-mingw.c;h=afe04102e1554ec734b7fe18c73a7b231ce224d9;hb=9cca177baec32a1ed1422a87a1f57cda2d2eb21a;hp=0bf791bb3ec85378322e741fac947a90b3ea1e18;hpb=42a4f53d2bf8938c2aeda9f52be7a20534b214a9;p=binutils-gdb.git diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c index 0bf791bb3ec..afe04102e15 100644 --- a/gdb/ser-mingw.c +++ b/gdb/ser-mingw.c @@ -1,6 +1,6 @@ /* Serial interface for local (hardwired) serial ports on Windows systems - Copyright (C) 2006-2019 Free Software Foundation, Inc. + Copyright (C) 2006-2022 Free Software Foundation, Inc. This file is part of GDB. @@ -30,6 +30,7 @@ #include #include "command.h" +#include "gdbsupport/buildargv.h" struct ser_windows_state { @@ -599,6 +600,11 @@ console_select_thread (void *arg) break; } } + else if (record.EventType == MOUSE_EVENT) + { + SetEvent (state->read_event); + break; + } /* Otherwise discard it and wait again. */ ReadConsoleInput (h, &record, 1, &n_records); @@ -881,21 +887,21 @@ pipe_windows_open (struct serial *scb, const char *name) const char *err_msg = pex_run (ps->pex, PEX_SEARCH | PEX_BINARY_INPUT | PEX_BINARY_OUTPUT | PEX_STDERR_TO_PIPE, - argv[0], argv.get (), NULL, NULL, - &err); + argv[0], argv.get (), NULL, NULL, + &err); if (err_msg) { - /* Our caller expects us to return -1, but all they'll do with - it generally is print the message based on errno. We have - all the same information here, plus err_msg provided by - pex_run, so we just raise the error here. */ - if (err) - error (_("error starting child process '%s': %s: %s"), - name, err_msg, safe_strerror (err)); - else - error (_("error starting child process '%s': %s"), - name, err_msg); + /* Our caller expects us to return -1, but all they'll do with + it generally is print the message based on errno. We have + all the same information here, plus err_msg provided by + pex_run, so we just raise the error here. */ + if (err) + error (_("error starting child process '%s': %s: %s"), + name, err_msg, safe_strerror (err)); + else + error (_("error starting child process '%s': %s"), + name, err_msg); } } @@ -1338,8 +1344,9 @@ static const struct serial_ops tcp_ops = net_windows_done_wait_handle }; +void _initialize_ser_windows (); void -_initialize_ser_windows (void) +_initialize_ser_windows () { WSADATA wsa_data;