]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change serial_send_break and serial_write to throw
authorTom Tromey <tromey@adacore.com>
Wed, 6 Sep 2023 14:33:46 +0000 (08:33 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 27 Nov 2023 19:55:14 +0000 (12:55 -0700)
commitd69939bded50d76179f97284df35879a385cf8c0
tree965bb45900e7a4442d3ce67e551d5cafe73e8691
parenta2e0acea420cca881296c6fcf58920f3d7c05a45
Change serial_send_break and serial_write to throw

This changes serial_send_break and serial_write to throw exceptions
rather than attempt to set errno and return an error indicator.  This
lets us correctly report failures on Windows.

Both functions had to be converted in a single patch because one
implementation of send_break works via write.

This also introduces remote_serial_send_break to handle error checking
when attempting to send a break.  This was previously ignored.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30770
gdb/remote.c
gdb/ser-base.c
gdb/ser-base.h
gdb/ser-mingw.c
gdb/ser-tcp.c
gdb/ser-tcp.h
gdb/ser-uds.c
gdb/ser-unix.c
gdb/serial.c
gdb/serial.h