Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kaushik Phatak <Kaushik.Phatak@kpitcummins.com>
To: nick clifton <nickc@redhat.com>, Tom Tromey <tromey@redhat.com>
Cc: Pedro Alves <palves@redhat.com>,
	"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: Thu, 03 Jan 2013 11:16:00 -0000	[thread overview]
Message-ID: <C6CA53A2A46BA7469348BDBD663AB65848564F47@KCHJEXMB02.kpit.com> (raw)
In-Reply-To: <50E431EF.5030904@redhat.com>

Hi Nick,
Thanks for the review and commit.

Tom Tromey > make_instruction,match_opcode): Added function prototypes.
> What about these?
Yes, I agree. These functions are used by the tdep files as well, so a prefix
here would be useful.

Please find below a patch that adds similar prefix for make_instruction
and match_opcode. I have re-based this against gdb-7.5.50.20130103.
Also fixed a minor typo (doewsn't -> doesn't)

Please review and let me know if ok.
Thanks,
Kaushik

2013-01-03  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
include/opcode/ChangeLog
	* cr16.h (cr16_match_opcode,cr16_make_instruction): Added
	prefix 'cr16_'.
	
diff -uprN gdb_src.orig/include/opcode/cr16.h gdb_src/include/opcode/cr16.h
--- gdb_src.orig/include/opcode/cr16.h	2013-01-02 18:43:36.000000000 +0530
+++ gdb_src/include/opcode/cr16.h	2013-01-03 15:53:35.000000000 +0530
@@ -445,7 +445,7 @@ extern ULONGLONG cr16_allWords;
 extern ins cr16_currInsn;
 
 /* Prototypes for function in cr16-dis.c.  */
-extern void make_instruction (void);
-extern int  match_opcode (void);
+extern void cr16_make_instruction (void);
+extern int  cr16_match_opcode (void);
 
 #endif /* _CR16_H_ */
diff -uprN gdb_src.orig/opcodes/cr16-dis.c gdb_src/opcodes/cr16-dis.c
--- gdb_src.orig/opcodes/cr16-dis.c	2013-01-02 18:43:35.000000000 +0530
+++ gdb_src/opcodes/cr16-dis.c	2013-01-03 16:25:42.000000000 +0530
@@ -315,10 +315,10 @@ build_mask (void)
 /* Search for a matching opcode. Return 1 for success, 0 for failure.  */
 
 int
-match_opcode (void)
+cr16_match_opcode (void)
 {
   unsigned long mask;
-  /* The instruction 'constant' opcode doewsn't exceed 32 bits.  */
+  /* The instruction 'constant' opcode doesn't exceed 32 bits.  */
   unsigned long doubleWord = (cr16_words[1]
 			     + (cr16_words[0] << 16)) & 0xffffffff;
 
@@ -743,7 +743,7 @@ print_arguments (ins *currentInsn, bfd_v
 /* Build the instruction's arguments.  */
 
 void
-make_instruction (void)
+cr16_make_instruction (void)
 {
   int i;
   unsigned int shift;
@@ -813,7 +813,7 @@ print_insn_cr16 (bfd_vma memaddr, struct
   /* Retrieve the encoding from current memory location.  */
   get_words_at_PC (memaddr, info);
   /* Find a matching opcode in table.  */
-  is_decoded = match_opcode ();
+  is_decoded = cr16_match_opcode ();
   /* If found, print the instruction's mnemonic and arguments.  */
   if (is_decoded > 0 && (cr16_words[0] << 16 || cr16_words[1]) != 0)
     {
@@ -825,7 +825,7 @@ print_insn_cr16 (bfd_vma memaddr, struct
       if (((cr16_currInsn.nargs = get_number_of_operands ()) != 0)
 	  && ! (IS_INSN_MNEMONIC ("b")))
         info->fprintf_func (info->stream, "\t");
-      make_instruction ();
+      cr16_make_instruction ();
       /* For push/pop/pushrtn with RA instructions.  */
       if ((INST_HAS_REG_LIST) && ((cr16_words[0] >> 7) & 0x1))
         cr16_currInsn.nargs +=1;



  reply	other threads:[~2013-01-03 11:16 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
2012-12-28 12:18   ` Kaushik Phatak
2013-01-02 13:14     ` nick clifton
2013-01-03 11:16       ` Kaushik Phatak [this message]
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=C6CA53A2A46BA7469348BDBD663AB65848564F47@KCHJEXMB02.kpit.com \
    --to=kaushik.phatak@kpitcummins.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    /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