Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Kaushik Phatak <Kaushik.Phatak@kpitcummins.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>,
	       "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	       Joel Brobecker <brobecker@adacore.com>
Subject: Re: [RFA] New port: CR16: BFD Changes required by the gdb port
Date: Fri, 14 Dec 2012 18:52:00 -0000	[thread overview]
Message-ID: <50CB6CA4.1060901@redhat.com> (raw)
In-Reply-To: <C6CA53A2A46BA7469348BDBD663AB65848541C0B@KCHJEXMB02.kpit.com>

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


  reply	other threads:[~2012-12-14 18:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  7:04 Kaushik Phatak
2012-12-14 18:52 ` Pedro Alves [this message]
2012-12-28 12:18   ` Kaushik Phatak
2013-01-02 13:14     ` nick clifton
2013-01-03 11:16       ` Kaushik Phatak
2013-01-07 15:11         ` nick clifton
2013-01-08 11:24           ` Kaushik Phatak
2013-01-08 17:54             ` Pedro Alves
2013-01-15  9:24               ` Kaushik Phatak
2013-01-02 14:19     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50CB6CA4.1060901@redhat.com \
    --to=palves@redhat.com \
    --cc=Kaushik.Phatak@kpitcummins.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox