Files
binutils-gdb/gdb/cli
Tom de Vries 658a03e9e8 [gdbsupport] Add gdb::{waitpid,read,write,close}
We have gdb::handle_eintr, which allows us to rewrite:
...
  ssize_t ret;
    do
      {
        errno = 0;
        ret = ::write (pipe[1], "+", 1);
      }
    while (ret == -1 && errno == EINTR);
...
into:
...
  ssize_t ret = gdb::handle_eintr (-1, ::write, pipe[1], "+", 1);
...

However, the call to write got a bit mangled, requiring effort to decode it
back to its original form.

Instead, add a new function gdb::write that allows us to write:
...
  ssize_t ret = gdb::write (pipe[1], "+", 1);
...

Likewise for waitpid, read and close.

Tested on x86_64-linux.
2024-11-22 17:44:29 +01:00
..
2024-05-17 10:01:13 -06:00
2024-11-04 15:56:01 +00:00
2024-09-30 13:23:35 -06:00
2024-09-30 13:23:35 -06:00
2024-11-11 07:44:27 -07:00