From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3098 invoked by alias); 12 Nov 2007 16:56:17 -0000 Received: (qmail 3088 invoked by uid 22791); 12 Nov 2007 16:56:16 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Nov 2007 16:56:08 +0000 Received: (qmail 21394 invoked from network); 12 Nov 2007 16:56:07 -0000 Received: from unknown (HELO ?192.168.0.2?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Nov 2007 16:56:07 -0000 Message-ID: <47388599.2040701@codesourcery.com> Date: Mon, 12 Nov 2007 18:09:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Alexandre Oliva CC: Robert Dewar , Ian Lance Taylor , Richard Guenther , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: Designs for better debug info in GCC References: <84fc9c000711050327x74845c78ya18a3329fcf9e4d2@mail.gmail.com> <4733A637.8070004@adacore.com> <4737BF2C.70408@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00319.txt.bz2 Alexandre Oliva wrote: > On Nov 12, 2007, Mark Mitchell wrote: > >> Clearly, for some users, incorrect debugging information on optimized >> code is not a terribly big deal. It's certainly less important to many >> users than that the program get the right answer. On the other hand, >> there are no doubt users where, whether for debugging, certification, or >> whatever, it's vitally important that the debugging information meet >> some standard of accuracy. > > How is this different from a port of the compiler for a CPU that few > people care about? That many users couldn't care less whether the > compiler output on that port works at all doesn't make it any less of > a correctness issue. You're again trying to make this a binary-value question. Why? Lots of things are "a correctness issue". But, some categories tend to be worse than others. There is certainly a qualitative difference in the severity of a defect that results in the compiler generating code that computes the wrong answer and a defect that results in the compiler generating wrong debugging information for optimized code. The impact on a user affected by the first problem is likely very severe: the application does not run correctly. The impact on a user affected by the second problem is likely less severe: the debugger doesn't work as well, or some other external tool doesn't work as well. Let's put it this way: if a user has to choose whether the compiler will (a) generate code that runs correctly for their application, or (b) generate debugging information that's accurate, which one will they choose? But what's the point of this argument? It sounds like you're trying to argue that debug info for optimized code is a correctness issue, and therefore we should work as hard on it as we would on code-generation bugs. I don't find that argument persuasive. I'd like better debugging for optimized code, but I'm certainly more concerned that (a) we generate correct, fast code when optimizing, and (b) we generate good debugging information when not optimizing. -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713