From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68943 invoked by alias); 6 Aug 2019 16:15:42 -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 68875 invoked by uid 89); 6 Aug 2019 16:15:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=authentication X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.197.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Aug 2019 16:15:37 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 53A3FD96B3 for ; Tue, 6 Aug 2019 11:15:36 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id v27chosbx4FKpv27chxAsC; Tue, 06 Aug 2019 11:15:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ui35szfVqD9y1cHd96jS28/I6SZFcv2coHRmEX0yqI0=; b=idB1SxJX+es3bNUR6dWeFUNVsh 73HRpkbGveIc/xCmny9XoYcoBgqDSJXl3pOzWO05zBUAP2rXFjhM1QFQHP+yyvViWKG3QBz5Lx+CE rwrw+qvWAGsVuAVz0krMGEL62; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:52846 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hv27c-002F5W-0m; Tue, 06 Aug 2019 11:15:36 -0500 From: Tom Tromey To: Alan Hayward Cc: "gdb-patches\@sourceware.org" , nd Subject: Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace References: <20190730144123.11135-1-alan.hayward@arm.com> Date: Tue, 06 Aug 2019 16:15:00 -0000 In-Reply-To: <20190730144123.11135-1-alan.hayward@arm.com> (Alan Hayward's message of "Tue, 30 Jul 2019 14:41:27 +0000") Message-ID: <87imra9snt.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-08/txt/msg00140.txt.bz2 >>>>> "Alan" == Alan Hayward writes: Alan> Armv8.3-a Pointer Authentication causes the function return address to be Alan> obfuscated on entry to some functions. GDB must unmask the link register in Alan> order to produce a backtrace. Alan> The following patch adds markers of [PAC] to the bracktrace, to indicate Alan> which addresses needed unmasking. This includes the backtrace when using MI. Thanks for the patch. I don't think this was re-reviewed? Alan> --- a/gdb/frame.c Alan> +++ b/gdb/frame.c Alan> @@ -124,6 +124,8 @@ struct frame_info Alan> struct { Alan> enum cached_copy_status status; Alan> CORE_ADDR value; Alan> + /* Did VALUE require unmasking when being read. */ Alan> + bool masked; Alan> } prev_pc; I think putting the new field between "status" and "value" will pack the structure a bit better. Alan> +bool Alan> +get_frame_pc_masked (struct frame_info *frame) Maybe make the parameter "const"? I see there isn't much use of const in frame.h, but on the other hand, that's probably just historical and not required. Otherwise the patch looks fine to me. It is ok. I'd prefer those changes but if you'd prefer not, a note to that effect is fine. thanks, Tom