aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-01 12:11:37 -0600
committerTom Tromey <tromey@adacore.com>2023-11-27 12:55:14 -0700
commita2e0acea420cca881296c6fcf58920f3d7c05a45 (patch)
tree54f369a7b5a2ead36e15f14e2d0d154a30286fab /gdb/remote.c
parentad3cf8c64e6e4794fc48d28c90f20cbbfdc51ca4 (diff)
downloadgdb-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.c2
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)
{