From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31652 invoked by alias); 5 Feb 2013 15:41:54 -0000 Received: (qmail 31576 invoked by uid 22791); 5 Feb 2013 15:41:52 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,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; Tue, 05 Feb 2013 15:41:45 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r15FfhWu024976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Feb 2013 10:41:43 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r15FffRO027425; Tue, 5 Feb 2013 10:41:42 -0500 Message-ID: <51112835.1010303@redhat.com> Date: Tue, 05 Feb 2013 15:41:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] New MI notification "=tsv-modified" References: <1359560580-1970-1-git-send-email-yao@codesourcery.com> <510C27CE.3090102@redhat.com> <510CCE26.50600@codesourcery.com> <510FF037.8000101@redhat.com> <51111F75.1020007@codesourcery.com> In-Reply-To: <51111F75.1020007@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2013-02/txt/msg00120.txt.bz2 On 02/05/2013 03:04 PM, Yao Qi wrote: > On 02/05/2013 01:30 AM, Pedro Alves wrote: >> _Which_ value is being talked about here is not explicit. >> Trace state variables have_two_ values. The initial value, >> and the current value (omitted if doesn't exist yet). > > I meant the initial value here. > >> If we list tsvs with MI's -trace-list-variables, we'll indeed >> see an "init" and a "current" attribute, for each tsv, and no >> attribute named "value". So I think it'd be very good to fix this >> before the release, and make the output of the notifications >> consistent with the tsv listing output, and the docs clearer. >> >> E.g.: >> (gdb) interpreter-exec mi "-trace-list-variables" >> ^done,trace-variables={nr_rows="1",nr_cols="3", >> hdr=[{width="15",alignment="-1",col_name="name",colhdr="Name"}, >> {width="11",alignment="-1",col_name="initial",colhdr="Initial"}, >> {width="11",alignment="-1",col_name="current",colhdr="Current"}], >> body=[variable={name="$a",initial="1"}, >> variable={name="$b",initial="2",current="3"}] >> >> SO IOW, =tsv-created should be >> >> =tsv-created,name=@var{name},initial=@var{value} >> >> instead of the current >> >> =tsv-created,name=@var{name},value=@var{value} >> >> >> and =tsv-modified should be >> >> =tsv-modified,name=@var{name},initial=@var{value} >> >> instead of the proposed >> >> =tsv-modified,name=@var{name},value=@var{value} > > The patch below implements these MI notifications with suggested > attributes. "=tsv-modified" is implemented like: > > =tsv-modified,name=@var{name},initial=@var{initial},current=@var{current} > > I don't refactor function tvariables_info_1 in this patch, and I'd like > to defer this change to next one. > > Is it OK if no test regression? I think that even without refactoring, we should do what tvariables_info_1 does and omit "current" if the value is not known. The -trace-list-variables docs explain this suppression -- we should probably copy that bit into the notification docs. -- Pedro Alves