From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30978 invoked by alias); 14 Dec 2012 18:52:28 -0000 Received: (qmail 30962 invoked by uid 22791); 14 Dec 2012 18:52:27 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,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; Fri, 14 Dec 2012 18:52:20 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBEIqH94010694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Dec 2012 13:52:18 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBEIF0v3029087; Fri, 14 Dec 2012 13:15:01 -0500 Message-ID: <50CB6CA4.1060901@redhat.com> Date: Fri, 14 Dec 2012 18:52:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Kaushik Phatak CC: "binutils@sourceware.org" , "gdb-patches@sourceware.org" , Joel Brobecker Subject: Re: [RFA] New port: CR16: BFD Changes required by the gdb port References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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: 2012-12/txt/msg00514.txt.bz2 On 11/26/2012 07:03 AM, Kaushik Phatak wrote: > diff -uprN ./gdb_src.orig/opcodes/cr16-dis.c ./gdb_src/opcodes/cr16-dis.c > --- ./gdb_src.orig/opcodes/cr16-dis.c 2012-05-17 20:43:25.000000000 +0530 > +++ ./gdb_src/opcodes/cr16-dis.c 2012-11-26 11:21:43.000000000 +0530 > @@ -36,9 +36,6 @@ > /* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */ > #define SBM(offs) ((((1 << (32 - offs)) -1) << (offs))) > > -typedef unsigned long dwordU; > -typedef unsigned short wordU; > - > typedef struct > { > dwordU val; > @@ -317,7 +314,7 @@ build_mask (void) > > /* Search for a matching opcode. Return 1 for success, 0 for failure. */ > > -static int > +int > match_opcode (void) > { > unsigned long mask; > @@ -734,7 +731,7 @@ print_arguments (ins *currentInsn, bfd_v > > /* Build the instruction's arguments. */ > > -static void > +void > make_instruction (void) > { > int i; ... > --- ./gdb_src.orig/include/opcode/cr16.h 2010-04-15 15:56:09.000000000 +0530 > +++ ./gdb_src/include/opcode/cr16.h 2012-11-16 12:43:59.000000000 +0530 > @@ -435,4 +435,17 @@ extern const inst *instruction; > typedef long long int LONGLONG; > typedef unsigned long long ULONGLONG; > > +/* Data types for opcode handling. */ > +typedef unsigned long dwordU; > +typedef unsigned short wordU; > + > +/* Globals to store opcode data and build the instruction. */ > +extern wordU words[3]; > +extern ULONGLONG allWords; > +extern ins currInsn; > + > +/* Prototypes for function in cr16-dis.c. */ > +void make_instruction (void); > +int match_opcode (void); > + > #endif /* _CR16_H_ */ It'd be nice if all these exported symbols were prefixed, to avoid namespace collisions. -- Pedro Alves