public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug remote/30770] serial.c does not preserve errno correctly Date: Mon, 27 Nov 2023 20:14:25 +0000 [thread overview] Message-ID: <bug-30770-4717-NUaeRF7Zgj@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30770-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30770 --- Comment #7 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ad3cf8c64e6e4794fc48d28c90f20cbbfdc51ca4 commit ad3cf8c64e6e4794fc48d28c90f20cbbfdc51ca4 Author: Tom Tromey <tromey@adacore.com> Date: Tue Aug 29 07:20:22 2023 -0600 Change serial_setbaudrate to throw exception remote.c has this code: if (serial_setbaudrate (rs->remote_desc, baud_rate)) { /* The requested speed could not be set. Error out to top level after closing remote_desc. Take care to set remote_desc to NULL to avoid closing remote_desc more than once. */ serial_close (rs->remote_desc); rs->remote_desc = NULL; perror_with_name (name); The perror here cannot be correct, because if serial_setbaudrate did set errno, it may be obscured by serial_close. This patch changes serial_setbaudrate to throw an exception instead. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30770 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-11-27 20:14 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-16 14:11 [Bug remote/30770] New: " tromey at sourceware dot org 2023-08-29 12:53 ` [Bug remote/30770] " tromey at sourceware dot org 2023-08-29 13:48 ` tromey at sourceware dot org 2023-08-31 13:20 ` tromey at sourceware dot org 2023-09-12 16:27 ` tromey at sourceware dot org 2023-09-12 16:28 ` tromey at sourceware dot org 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org [this message] 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org 2023-11-27 20:14 ` cvs-commit at gcc dot gnu.org 2023-11-27 23:29 ` tromey at sourceware dot org 2024-01-19 18:10 ` cvs-commit at gcc dot gnu.org
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=bug-30770-4717-NUaeRF7Zgj@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).