From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16831 invoked by alias); 29 Oct 2014 06:07:45 -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 16819 invoked by uid 89); 29 Oct 2014 06:07:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Oct 2014 06:07:43 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1XjMQ0-0006zP-F6 from Yao_Qi@mentor.com ; Tue, 28 Oct 2014 23:07:40 -0700 Received: from GreenOnly (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.181.6; Tue, 28 Oct 2014 23:07:37 -0700 From: Yao Qi To: Victor Kamensky CC: , Andrew Pinski Subject: Re: [PATCH 2/2] aarch64: tramp_frame_start function need to read instrs correctly in be8 case References: <1414379668-5351-1-git-send-email-victor.kamensky@linaro.org> <1414379668-5351-3-git-send-email-victor.kamensky@linaro.org> Date: Wed, 29 Oct 2014 06:07:00 -0000 In-Reply-To: <1414379668-5351-3-git-send-email-victor.kamensky@linaro.org> (Victor Kamensky's message of "Sun, 26 Oct 2014 20:14:28 -0700") Message-ID: <87sii7tnu5.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00789.txt.bz2 Victor Kamensky writes: Looks the problem this patch fixes isn't arch specific. This problem exists for a while, but is exposed by your configuration (data endianness !=3D instruction endianness). gdbarch_byte_order_for_code must be used for reading instructions. > gdb/ChangeLog: > > 2014-10-24 Victor Kamensky An empty line here is needed. > * gdb/tramp-frame.c (tramp_frame_start): Use > gdbarch_byte_order_for_code to read aarch64 instruction. > --- > gdb/tramp-frame.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c > index 0fd6ddc..41dcd94 100644 > --- a/gdb/tramp-frame.c > +++ b/gdb/tramp-frame.c > @@ -83,7 +83,7 @@ tramp_frame_start (const struct tramp_frame *tramp, > struct frame_info *this_frame, CORE_ADDR pc) > { > struct gdbarch *gdbarch =3D get_frame_arch (this_frame); > - enum bfd_endian byte_order =3D gdbarch_byte_order (gdbarch); > + enum bfd_endian byte_order =3D gdbarch_byte_order_for_code (gdbarch); > int ti; Please rename variable byte_order to byte_order_for_code. OK with these changes. --=20 Yao (=E9=BD=90=E5=B0=A7)