From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8395 invoked by alias); 3 Feb 2010 23:34:08 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 8385 invoked by uid 22791); 3 Feb 2010 23:34:07 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4B6A07E0.6020306@redhat.com> Date: Wed, 03 Feb 2010 23:34:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Daniel Jacobowitz CC: Roland McGrath , Tom Tromey , Eric Bachalo , Project Archer Subject: Re: PR 11067 References: <4B68A35E.2050301@redhat.com> <4B68DC25.1090808@redhat.com> <4B69F028.9070006@redhat.com> <20100203224239.04338AA@magilla.sf.frob.com> <20100203231408.GA6397@caradoc.them.org> <20100203232506.B073AAA@magilla.sf.frob.com> <20100203232819.GK9493@caradoc.them.org> In-Reply-To: <20100203232819.GK9493@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2010-q1/txt/msg00058.txt.bz2 On 02/03/10 18:28, Daniel Jacobowitz wrote: > On Wed, Feb 03, 2010 at 03:25:06PM -0800, Roland McGrath wrote: > >> Yeah, I was going for parity and the /c format would not have been my first >> choice if we didn't already have it. I think: >> >> $2 = (enum frobozz) 1 = ENUM1 >> >> would be fine too, or maybe reverse the clauses. "(type) digit" is >> probably what's most likely always to be pasteable anywhere, in case >> it's into a context where you don't have the same scope for the enum >> constant (in C++). >> > > Something to consider is what contexts you want this output in. I > think this would get old really fast: > > $2 = { code = CODE_ADD = (enum code) 1, ops = OPS_TWO = (enum ops) 2 } > > vs > > $2 = { code = CODE_ADD, ops = OPS_TWO } > (gdb) p CODE_ADD > $3 = CODE_ADD = (enum code) 1 > > Hmm, can't say I like that format any better either, but there's got > to be a good one. I usually p/d CODE_ADD to find out the value... > While I was looking for where this stuff is formatted, I noticed it goes through python/py-prettyprint.c which, I assume, can format things any way you like it. How about just something generic by default and use a pretty-print thingy if that doesn't work? (Uh, assuming py-prettyprint.c does that....) > My takeaway point here is to consider the overall impact. > >