From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24663 invoked by alias); 16 Dec 2013 12:42:46 -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 24649 invoked by uid 89); 16 Dec 2013 12:42:45 -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: mga01.intel.com Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Dec 2013 12:42:45 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 16 Dec 2013 04:42:43 -0800 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 16 Dec 2013 04:42:42 -0800 Received: from irsmsx106.ger.corp.intel.com (163.33.3.31) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 16 Dec 2013 12:42:05 +0000 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.135]) by IRSMSX106.ger.corp.intel.com ([169.254.8.15]) with mapi id 14.03.0123.003; Mon, 16 Dec 2013 12:42:05 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "jan.kratochvil@redhat.com" , "gdb-patches@sourceware.org" Subject: RE: [patch v8 21/24] record-btrace: extend unwinder Date: Mon, 16 Dec 2013 12:42:00 -0000 Message-ID: References: <1386839747-8860-1-git-send-email-markus.t.metzger@intel.com> <1386839747-8860-22-git-send-email-markus.t.metzger@intel.com> <52AB63BB.30206@redhat.com> In-Reply-To: <52AB63BB.30206@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/msg00569.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Friday, December 13, 2013 8:45 PM > > @@ -1511,6 +1512,11 @@ dwarf2_frame_base_sniffer (struct frame_info > *this_frame) > > CORE_ADDR > > dwarf2_frame_cfa (struct frame_info *this_frame) > > { > > + if (frame_unwinder_is (this_frame, > &record_btrace_tailcall_frame_unwind) > > + || frame_unwinder_is (this_frame, &record_btrace_frame_unwind)) > > + throw_error (NOT_AVAILABLE_ERROR, > > + _("cfa not available for record btrace target")); >=20 > Kind of odd abstraction boundaries broken here. On the one hand, > we go through the target for the unwind sniffing, but OTOH, here > we refer to the unwinders directly. Hmm. >=20 > Ah, I don't think it really matters -- if you convert > to the frame_info.stack_status =3D=3D FID_STACK_UNAVAILABLE > mechanism, then this can check for that instead, and the > get_frame_unwind_stop_reason check can even be eliminated. > Perhaps it should be even get_frame_base the one that > throws. We need that check before checking for dwarf2 unwinders. Get_frame_base is called later but only for dwarf2 unwinders. I will try to replace the check with a check for stack availability. > > /* Level of the selected frame: 0 for innermost, 1 for its caller, ... > > diff --git a/gdb/frame.h b/gdb/frame.h > > index 71f07dd..b20b69f 100644 > > --- a/gdb/frame.h > > +++ b/gdb/frame.h > > @@ -222,7 +222,11 @@ enum frame_type > > ARCH_FRAME, > > /* Sentinel or registers frame. This frame obtains register values > > direct from the inferior's registers. */ > > - SENTINEL_FRAME > > + SENTINEL_FRAME, > > + /* A branch tracing frame. */ > > + BTRACE_FRAME, > > + /* A branch tracing tail call frame. */ > > + BTRACE_TAILCALL_FRAME > > }; >=20 > Hmm? Why were these needed? Missing patch rationale... And missing > comments, I suppose. The alternative would be to pretend that they are NORMAL_FRAME and TAILCALL_FRAME, respectively. I thought it cleaner to add a new frame type. Those frames don't have available stack. Do you want me to use NORMAL_FRAME and TAILCALL_FRAME, instead? 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