From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22714 invoked by alias); 25 May 2009 06:29:34 -0000 Received: (qmail 22706 invoked by uid 22791); 25 May 2009 06:29:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 May 2009 06:29:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 18F402BABE7; Mon, 25 May 2009 02:29:28 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qnFi4GkPhL3k; Mon, 25 May 2009 02:29:28 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CE6B02BABEF; Mon, 25 May 2009 02:29:27 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 753CDF5965; Mon, 25 May 2009 08:29:22 +0200 (CEST) Date: Mon, 25 May 2009 06:29:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Fix printing frame arguments for COFF debug info Message-ID: <20090525062922.GE23016@adacore.com> References: <83d4a9q9e5.fsf@gnu.org> <20090520213200.GE16152@adacore.com> <837i0bp2bb.fsf@gnu.org> <20090521170502.GJ16152@adacore.com> <83iqjst89t.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83iqjst89t.fsf@gnu.org> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-05/txt/msg00541.txt.bz2 > 2009-05-23 Eli Zaretskii > > * valprint.c (val_print): If LANGUAGE is "unknown" or "auto" or > "local", fall back on current_language. The patch looks good, although I'm still unconvinced that it is actually necessary. I'm slightly worried about the potential for feeding an expression to the wrong language (as we've seen a crash a long time ago when feeding some C++ stuff thinking it was Ada), but we can actually look into that if it ever happens. One of the things that you patch does, is also hidding an error that was actually an internal error. We're trying to recover nicely from the situation in order to be more useful for the user, so getting rid of the error is OK, but I'd probably still emit a complaint. WDYT? > --- valprint.c~0 2009-03-21 07:03:53.000000000 +0200 > +++ valprint.c 2009-05-23 13:33:14.062500000 +0300 > @@ -257,6 +257,14 @@ val_print (struct type *type, const gdb_ > return (0); > } > > + /* If the LANGUAGE argument we received is one of the placeholder > + ``languages'', its la_val_print method will throw an error. To > + avoiding that, try falling back on current_language. */ ^^^ avoid -- Joel