From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17381 invoked by alias); 17 Dec 2013 13:20:16 -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 17367 invoked by uid 89); 17 Dec 2013 13:20:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2013 13:20:14 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 17 Dec 2013 05:20:11 -0800 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 17 Dec 2013 05:20:10 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.135]) by IRSMSX102.ger.corp.intel.com ([169.254.2.114]) with mapi id 14.03.0123.003; Tue, 17 Dec 2013 13:20:01 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "jan.kratochvil@redhat.com" , "gdb-patches@sourceware.org" Subject: RE: [patch v8 23/24] record-btrace: show trace from enable location Date: Tue, 17 Dec 2013 13:20:00 -0000 Message-ID: References: <1386839747-8860-1-git-send-email-markus.t.metzger@intel.com> <1386839747-8860-24-git-send-email-markus.t.metzger@intel.com> <52AB64F3.3010305@redhat.com> <52AF5763.9050800@redhat.com> In-Reply-To: <52AF5763.9050800@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00644.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Monday, December 16, 2013 8:41 PM > >>> After adding incremental updates, we can now add a dummy record for > the > >> current > >>> PC when we enable tracing so we show the trace from the location > where > >> branch > >>> tracing has been enabled. > >> > >> Ah, awesome, I was just wondering about that. :-) > >> > >> I suppose one can we still access the registers when > >> inspecting this dummy location, or are the btrace unwinders > >> preventing that? > > > > You can not access registers when you are in the execution history. > > > > When we add this dummy record when we enable tracing, you're still > > outside the execution history, so you can access registers. Also the l= ast > > instruction will be skipped for all record operations - it corresponds = to > > the current PC and the instruction has not been executed yet. > > > > But it allows us to stitch the first trace chunk to this dummy record a= nd > > thus show the full trace from the enable location. > > > > Internally, you're at the same PC if you are replaying and the replay > > position is at the last instruction or if you are not replaying. > > The different is that you will be able to access registers and memory > > only if you are not replaying. >=20 > OK, the question was then, would it be wrong to allow > accessing registers and memory of the live program, if replaying, and > at that position? Just OOC and for my education, I'm not saying > it'd be a requirement. It would be conceptually wrong. And it would not be necessary, either, since we will never be in this position when the user gets the prompt. We will only pass through it internally. When the user gets the prompt, we are either replaying and we're somewhere in the execution history. Or we're not replaying and we're at the current location. > Sorry if the question sounds dumb. I can't actually try out this > stuff due to broken btrace on my machine, if you'll recall. That's sad, indeed. For one, this is a really nice feature. And also it prevents you from finding (and reporting) bugs that I don't find. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052