From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12560 invoked by alias); 4 Nov 2015 19:56:09 -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 12551 invoked by uid 89); 4 Nov 2015 19:56:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Nov 2015 19:56:08 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 0B392834; Wed, 4 Nov 2015 19:56:07 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA4Ju4v3019568; Wed, 4 Nov 2015 14:56:05 -0500 Message-ID: <563A62D3.1020804@redhat.com> Date: Wed, 04 Nov 2015 19:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Antoine Tremblay , gdb-patches@sourceware.org Subject: Re: [PATCH 07/10] Share some ARM target dependant code from GDB with GDBServer. References: <1446138583-13268-1-git-send-email-antoine.tremblay@ericsson.com> <1446138583-13268-8-git-send-email-antoine.tremblay@ericsson.com> In-Reply-To: <1446138583-13268-8-git-send-email-antoine.tremblay@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00157.txt.bz2 On 10/29/2015 05:09 PM, Antoine Tremblay wrote: > This patch is in preparation for software single stepping support on ARM it > shares some functions and defenitions that will be needed. > > No regressions, tested on ubuntu 14.04 ARMv7 and x86. > With gdbserver-{native,extended} / { -marm -mthumb } > > Not tested : wince/bsd build. Please make sure that --enable-targets=all still builds. > > gdb/ChangeLog: > > * arch/arm.c (bitcount): Move from arm-tdep.c > (condition_true): Likewise. > * arch/arm.h (Instruction Definitions): Move form arm-tdep.h. > (condition_true): Move defenition from arm-tdep.h > (bitcount): Likewise. > * arm-tdep.c (condition_true): Move to arch/arm.c. > (bitcount): Likewise. > * arm-tdep.h (Instruction Definitions): Move to arch/arm.h. > * arm-wince-tdep.c: Include arch/arm.h. > * armnbsd-tdep.c: Likewise. Missing a couple periods. > +/* Returns true of the condition evaluates to true. */ s/of/if/ ? > + > +int > +condition_true (unsigned long cond, unsigned long status_reg) > +{ > + > /* Addresses for calling Thumb functions have the bit 0 set. > Here are some macros to test, set, or clear bit 0 of addresses. */ > #define IS_THUMB_ADDR(addr) ((addr) & 1) > @@ -68,4 +98,10 @@ enum gdb_regnum { > first halfword is INST1. */ > int thumb_insn_size (unsigned short inst1); > > +/* Returns true of the condition evaluates to true. */ Likewise. > +int condition_true (unsigned long cond, unsigned long status_reg); > + > +/* Return number of 1-bits in VAL. */ > +int bitcount (unsigned long val); These comments are duplicated though. The .c file's comments should instead point to the .h file. Thanks, Pedro Alves