From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4198 invoked by alias); 7 Jan 2014 11:05:29 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 4184 invoked by uid 89); 7 Jan 2014 11:05:28 -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,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qe0-f53.google.com Received: from mail-qe0-f53.google.com (HELO mail-qe0-f53.google.com) (209.85.128.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 07 Jan 2014 11:05:27 +0000 Received: by mail-qe0-f53.google.com with SMTP id t7so180370qeb.26 for ; Tue, 07 Jan 2014 03:05:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=s4ER1BvDfkZS2NeeFi0J7tkiMa4AfeRIA44nux/h200=; b=ZEPT3NR8JtWjGu9rxBvV7uDzkYSOBsA8cAa0EhsQfCvm6Prj0Lkh880fi3U77vGdkp L7wWtRET38w0LpB109Osczgd21PSCUwTqX8JouHOAYc0y8owdraNDcuURj/GRa9Sapg/ QaxnVGH/B83ZyWhkHOiOAUkdbEz2h0epTbIdo+X4PLLbAA6bfglixFE1e0ijHSQAAM5m 20PbwHzUg8nrp9MIomJ8M0atE446/rbWmdaYJ/0HKHrvuopSUmh+ok/TRQaPSwccSVNS cUqcvHzLITkcwpQahtBLdHx+66Zc5jehhmK4d74c7xU0i/MLRdkqAhwmEOQk5rmo1YYe X2qQ== X-Gm-Message-State: ALoCoQnsv/D+aOwN8Tgim3ohXD6lGOykBmE8A2X5O3JCzFGzpcTrTBQAdxx6H/NLF2PaTElqW0gg MIME-Version: 1.0 X-Received: by 10.49.131.164 with SMTP id on4mr198027165qeb.16.1389092725116; Tue, 07 Jan 2014 03:05:25 -0800 (PST) Received: by 10.140.83.19 with HTTP; Tue, 7 Jan 2014 03:05:25 -0800 (PST) In-Reply-To: <87iotxm15i.fsf@fleche.redhat.com> References: <87iotxm15i.fsf@fleche.redhat.com> Date: Tue, 07 Jan 2014 11:05:00 -0000 Message-ID: Subject: Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64 From: Venkataramanan Kumar To: Tom Tromey Cc: libc-ports@sourceware.org, Marcus Shawcroft , Marcus Shawcroft , "Carlos O'Donell" , Patch Tracking Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2014-01/txt/msg00020.txt.bz2 Hi, The mangling patch is already up streamed. So I will include this addition as a separate patch. I looked at x86 and powerpc ports. So for Aarch64 longjmp/longjmp_target probe expects * first argument 8@address of jmpbuf in x0. * second argument -4@return val in x1. * third argument 8@ address of target in LR/X30. The patch below does that. (--snip--) --- a/ports/sysdeps/aarch64/__longjmp.S +++ b/ports/sysdeps/aarch64/__longjmp.S @@ -18,6 +18,7 @@ #include #include +#include /* __longjmp(jmpbuf, val) */ @@ -56,6 +57,7 @@ ENTRY (__longjmp) #else ldp x29, x30, [x0, #JB_X29<<3] #endif + LIBC_PROBE (longjmp, 3, 8@x0, -4@x1, 8@x30) ldp d8, d9, [x0, #JB_D8<<3] ldp d10, d11, [x0, #JB_D10<<3] ldp d12, d13, [x0, #JB_D12<<3] @@ -97,6 +99,7 @@ ENTRY (__longjmp) #else ldr x5, [x0, #JB_SP<<3] #endif + LIBC_PROBE (longjmp_target, 3, 8@x0, -4@x1, 8@x30) mov sp, x5 cmp x1, #0 mov x0, #1 (--snip--) Please let me know if this is fine, I will start doing the testing. regards, Venkat. On 6 January 2014 23:40, Tom Tromey wrote: >>>>>> ">" == Venkataramanan Kumar writes: > >>> This patch adds pointer mangling support for Aarch64. > > IIRC the Aarch64 longjmp code doesn't have the sdt.h probes in place. > If you add pointer mangling without also adding the sdt.h probes, then > gdb's longjmp support will break. You should be able to see this easily > in the gdb test suite. > > Adding the probes is quite easy to do, so I encourage you to add that > to the patch. > > thanks, > Tom