From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22666 invoked by alias); 20 Mar 2012 18:50:54 -0000 Received: (qmail 22603 invoked by uid 22791); 20 Mar 2012 18:50:52 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 20 Mar 2012 18:50:32 +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 q2KIoR6J002047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Mar 2012 14:50:27 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2KIoPpB003306; Tue, 20 Mar 2012 14:50:26 -0400 Message-ID: <4F68D171.5050709@redhat.com> Date: Tue, 20 Mar 2012 18:50:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Hui Zhu , Yao Qi Subject: Fix tracepoints in extended-remote mode regression (Re: Fix error when gdb connect to a stub that tracepoint is running[1/2] Add a flag initialized to struct trace_status) References: <4F4F8BE2.7030503@mentor.com> <4F4FB2F9.80200@redhat.com> <4F4FC4AD.3020501@redhat.com> In-Reply-To: <4F4FC4AD.3020501@redhat.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-03/txt/msg00750.txt.bz2 On 03/01/2012 06:49 PM, Pedro Alves wrote: > > 2012-03-01 Pedro Alves > Hui Zhu > Yao Qi > > * remote.c (struct remote_state): New field `starting_up'. > (remote_start_remote): Set and clear it. > (remote_can_download_tracepoint): If starting up, return false. This misses clearing `starting_up' on early return paths of remote_start_remote, an so remote_can_download_tracepoint always return false in extended-remote mode. With the extended-remote board, but not with the regular remote board: Running ../../../src/gdb/testsuite/gdb.trace/change-loc.exp ... FAIL: gdb.trace/change-loc.exp: 1 trace: tfind frame 0 FAIL: gdb.trace/change-loc.exp: 2 trace: tfind frame 2 FAIL: gdb.trace/change-loc.exp: 1 ftrace: running to main in runto FAIL: gdb.trace/change-loc.exp: 1 ftrace: Can't run to main FAIL: gdb.trace/change-loc.exp: 2 ftrace: run to main (the program exited) FAIL: gdb.trace/change-loc.exp: 2 ftrace: tstart ... (snip yet more fails) This fixes it. Applied on mainline and 7.4. 2012-03-20 Pedro Alves * remote.c (remote_start_remote): Clear `rs->starting_up' on early returns. --- gdb/remote.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Index: src/gdb/remote.c =================================================================== --- src.orig/gdb/remote.c +++ src/gdb/remote.c @@ -3268,6 +3268,7 @@ remote_start_remote (int from_tty, struc /* We're connected, but not running. Drop out before we call start_remote. */ + rs->starting_up = 0; return; } else @@ -3374,6 +3375,7 @@ remote_start_remote (int from_tty, struc /* We're connected, but not running. Drop out before we call start_remote. */ + rs->starting_up = 0; return; }