From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2767 invoked by alias); 25 Jan 2017 15:37:22 -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 2746 invoked by uid 89); 25 Jan 2017 15:37:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy==e5=b0=a7, Hx-languages-length:2224, H*r:AES128-SHA?= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wj0-f195.google.com Received: from mail-wj0-f195.google.com (HELO mail-wj0-f195.google.com) (209.85.210.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jan 2017 15:37:20 +0000 Received: by mail-wj0-f195.google.com with SMTP id i7so3508420wjf.2; Wed, 25 Jan 2017 07:37:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jELhgLLdwpu6wp7rcoxOIQzBfuKt7de8lVczezC8eQ0=; b=X89hmBA06UXb9RcPWkCCoi9jnd5DlYUGp9Ez8rhHwrvjvm06BqXydJ1MbKw2rg975T 9aSUGapxH55tVyMT2pqRU9rG+Rm7cdCgKdoA0wALNmp/kwjxdfoQrBN3lXNf9Q/DoheV XNGN5ptn+aiWUYMCBP3BBb7aTEvT9YWsMpCYx+5IMpY+KLIUOcnA1Ta8susb90xt1Nph DMMjvzFFfworuanULjSvEiZJIDkuJnbFzMwYmVp1cjcauEFOyaBqAqQ/OJF6HeAgDgVx /8FoNFh7XdSMV4bvlVjzzItmV1TgO0LJgTaKq1GEOIqrp8gvZC2Ral3oZ3/oOQ/1KR9T +fTA== X-Gm-Message-State: AIkVDXIQjP6PRbZ6xi6CSqLRc/NJTWdUpwGZxnrZETF1/k61PnFZgYighCWPogs9/ryKuw== X-Received: by 10.28.130.212 with SMTP id e203mr21755551wmd.104.1485358638705; Wed, 25 Jan 2017 07:37:18 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id e6sm25498444wrc.30.2017.01.25.07.37.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 25 Jan 2017 07:37:18 -0800 (PST) Date: Wed, 25 Jan 2017 15:37:00 -0000 From: Yao Qi To: Steve Ellcey Cc: binutils@sourceware.org, gdb-patches Subject: Re: [PATCH] Patch 1 of 2 for aarch64 ILP32 support in gdb Message-ID: <20170125153657.GV28060@E107787-LIN> References: <1485303529.29977.8.camel@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1485303529.29977.8.camel@caviumnetworks.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00532.txt.bz2 On 17-01-24 16:18:49, Steve Ellcey wrote: > --- a/bfd/cpu-aarch64.c > +++ b/bfd/cpu-aarch64.c > @@ -25,7 +25,8 @@ > > /* This routine is provided two arch_infos and works out which Aarch64 > machine which would be compatible with both and returns a pointer > - to its info structure. */ > + to its info structure. ABI (ilp32 vs. lp64) and endianness compatibility > + are checked in elfNN_aarch64_merge_private_bfd_data. */ > > static const bfd_arch_info_type * > compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b) > @@ -38,10 +39,6 @@ compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b) > if (a->mach == b->mach) > return a; > > - /* Don't allow mixing ilp32 with lp64. */ > - if ((a->mach & bfd_mach_aarch64_ilp32) != (b->mach & bfd_mach_aarch64_ilp32)) > - return NULL; > - Hi Steve, GDB uses this function to check if selected arch is compatible with the target arch. If I load an ilp32 binary in aarch64 gdb, and connect to gdbserver, I'll get a warning as below, Reading symbols from ../1.o...(no debugging symbols found)...done. (gdb) target remote linaro-junor1-1:1234 Remote debugging using linaro-junor1-1:1234 warning: Selected architecture aarch64:ilp32 is not compatible with reported target architecture aarch64 with your patch applied, the warning goes way. (gdb) target remote linaro-junor1-1:1234 Remote debugging using linaro-junor1-1:1234 Reading /scratch/yao/toolchain/gcc-7/aarch64-linux-gnu/sysroot/lib/ld-linux-aarch64.so.1 from remote target... Reading /scratch/yao/toolchain/gcc-7/aarch64-linux-gnu/sysroot/lib/ld-linux-aarch64.so.1 from remote target... Reading symbols from target:/scratch/yao/toolchain/gcc-7/aarch64-linux-gnu/sysroot/lib/ld-linux-aarch64.so.1...done. Python Exception Installation error: gdb.execute_unwinders function is missing: 0x0000ffffb7fd2d00 in _start () from target:/scratch/yao/toolchain/gcc-7/aarch64-linux-gnu/sysroot/lib/ld-linux-aarch64.so.1 IMO, the warning above is useful, since aarch64:ilp32 is not supported in gdb, can we commit this patch after ilp32 is supported in GDB (if this patch only affects GDB). -- Yao (齐尧)