From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15165 invoked by alias); 20 Sep 2005 19:18:41 -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 15126 invoked by uid 22791); 20 Sep 2005 19:18:31 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 20 Sep 2005 19:18:31 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-64-77.inter.net.il [80.230.64.77]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id CLE84425 (AUTH halo1); Tue, 20 Sep 2005 22:18:21 +0300 (IDT) Date: Tue, 20 Sep 2005 19:18:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sources.redhat.com In-reply-to: <20050920073058.GR2496@adacore.com> (message from Joel Brobecker on Tue, 20 Sep 2005 00:30:58 -0700) Subject: Re: [RFA] print arrays with indexes Reply-to: Eli Zaretskii References: <20050907202402.GF1540@adacore.com> <20050914171319.GD27542@adacore.com> <20050917204930.GB8777@nevyn.them.org> <20050917215138.GB2496@adacore.com> <20050918034639.GB6990@nevyn.them.org> <20050918054109.GD2496@adacore.com> <20050918191943.GA27191@nevyn.them.org> <20050920073058.GR2496@adacore.com> X-SW-Source: 2005-09/txt/msg00177.txt.bz2 > Date: Tue, 20 Sep 2005 00:30:58 -0700 > From: Joel Brobecker > Cc: gdb-patches@sources.redhat.com > > Something we haven't really formally decided though, is the significance > of the threashold. Is it: > > 1. If array size > threshold, then print indexes > 2. If array size < threshold, then print indexes The second, I think: it makes sense to ask for arrays that are not too large to be printed with additional info. > Now, the sticky part: How to implement this new interface. > > I'll argue that it's best to implement something new. I don't like > hijacking an old interface to unsigned integer and adding some aliases > to a couple of values. My reasoning is that saying that OFF is an alias > for UINT_MAX will make sense for certain cases while it actually won't > for other cases. Actually, which value to use for OFF will depend on > the what the threashold actually means. If you accept my view above, then threshold value of zero means unlimited. We already have several set/show commands that behave this way, so I don't see any problem with having yet another. > I vote for a new API. I don't see any reason for a new API. > I think we should also review the usage of the current ones, probably > cleanup a bit some of the ones that were on the road to obsolescence > (IIRC), maybe rationalize a bit more our API if needed, and add some > documentation. But that should be a separate thread. I don't think I > will be able to handle all of this, but I can certainly help. That sounds like a lot of unnecessary work for such an obscure feature, IMHO.