From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15687 invoked by alias); 7 Sep 2005 21:41:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15678 invoked by uid 22791); 7 Sep 2005 21:41:41 -0000 Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 07 Sep 2005 21:41:41 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 598BB48CDC6; Wed, 7 Sep 2005 17:41:40 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12913-02-6; Wed, 7 Sep 2005 17:41:39 -0400 (EDT) Received: from takamaka.act-europe.fr (s142-179-108-108.bc.hsia.telus.net [142.179.108.108]) by nile.gnat.com (Postfix) with ESMTP id C99C948CD96; Wed, 7 Sep 2005 17:41:39 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5EF5847E74; Wed, 7 Sep 2005 14:41:38 -0700 (PDT) Date: Wed, 07 Sep 2005 21:41:00 -0000 From: Joel Brobecker To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] print arrays with indexes Message-ID: <20050907214138.GG1540@adacore.com> References: <20050906202018.GC1153@adacore.com> <20050906205710.GA12715@nevyn.them.org> <20050907053951.GC1540@adacore.com> <20050907132316.GA3622@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2005-09/txt/msg00049.txt.bz2 > > I've got no strong opinions on this either way. Thresholds seem > > complicated as a UI. > > The printing code seems to have a few thresholds --- 'show print > repeats', 'show print elements', maybe others. It's a waste of time > when they hide or obscure information I need, and I have to go in and > change them. But I don't see this one having that effect; both the > labeled and unlabeled forms show all the information there is. It's > just a question of whether it's worth avoiding stuff like: > > (gdb) print pipe > $2 = { [0] = 6, [1] = 7 } > (gdb) > > in favor of: > > (gdb) print pipe > $2 = { 6, 7 } > (gdb) Speaking for my personal usage, I find that the labeled form is pretty hard to read. So I will use it occasionally when there are too many elements in the array for me to count. The rest of the time, I will have that feature turned off. How about we enhance a bit the approach, and have: set print array-indexes on/off/auto If set to auto, then we use the threshold? (I'm so glad I haven't started writing the doc and the testcases yet :-). -- Joel