From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20660 invoked by alias); 10 Feb 2012 07:50:09 -0000 Received: (qmail 20631 invoked by uid 22791); 10 Feb 2012 07:50:04 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Feb 2012 07:49:44 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1RvlEl-00048b-4y from Hui_Zhu@mentor.com ; Thu, 09 Feb 2012 23:49:43 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 9 Feb 2012 23:49:32 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Thu, 9 Feb 2012 23:49:41 -0800 Message-ID: <4F34CC0D.6010402@mentor.com> Date: Fri, 10 Feb 2012 07:50:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: Pedro Alves CC: Yao Qi , Subject: Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[1/2] reset current_trace_status in the begin of remote_start_remote References: <4F274C42.7010008@mentor.com> <4F27A4AD.9020608@codesourcery.com> <4F32BF7A.4000900@redhat.com> In-Reply-To: <4F32BF7A.4000900@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00169.txt.bz2 Hi Pedro, What about my patch in http://sourceware.org/ml/gdb-patches/2012-01/msg01007.html ? It make tracepoint cannot be install before remote_get_trace_status. And after remote_get_trace_status, merge_uploaded_tracepoints can handle tracepoint. Best, Hui On 02/09/12 02:31, Pedro Alves wrote: > On 01/31/2012 08:22 AM, Yao Qi wrote: >> Patch attached is used to illustrate my thought to fix this problem. I >> am not confident on it because I don't know it is correct to change the >> order of function calls in remote_start_remote. The "non stop" path in >> remote_start_remote is not affected by this patch. In the "stop" path, >> the order of some functions call is changed, but don't know they are >> equivalent. >> >> Original Patched >> >> start_remote merge_uploaded_tracepoints >> remote_check_symbols start_remote >> merge_uploaded_tracepoints remote_check_symbols > > The tracepoints module depends on remote_check_symbols (qSymbols), in > order to detect the IPA is loaded, and so that anything related > to fast tracepoints works. On the other hand, if there are already > fast tracepoints on the target, then the qSymbols business must have > already have been done in the previous time gdb was connected. > > I don't think we're okay with this in non-stop mode though. We should > relocate our symbols before we try to merge tracepoints. Yet, we need to > merge tracepoints before any breakpoint re-set. Thing is in non-stop mode, > you find new inferiors and possibly do re-sets early in remote_start_remote > (find threads -> remote_notice_new_inferior -> notice_new_inferior can do a lot > behind the scenes). > > It may be simpler and safer to just have a way for update_global_location_list > to know that it shouldn't try to install tracepoints yet (cause we're still going > through startup)? >