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-10-25 09:45:55.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/bfd/config.bfd 2012-05-15 18:25:34.000000000 +0530 +++ ./gdb_src/bfd/config.bfd 2012-10-23 15:09:08.000000000 +0530 @@ -345,6 +345,11 @@ case "${targ}" in targ_underscore=yes ;; + cr16*-*-uclinux*) + targ_defvec=bfd_elf32_cr16_vec + targ_underscore=yes + ;; + cr16c-*-elf*) targ_defvec=bfd_elf32_cr16c_vec targ_underscore=yes --- ./gdb_src.orig/include/opcode/cr16.h 2010-04-15 15:56:09.000000000 +0530 +++ ./gdb_src/include/opcode/cr16.h 2012-10-25 10:17:02.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 intruction. */ +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_ */