From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9467 invoked by alias); 17 Feb 2006 19:36:01 -0000 Received: (qmail 9457 invoked by uid 22791); 17 Feb 2006 19:36:00 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 17 Feb 2006 19:35:59 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FABOW-0007V9-52; Fri, 17 Feb 2006 14:35:56 -0500 Date: Fri, 17 Feb 2006 19:38:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Vladimir Prus , gdb@sources.redhat.com Subject: Re: MI: type prefixes for values Message-ID: <20060217193556.GA28754@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Vladimir Prus , gdb@sources.redhat.com References: <200602171658.23427.ghost@cs.msu.su> <200602171724.03824.ghost@cs.msu.su> <20060217190418.GA27304@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00195.txt.bz2 On Fri, Feb 17, 2006 at 09:25:42PM +0200, Eli Zaretskii wrote: > > Date: Fri, 17 Feb 2006 14:04:18 -0500 > > From: Daniel Jacobowitz > > Cc: Vladimir Prus , gdb@sources.redhat.com > > > > To correct the record, he's not parsing MI here. He's parsing the > > value encapsulated within MI, the bit in quotes here: > > value="4000" > > or: > > value="{int (int)} 0xffffffff " > > I understood that part. > > > There's no grammar describing what goes in the value string. > > How do you mean ``there's no grammar''? Do you mean it cannot be > written? Or do you mean it was not written yet? If the latter, then > if I needed to write a code to parse this, I'd write down a formal > definition of what I'll expect, before writing code to parse that. I mean that there's no documented grammar, which in turn means (among other things) that GDB doesn't guarantee its contents as part of a stable interface. Parsing it is a bad idea; either it's opaque, or it isn't. Writing a grammar for it would be difficult-to-impractical. For functions, it could be any C function type; for arrays, it could be a list of anything GDB considers a value. -- Daniel Jacobowitz CodeSourcery