From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15112 invoked by alias); 2 Sep 2011 17:08:18 -0000 Received: (qmail 15099 invoked by uid 22791); 2 Sep 2011 17:08:15 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Sep 2011 17:07:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p82H7obN019432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Sep 2011 13:07:50 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p82H7lPW013285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Sep 2011 13:07:49 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p82H7kTR000537; Fri, 2 Sep 2011 19:07:46 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p82H7jD1000534; Fri, 2 Sep 2011 19:07:45 +0200 Date: Fri, 02 Sep 2011 17:08:00 -0000 From: Jan Kratochvil To: Vladimir Prus Cc: gdb-patches@sourceware.org Subject: [MI RFC] entryval: MI access to entry values [Re: [RFC 06/12] entryval: Display @entry parameters in bt full] Message-ID: <20110902170745.GA22738@host1.jankratochvil.net> References: <20110718201852.GG30496@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00037.txt.bz2 Hi Volodya, intro: [patch 00/12] entryval: Fix x86_64 parameters, virtual tail call frames http://sourceware.org/ml/gdb-patches/2011-07/msg00430.html currently implemented at: http://sourceware.org/gdb/wiki/ArcherBranchManagement archer-jankratochvil-entryval asking here how the MI format should look like. The CLI part prints (in default `set print entry-values default'): Breakpoint 8, validity (lost=, lost@entry=5, born=10) at gdb.arch/amd64-entry-value.cc:200 (1) so I am inclined to just produce these MI records (which normal and @entry variable variants get included depends on `-gdb-set print entry-values' like in CLI): print_frame_args: *stopped,[...],args=[{name="lost",value=""},{name="lost@entry",value="5"},{name="born",value="10"}],[...] list_args_or_locals: -stack-list-variables --all-values ^done,variables=[{name="lost",arg="1",value=""},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}] (2) currently the archer-jankratochvil-entryval branch implements this variant: *stopped,[...],args=[{name="lost",value="",entry_value="5"},{name="born",value="10"}],[...] -stack-list-variables --all-values ^done,variables=[{name="lost",arg="1",value="",entry_value="5"},{name="born",arg="1",value="10"}] with .exp samples in: http://sourceware.org/git/gitweb.cgi?p=archer.git;a=blob_plain;f=gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp;hb=archer-jankratochvil-entryval (3) and I have some older implementation saved which produced: *stopped,[...],args=[{name="lost",value=""},{name="born",value="10"}],args_entry=[{name="lost",value="5"}],[...] although the list_args_or_locals mode not sure how it should look like. (4) ? The paramname@entry variant (1) requires no extra FE (Front End) extensions, it should also be fully backward compatible. The paramname@entry variables are special that one cannot modify them but that is true also for other variables. For (2) and (3) for FEs with proper parser an additional result should be ignored correctly. For FEs with some ugly manual matching I also do not think it should be a problem as FEs are usually used for -O0 -g code debugging while entry values are present only in -O2 -g code. System libraries would be more a problem although those on many OSes do not have the -g part. For the FE->GDB part the FE can normally use `paramname@entry' strings instead of `paramname' in expression strings as shown in [2]. [2] http://people.redhat.com/jkratoch/eclipse2.png The (2) case I tested with eclipse-cdt-8.0.0-5.fc16.x86_64 and ignores the `entry_value' part correctly. Maybe it could add the `entry value' in details of the `val' parameter - as shown in the [1] picture (for that case maybe the (2) format is better but sure FE is able to use any of the MI formats). [1] http://people.redhat.com/jkratoch/eclipse1.png Thanks for advice, Jan