From patchwork Wed Aug 6 15:58:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 2327 Received: (qmail 18644 invoked by alias); 6 Aug 2014 15:58:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 18537 invoked by uid 89); 6 Aug 2014 15:58:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Aug 2014 15:58:13 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s76FwBkj023418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 11:58:11 -0400 Received: from blade.nx (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s76FwB1X016129 for ; Wed, 6 Aug 2014 11:58:11 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 89A342640E6 for ; Wed, 6 Aug 2014 16:58:10 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 4/6] Convert fatal to error in remote_prepare Date: Wed, 6 Aug 2014 16:58:06 +0100 Message-Id: <1407340688-13721-5-git-send-email-gbenson@redhat.com> In-Reply-To: <1407340688-13721-1-git-send-email-gbenson@redhat.com> References: <1407340688-13721-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes This commit converts a call to fatal in remote_prepare with a call to error. remote_prepare is called precisely once, from main, at a point where jumping to toplevel will call exit (1), so error and fatal are functionally equivalent at this point. Note that remote_prepare calls perror_with_name (which calls error) so callers of remote_prepare must already handle the fact that it may exit via longjmp. gdb/gdbserver/ 2014-08-06 Gary Benson * remote-utils.c (remote_prepare): Replace fatal with error. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/remote-utils.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 4fcafa0..027d2a7 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -253,7 +253,7 @@ remote_prepare (char *name) port = strtoul (port_str + 1, &port_end, 10); if (port_str[1] == '\0' || *port_end != '\0') - fatal ("Bad port argument: %s", name); + error ("Bad port argument: %s", name); #ifdef USE_WIN32API if (!winsock_initialized)