From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20989 invoked by alias); 17 Feb 2006 11:27:19 -0000 Received: (qmail 20980 invoked by uid 22791); 17 Feb 2006 11:27:18 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Feb 2006 11:27:16 +0000 Received: from kahikatea.snap.net.nz (p202-124-114-218.snap.net.nz [202.124.114.218]) by viper.snap.net.nz (Postfix) with ESMTP id 8C49474655D; Sat, 18 Feb 2006 00:27:09 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id B1DFC8894; Sat, 18 Feb 2006 00:26:01 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17397.45768.869543.842657@kahikatea.snap.net.nz> Date: Fri, 17 Feb 2006 11:27:00 -0000 To: Vladimir Prus Cc: Eli Zaretskii , gdb@sources.redhat.com Subject: Re: MI: type prefixes for values In-Reply-To: <200602171329.34297.ghost@cs.msu.su> References: <200602171329.34297.ghost@cs.msu.su> 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/msg00167.txt.bz2 > > > 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". > > > > Also, the first one shows the func= part, the second doesn't. > > Heh, the second is not supposed to show func= part at all. MI does not have a > command equivalent to "backtrace". One has to list -stack-list-frames (that > does include func=) and -stack-list-arguments (that includes only argument). > BTW, not very convenient. > > > Looks > > like a bug to me: those two should both use the same code. > > Should I file a bug? Looking at the code -thread-select uses common_val_print which calls val_print, while -stack-list-arguments uses print_variable_value which calls value_print. -stack-list-arguments shares code with -stack-list-locals which can print type information anyway, so if a common style is agreed, I would prefer the former. Perhaps the call to print_variable_value in list_args_or_locals can just be replaced to a call to common_val_print. But there are probably many more inconsistencies and missing or redundant fields. It won't be possible to add all these in a piecemeal fashion without repeatedly breaking an existing frontend. I think that a branch is needed so that the collective changes can be merged into mainline in one go. I have already stated that I want to create a branch for the asynchronous stuff. Perhaps the changes could go there (I'm still waiting for Emacs 22 to be released to avoid to much dilution of effort). -- Nick http://www.inet.net.nz/~nickrob