From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17985 invoked by alias); 9 Aug 2010 20:36:28 -0000 Received: (qmail 17977 invoked by uid 22791); 9 Aug 2010 20:36:27 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Aug 2010 20:36:21 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o79KaFmX010104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Aug 2010 16:36:16 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o79KaFML023658; Mon, 9 Aug 2010 16:36:15 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o79KaCu9016047; Mon, 9 Aug 2010 16:36:14 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 7F9DD3781A0; Mon, 9 Aug 2010 14:36:12 -0600 (MDT) From: Tom Tromey To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [0/4] RFC: add DWARF index support References: Date: Mon, 09 Aug 2010 20:36:00 -0000 In-Reply-To: (Doug Evans's message of "Fri, 6 Aug 2010 13:52:50 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2010-08/txt/msg00114.txt.bz2 >>>>> "Doug" == Doug Evans writes: Doug> I don't want to unnecessarily delay the patch (given, for example, its Doug> size), but not generating an index file when asked to and not flagging Doug> an error feels wrong at a gut level. For our particular use (RPM builds), we'll just ignore errors anyhow, because (IMO) it is more important for the build to succeed than for this optimization to be applied. There are a few problems here if you want it to work the other way. First, main.c doesn't play well with errors. When processing -ex arguments we just ignore error returns, and then later call quit_force, which exits with status 0. I think this makes sense to change, but I have not thought through all the ramifications, or tried to research the history. Second, save_gdb_index_command prints the error but doesn't propagate it. Since it loops over all objfiles this seemed nicest. But, we don't use it that way from this script; maybe we could add a "-fail" option to the command or something like that. I think I will just revert the gdb-add-index.sh addition, since it has too many problems. I'll revisit it when I can spend some time fixing up -batch. I'll send a reversion patch tomorrow. Doug> E.g., I wonder what should happen if there isn't enough (or any) info Doug> to generate .gdb-index. Doug> Is that an error? I guess it could be. I don't really care much about the various pathological cases. Doug> I hate to add another wrinkle, and thanks for bearing with me. Doug> I just tried passing a file that doesn't exist. gdb writes something Doug> to stderr and then exits with a zero exit code. Doug> That needs to be flagged as an error (presumably with test -r or some Doug> such before invoking gdb) , but it could be deferred to another patch. This is the main.c problem. The "file" command fails, but that doesn't affect operation. Tom