From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10190 invoked by alias); 17 Nov 2008 19:13:31 -0000 Received: (qmail 10115 invoked by uid 22791); 17 Nov 2008 19:13:30 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Nov 2008 19:12:51 +0000 Received: from spaceape23.eur.corp.google.com (spaceape23.eur.corp.google.com [172.28.16.75]) by smtp-out.google.com with ESMTP id mAHJClb6022483 for ; Mon, 17 Nov 2008 11:12:48 -0800 Received: from wf-out-1314.google.com (wfc25.prod.google.com [10.142.3.25]) by spaceape23.eur.corp.google.com with ESMTP id mAHJCjSG017871 for ; Mon, 17 Nov 2008 11:12:46 -0800 Received: by wf-out-1314.google.com with SMTP id 25so2684335wfc.12 for ; Mon, 17 Nov 2008 11:12:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.178.1 with SMTP id a1mr2682867waf.107.1226949165177; Mon, 17 Nov 2008 11:12:45 -0800 (PST) In-Reply-To: <20081115190118.GL12802@adacore.com> References: <20081114204617.A4A533A6B15@localhost> <491DF12A.5090903@vmware.com> <8ac60eac0811141406h4bb126c0sbd898e7d612f46dd@mail.gmail.com> <491E08BF.2050609@vmware.com> <8ac60eac0811150842x78206050t435c6f8c89ddc8ae@mail.gmail.com> <8ac60eac0811151022w13df6899v13bb321ee08aae09@mail.gmail.com> <20081115190118.GL12802@adacore.com> Date: Mon, 17 Nov 2008 22:37:00 -0000 Message-ID: <8ac60eac0811171112x5b555146lefb27f36e773ac25@mail.gmail.com> Subject: Re: [RFA] [patch] 'info symbol' to print more info From: Paul Pluzhnikov To: Joel Brobecker Cc: Eli Zaretskii , msnyder@vmware.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2008-11/txt/msg00438.txt.bz2 On Sat, Nov 15, 2008 at 11:01 AM, Joel Brobecker wrote: > > > But here, the message is already built up from 3 separate conditions, > > and I am adding one more. What you are proposing then leads to a > > chain of 16 if/then/else clauses. I don't think that's really > > appropriate ... > > I haven't looked very closely at the details of the patch since Michael > and Eli already did, so I can't comment on the exact number of if > branches. Note that the patch merely adds one more clause to existing three. What Andreas is asking me to do here is rewrite existing code ... > But, generally speaking, we just don't have much choice if > we want to support i18n well. Maybe 'info symbol' is sufficiently obscure that we don't need to support i18n well for it? > That being said, I agree that 16 branches is a large number, and perhaps > we should let go of some of them. If we always print symbol offset (even when 0), that eliminates one branch. > For instance, there was this discussion > about not printing the name of the objfile if MULTI_OBJFILE_P. If we > get rid of that, does it reduce the number of cases? I think the answer is no, because we still have to check for: && osect->objfile && osect->objfile->name > The idea itself > is nice, but perhaps code simplicity is more important in this case. > Are there any other cosmectic features that we can get rid of to > reduce the number of cases further? Except for the offset mentioned above, I don't see what else could be cut. Thanks, -- Paul Pluzhnikov