From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59730 invoked by alias); 20 Nov 2015 13:12:34 -0000 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 Received: (qmail 59711 invoked by uid 89); 20 Nov 2015 13:12:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 20 Nov 2015 13:12:32 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id E69293B759; Fri, 20 Nov 2015 13:12:30 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAKDCTSk029710; Fri, 20 Nov 2015 08:12:30 -0500 Message-ID: <564F1C3D.1040709@redhat.com> Date: Fri, 20 Nov 2015 13:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Metzger, Markus T" CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] btrace: diagnose "record btrace pt" without libipt References: <1448011026-4192-1-git-send-email-markus.t.metzger@intel.com> <564F0591.3020006@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00423.txt.bz2 On 11/20/2015 12:11 PM, Metzger, Markus T wrote: > The record target is popped off the target stack on disconnect. This disables > branch tracing. The below log is for BTS but the logic is the same for PT. > Sending packet: $Qbtrace:off#37...Packet received: OK > > After reconnecting, you need to enable btrace again. I see. But then it sounds like we'll have the problem if the connection drops unexpectedly -- gdb won't be able to tell the server to disable Qbtrace. I guess the easiest way to emulate is kill gdb: #1 - enable btrace pt #2 - connection is terminated unexpectedly / kill gdb #3 - reconnect to gdbserver a) Does the new gdb get out of sync and confused? b) What if btrace pt was enabled on the inferior, and the gdb that reconnects in #3 above is compiled _without_ libipt? Will "info record" still crash? What I'm thinking is that a similar format check may be necessary around this code path, not only at PT enable time. Thanks, Pedro Alves