From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4564 invoked by alias); 11 Jul 2005 13:08:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4290 invoked by uid 22791); 11 Jul 2005 13:07:57 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 11 Jul 2005 13:07:57 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1Dry0c-0006kN-8t for gdb@sources.redhat.com; Mon, 11 Jul 2005 09:07:42 -0400 Date: Mon, 11 Jul 2005 13:08:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Formatting of function pointer value Message-ID: <20050711130742.GB25755@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <20050708135810.GB17089@nevyn.them.org> <17106.5796.850869.491390@farnswood.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00108.txt.bz2 On Mon, Jul 11, 2005 at 11:40:21AM +0400, Vladimir Prus wrote: > Vladimir Prus wrote: > > > Ok, the the only advantage of MI is stable output format. Can you tell me > > how it's achieved? For example, looking at the code that prints function > > values (what worries me in the first place): > > > > fprintf_filtered (stream, "{"); > > type_print (type, "", stream, -1); > > fprintf_filtered (stream, "} "); > > > > As I right in assuming that exactly the same output will be produced for > > MI mode and for CLI mode? If so, then how MI can be more stable than CLI, > > if the output is the same? > > To clarify more, here's what I get with MI: > > -data-evaluate-expression *p3 > ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>" > (gdb) > -var-create VP3 0 *p3 > ^done,name="VP3",numchild="0",type="int (int)" > (gdb) > -var-evaluate-expression VP3 > ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>" > > The type enclosed in {} is still there. The intention is that this is a user-readable value, to be displayed. There's limited facility for computing values with machine-readable results, probably because there has been limited need for it to date. You can get some information more precisely - for instance the type. -- Daniel Jacobowitz CodeSourcery, LLC