From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5826 invoked by alias); 17 Jun 2014 14:48:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5812 invoked by uid 89); 17 Jun 2014 14:48:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 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 ESMTP; Tue, 17 Jun 2014 14:48:41 +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 s5HED6fG029280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Jun 2014 10:13:07 -0400 Received: from blade.nx (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5HED6T4020860 for ; Tue, 17 Jun 2014 10:13:06 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id A62B4262482 for ; Tue, 17 Jun 2014 15:13:04 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 07/15] Merge error handling Date: Tue, 17 Jun 2014 14:48:00 -0000 Message-Id: <1403014378-4349-8-git-send-email-gbenson@redhat.com> In-Reply-To: <1403014378-4349-1-git-send-email-gbenson@redhat.com> References: <1403014378-4349-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00595.txt.bz2 This commit makes all error handling in i386-low.c use internal_error rather than fatal and error. gdb/gdbserver/ 2014-06-17 Gary Benson * i386-low.c (i386_length_and_rw_bits): Use internal_error instead of fatal and error. (i386_handle_nonaligned_watchpoint): Likewise. --- gdb/gdbserver/ChangeLog | 6 ++++++ gdb/gdbserver/i386-low.c | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c index b154fcd..54dd4b8 100644 --- a/gdb/gdbserver/i386-low.c +++ b/gdb/gdbserver/i386-low.c @@ -225,7 +225,9 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type) rw = DR_RW_WRITE; break; case hw_read: - fatal ("The i386 doesn't support data-read watchpoints.\n"); + internal_error (__FILE__, __LINE__, + _("The i386 doesn't support " + "data-read watchpoints.\n")); case hw_access: rw = DR_RW_READ; break; @@ -236,8 +238,8 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type) break; #endif default: - error ("\ -Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n", + internal_error (__FILE__, __LINE__, _("\ +Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n"), (int) type); } @@ -254,8 +256,8 @@ Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n", return (DR_LEN_8 | rw); /* ELSE FALL THROUGH */ default: - error ("\ -Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n", len); + internal_error (__FILE__, __LINE__, _("\ +Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n"), len); } } @@ -401,10 +403,9 @@ i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, else if (what == WP_REMOVE) retval = i386_remove_aligned_watchpoint (state, addr, len_rw); else - fatal ("\ -Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n", - (int) what); - + internal_error (__FILE__, __LINE__, _("\ +Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n"), + (int) what); if (retval) break; } -- 1.7.1