public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix error messages from serial code
@ 2023-09-12 16:27 Tom Tromey
  2023-09-12 16:27 ` [PATCH 1/6] Fix latent bug in ser_windows_send_break Tom Tromey
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tom Tromey @ 2023-09-12 16:27 UTC (permalink / raw)
  To: gdb-patches

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>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-27 20:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 16:27 [PATCH 0/6] Fix error messages from serial code Tom Tromey
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

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).