From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13773 invoked by alias); 17 Feb 2006 09:09:12 -0000 Received: (qmail 13765 invoked by uid 22791); 17 Feb 2006 09:09:11 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Feb 2006 09:09:09 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FA1bh-00059a-QJ for gdb@sources.redhat.com; Fri, 17 Feb 2006 10:08:53 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Feb 2006 10:08:53 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Feb 2006 10:08:53 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: MI: type prefixes for values Date: Fri, 17 Feb 2006 09:09:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 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/msg00163.txt.bz2 Hi, some time ago I've raised the question why MI output sometimes prefixes variable values with it's type. For example: -data-evaluate-expression *p3 ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>" (gdb) (note the {int (int)} part). The part does not make sense for a GUI and must be removed by a specially written code. See: http://article.gmane.org/gmane.comp.gdb.devel/13477 In the end, I've inquired why such prefixes cannot be dropped: http://article.gmane.org/gmane.comp.gdb.devel/13539 I imagine it's a simple matter of wrapping some code in "ui_output_is_mi_like_p". Can somebody comment on this proposal? Also, I note that gdb is currently inconsitent even within itself: (gdb) -thread-select 2 ^done,new-thread-id="2",frame={level="0",func="thread", args=[{name="p",value="0x0"}],.......... (gdb) -stack-list-arguments 1 0 0 ^done,stack-args=[frame={level="0", args=[{name="p",value="(void *) 0x0"}]}] Note that first output has "0x0" as value of 'p', and the second has "(void *)0x0". So, can a clear decision be made if the type prefixes has a place in MI, or should be removed? Thanks, Volodya