diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-01 12:11:37 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-11-27 12:55:14 -0700 |
commit | a2e0acea420cca881296c6fcf58920f3d7c05a45 (patch) | |
tree | 54f369a7b5a2ead36e15f14e2d0d154a30286fab /gdb/remote.c | |
parent | ad3cf8c64e6e4794fc48d28c90f20cbbfdc51ca4 (diff) | |
download | gdb-a2e0acea420cca881296c6fcf58920f3d7c05a45.zip gdb-a2e0acea420cca881296c6fcf58920f3d7c05a45.tar.gz gdb-a2e0acea420cca881296c6fcf58920f3d7c05a45.tar.bz2 |
Change serial "open" functions to throw exception
remote.c assumes that a failure to open the serial connection will set
errno. This is somewhat true, because the Windows code tries to set
errno appropriately -- but only somewhat, because it isn't clear that
the "pex" code sets it, and the tcp code seems to do the wrong thing.
It seems better to simply have the serial open functions throw on
error.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30770
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 00c84f1..03ebcc6 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6077,8 +6077,6 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p) rs->wait_forever_enabled_p = true; rs->remote_desc = remote_serial_open (name); - if (!rs->remote_desc) - perror_with_name (name); if (baud_rate != -1) { |