From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17877 invoked by alias); 1 Feb 2013 20:38:57 -0000 Received: (qmail 17557 invoked by uid 22791); 1 Feb 2013 20:38:53 -0000 X-SWARE-Spam-Status: No, hits=-7.8 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; Fri, 01 Feb 2013 20:38:43 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r11KceS8001975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Feb 2013 15:38:40 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r11Kcc1E001689; Fri, 1 Feb 2013 15:38:39 -0500 Message-ID: <510C27CE.3090102@redhat.com> Date: Fri, 01 Feb 2013 20:38: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> In-Reply-To: <1359560580-1970-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 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/msg00028.txt.bz2 On 01/30/2013 03:43 PM, Yao Qi wrote: > Hi, > I added MI notifications "=tsv-created" and "=tsv-deleted" in this > patch, http://sourceware.org/ml/gdb-patches/2012-09/msg00191.html > We think it is still necessary to add another MI notification > "=tsv-modified" for the changes of the initial value of a tsv. This > is what this patch does. Should we emit a notification when GDB detects the target changes the variable too? > 2013-01-30 Yao Qi > > * mi/mi-interp.c (mi_tsv_modified): Declare. > (mi_interpreter_init): Call observer_attach_tsv_modified. > (mi_tsv_modified): New. > * tracepoint.c (trace_variable_command): Call > observer_notify_tsv_modified if the initial value of tsv is > changed. > > * NEWS: Mention the new MI notification. Please spell out the notification. Nothing else in the GDB ChangeLog entry indicates what is "the new". > > gdb/testsuite: > > 2013-01-30 Yao Qi > > * gdb.trace/mi-tsv-changed.exp (test_create_delete_tsv): Rename > to ... > (test_create_delete_modify_tsv): New. It's a rename, or a new function? > @@ -37,6 +37,9 @@ proc test_create_delete_tsv { } {with_test_prefix "create delete" { > mi_gdb_test "tvariable \$tvar1" \ > ".*=tsv-created,name=\"tvar1\",value=\"0\"\\\\n.*\\^done" \ > "tvariable \$tvar1" > + mi_gdb_test "tvariable \$tvar1 = 1" \ > + ".*=tsv-modified,name=\"tvar1\",value=\"1\"\\\\n.*\\^done" \ > + "tvariable \$tvar1 modified" It would be thorough to test that another "tvariable \$tvar1 = 1" _doesn't_ emit a modified notification. > mi_gdb_test "tvariable \$tvar2 = 45" \ > ".*=tsv-created,name=\"tvar2\",value=\"45\"\\\\n.*\\^done" \ > "tvariable \$tvar2" > @@ -81,6 +84,10 @@ proc test_upload_tsv { } { with_test_prefix "upload" { > gdb_test "tvariable \$tvar2 = 45" \ > "Trace state variable \\\$tvar2 created, with initial value 45." \ > "Create a trace state variable with initial value" > + > + gdb_test "tvariable \$tvar3 = 1" \ > + "Trace state variable \\\$tvar3 created, with initial value 1." \ > + "Create a trace state variable \$tvar3 with initial value 1" I couldn't figure out what motivated this addition. -- Pedro Alves