From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32185 invoked by alias); 7 Dec 2012 12:39:53 -0000 Received: (qmail 32174 invoked by uid 22791); 7 Dec 2012 12:39:52 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,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, 07 Dec 2012 12:39:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB7CdjbX024970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Dec 2012 07:39:46 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qB7CdiUg007252; Fri, 7 Dec 2012 07:39:44 -0500 Message-ID: <50C1E38F.2020108@redhat.com> Date: Fri, 07 Dec 2012 12:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 5/6] Test tracepoints are installed or not References: <1354596282-32526-1-git-send-email-yao@codesourcery.com> <1354596282-32526-6-git-send-email-yao@codesourcery.com> In-Reply-To: <1354596282-32526-6-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: 2012-12/txt/msg00161.txt.bz2 On 12/04/2012 04:44 AM, Yao Qi wrote: > Test the state of field 'installed'. This patch should be applied on > top of this one, > > [PATCH] Test on =breakpoint-created when reconnect > http://sourceware.org/ml/gdb-patches/2012-12/msg00019.html > > gdb/testsuite: > > 2012-12-03 Yao Qi > > * gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check > 'installed' field in '=breakpoint-modified'. > (test_reconnect): Check 'installed' field in > '=breakpoint-modified' and '=breakpoint-created'. > --- > gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 20 +++++++++++++++++--- > 1 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp > index a4cef0a..f20ea74 100644 > --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp > +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp > @@ -130,10 +130,20 @@ proc test_reconnect { } { with_test_prefix "reconnect" { > fail "$test: 2" > exp_continue > } > - -re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*${mi_gdb_prompt}" { > + -re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*installed=\"y\"" { > # Tracepoint on main is created because it is not defined > # before and it is from remote stub. > pass $test > + exp_continue > + } > + -re ".*=breakpoint-modified,bkpt=\{number=\"2\".*,func=\"marker\".*installed=\"y\"" { > + # Tracepoint on marker is defined. After the sync, we > + # know that the tracepoint is in remote stub. Mark it > + # 'installed'. > + pass "tracepoint on marker is installed" > + exp_continue > + } > + -re ".*${mi_gdb_prompt}" { > } > timeout { > fail $test > @@ -187,8 +197,12 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" { > > set test "tracepoint on pendfunc2 resolved" > gdb_expect { > - -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\"" { > + -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"n\"" { > pass "$test" > + exp_continue > + } > + -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"y\"" { > + pass "tracepoint on pendfunc2 installed" > } I don't understand this part. Why do we get two notifications? Different calls to the breakpoint_modified observers? This also relates to the "installed" field being present or not for pending breakpoints issue I pointed out in a previous patch. It'd be good to see (and test perhaps) this field is output correctly in the case of a tracepoint with multiple locations. > -re ".*${mi_gdb_prompt}$" { > fail $test > @@ -210,7 +224,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" { > mi_send_resuming_command "exec-continue" "continuing to exit" > set test "tracepoint on pendfunc2 becomes pending again" > gdb_expect { > - -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"\",.*times=\"0\"" { > + -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"\",.*times=\"0\".*installed=\"n\"" { > pass "$test" > } Also related. It very much feels to me that installed or not is a location property, not a breakpoint property. So if the breakpoint is pending, it doesn't have any location at all, and then it feels strange to me to include an "installed" attribute. WDYT? > -re ".*${mi_gdb_prompt}$" { > -- Pedro Alves