From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16157 invoked by alias); 17 Dec 2013 15:48:44 -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 16146 invoked by uid 89); 17 Dec 2013 15:48:43 -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: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2013 15:48:43 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 17 Dec 2013 07:44:53 -0800 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga002.jf.intel.com with ESMTP; 17 Dec 2013 07:48:39 -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 15:48:00 +0000 From: "Metzger, Markus T" To: Pedro Alves , "jan.kratochvil@redhat.com" CC: "gdb-patches@sourceware.org" , Eli Zaretskii Subject: RE: [patch v8 24/24] record-btrace: add (reverse-)stepping support Date: Tue, 17 Dec 2013 15:48:00 -0000 Message-ID: References: <1386839747-8860-1-git-send-email-markus.t.metzger@intel.com> <1386839747-8860-25-git-send-email-markus.t.metzger@intel.com> <52AB5E6A.1010105@redhat.com> <52AF62CB.7010805@redhat.com> In-Reply-To: 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/msg00652.txt.bz2 > -----Original Message----- > From: Metzger, Markus T > Sent: Tuesday, December 17, 2013 4:06 PM > To: Pedro Alves > I'm beginning to wonder if we should actually adjust the PC for > btrace replay. The way I interpret the function, we got a SIGTRAP > for executing the breakpoint instruction. The PC is after the breakpoint > instruction, so it is one byte after the actual breakpoint location. We'= re > now trying to undo the execution of the breakpoint instruction. > Is this correct? >=20 > In that case, we shouldn't adjust the PC since we did not execute > the breakpoint instruction in the trace. We just asked whether there > is a breakpoint at the current location. >=20 > This seems to be different for s/w record. This is the first time, I need > to distinguish between the different record targets. The s/w record target also does not execute the breakpoint instruction. It increments the PC by gdbarch_decr_pc_after_break () when it finds a s/w breakpoint at the current location. I wonder why they are doing that. Is this a workaround that was considered less intrusive than what I am proposing below? Or are there more places in GDB that expect the PC to be past the breakpoint instruction? I could do the same, of course. Not sure which version is more desirable. > I would add a new target method to_omit_pc_after_break_adjustment > that would default to false if not present. The btrace record target will > provide it and return true if we're replaying. >=20 > OK with that? 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