From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12525 invoked by alias); 24 Jan 2013 20:03:34 -0000 Received: (qmail 12498 invoked by uid 22791); 24 Jan 2013 20:03:33 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jan 2013 20:02:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0OK2ELG007948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Jan 2013 15:02:14 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0OK2BbN020623; Thu, 24 Jan 2013 15:02:13 -0500 Message-ID: <51019343.60209@redhat.com> Date: Thu, 24 Jan 2013 20:03:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Marcus Shawcroft CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] aarch64-tdep basic port. References: <50FECEA8.4010008@arm.com> In-Reply-To: <50FECEA8.4010008@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2013-01/txt/msg00611.txt.bz2 On 01/22/2013 05:38 PM, Marcus Shawcroft wrote: > Hi, > > Attached is a re-spin of the AArch64 basic port addressing comments received here: > > http://sourceware.org/ml/gdb-patches/2013-01/msg00449.html > http://sourceware.org/ml/gdb-patches/2013-01/msg00254.html > http://sourceware.org/ml/gdb-patches/2013-01/msg00255.html Thanks. Some more nits below, but otherwise I have no further comments. > > >> + if (tdep->jb_pc>= 0) > >> + set_gdbarch_get_longjmp_target (gdbarch, > aarch64_get_longjmp_target); > > > > Have you answered the comment I made in my first review? I can't > > find anything... > > Between the initial definition of jb_pc and this conditional is a call to gdbarch_init_osabi() both the aarch64-linux-tdep.c and aarch64-newlib-tdep.c contain an initializer that re-defines jb_pc. So the default, non-default-osabi implementation uses which libc? > A separate patch for documentation will be sent shortly. Thanks. > + > +/* Implement the "addr_bits_remove" gdbarch method. */ > + > +static CORE_ADDR > +aarch64_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val) > +{ > + /* All instructions are 4-byte aligned. */ > + return val & ~(CORE_ADDR) 0x3; > +} Excuse the ignorance, but why do you need this? Does Aarch64 do any magic low address encoding, like arm/thumb? On 01/22/2013 05:38 PM, Marcus Shawcroft wrote: > +aarch64_stub_unwind_sniffer (const struct frame_unwind *self, > + struct frame_info *this_frame, > + void **this_prologue_cache) > +{ > + CORE_ADDR addr_in_block; > + char dummy[4]; gdb_byte. > + > + addr_in_block = get_frame_address_in_block (this_frame); > + if (in_plt_section (addr_in_block, NULL) > + || target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0) > + return 1; Please import the comment arm-tdep.c has gained since (I guess) you forked this: http://sourceware.org/ml/gdb-patches/2010-03/msg00189.html (and check it makes sense for Aarch64 too). > + If the language code decides to pass in memory we want to move > + the pointer inserted as the intial argument from the argument > + list and into X8, the conventional AArch64 struct return pointer > + register. Typo "initial". > + while (! VEC_empty (stack_item_t, info.si)) GDB's coding standard says no space after "!": http://sourceware.org/gdb/current/onlinedocs/gdbint/Coding-Standards.html > + gdb_assert_not_reached ("regnum out of bound"); This throws, so the below is dead unreachable code. > + > + mark_value_bytes_unavailable (result_value, 0, > + TYPE_LENGTH (value_type (result_value))); > + return result_value; > +} -- Pedro Alves