public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/6] Fix error messages from serial code
Date: Tue, 12 Sep 2023 10:27:47 -0600	[thread overview]
Message-ID: <20230912-serial-exceptions-v1-0-af5097485390@adacore.com> (raw)

Internal AdaCore testing on a Windows host with a target running on
qemu revealed that remote.c could sometimes display random error
messages.  For example, different runs of the same test might display:

    Remote communication error.  Target disconnected.: Arg list too long.
    Remote communication error.  Target disconnected.: No error.
    Remote communication error.  Target disconnected.: Not a directory.

I looked into this and this series is the result.  It's hard to be
sure that this completely solves the problem -- there are a lot of
code paths and the errors aren't very reproducible -- but it helps.

Regression tested using native-extended-gdbserver on x86-64 Fedora 36.

---
Tom Tromey (6):
      Fix latent bug in ser_windows_send_break
      Introduce throw_winerror_with_name
      Change serial_setbaudrate to throw exception
      Change serial "open" functions to throw exception
      Change serial_send_break and serial_write to throw
      Change serial_readchar to throw

 gdb/nat/windows-nat.c  |   6 +--
 gdb/remote.c           | 106 +++++++++++++++++++++++++++----------------------
 gdb/ser-base.c         |  12 +++---
 gdb/ser-base.h         |   6 +--
 gdb/ser-event.c        |   4 +-
 gdb/ser-mingw.c        |  86 ++++++++++++++++++---------------------
 gdb/ser-pipe.c         |  12 +++---
 gdb/ser-tcp.c          |  93 ++++++++++++++++++++++++-------------------
 gdb/ser-tcp.h          |   4 +-
 gdb/ser-uds.c          |  36 ++++++++---------
 gdb/ser-unix.c         |  57 ++++++++++++--------------
 gdb/serial.c           |  44 ++++++++------------
 gdb/serial.h           |  22 +++++-----
 gdb/windows-nat.c      |  31 +++++++++------
 gdbserver/win32-low.cc |  11 +++--
 gdbsupport/errors.cc   |   8 ++++
 gdbsupport/errors.h    |   7 ++++
 17 files changed, 279 insertions(+), 266 deletions(-)
---
base-commit: d1722abe60ca7c330210aa97c8ec52ff98644206
change-id: 20230912-serial-exceptions-07104644e711

Best regards,
-- 
Tom Tromey <tromey@adacore.com>


             reply	other threads:[~2023-09-12 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 16:27 Tom Tromey [this message]
2023-09-12 16:27 ` [PATCH 1/6] Fix latent bug in ser_windows_send_break Tom Tromey
2023-09-12 16:27 ` [PATCH 2/6] Introduce throw_winerror_with_name Tom Tromey
2023-09-12 16:27 ` [PATCH 3/6] Change serial_setbaudrate to throw exception Tom Tromey
2023-09-12 16:27 ` [PATCH 4/6] Change serial "open" functions " Tom Tromey
2023-09-12 16:27 ` [PATCH 5/6] Change serial_send_break and serial_write to throw Tom Tromey
2023-09-12 16:27 ` [PATCH 6/6] Change serial_readchar " Tom Tromey
2023-11-27 20:13 ` [PATCH 0/6] Fix error messages from serial code Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230912-serial-exceptions-v1-0-af5097485390@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).