From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17644 invoked by alias); 6 Aug 2014 10:12:38 -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 17572 invoked by uid 89); 6 Aug 2014 10:12:38 -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 10:12:37 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s76ACaGE009227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 06:12:36 -0400 Received: from blade.nx (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s76ACZ6Q003243 for ; Wed, 6 Aug 2014 06:12:35 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id AD1A32640DC for ; Wed, 6 Aug 2014 11:12:34 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 0/8] Error handling cleanups Date: Wed, 06 Aug 2014 10:12:00 -0000 Message-Id: <1407319948-2264-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00069.txt.bz2 Hi all, GDB's various error handling functions do not work until a certain amount of setup has been performed. For regular warnings and errors this is an annoyance: error handling needs to be hardwired with fprintf and/or exit until error and warning may be called. For internal warnings and errors this is a real problem: internal errors can occur from almost the first line of captured_main, but they don't actually work until much later. This series modifies internal_vproblem to always work, and modifies warning and error to work much earlier. It then replaces all the hardwired early warning/error code with standard calls to warning and error. While looking at this I found several other hardwired error handlers that do not seem to be necessary. I've replaced those in separate patches. While switching to warning/error I've fixed some inconsistencies that have crept in over time: some messages wern't wrapped with _(), for example, and some but not all warning messages were prefixed with argv[0]. For the latter case I've made it so that all warnings emitted prior to and during option processing--before print_gdb_version basically--are prefixed by argv[0] and all other warnings are not. Built and regtested on RHEL6.5 x86_64. Ok to commit? Thanks, Gary