Hello,

It may be intended, but gdb has not been updated with the official
MSP430 ELF magic number. Anyway, here's a patch...


Regards,
   --Daniel

Index: bfd/elf32-msp430.c
===================================================================
RCS file: /cvsroot/mspgcc/gdb/gdb-5.1.1/bfd/elf32-msp430.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 elf32-msp430.c
--- bfd/elf32-msp430.c	9 Apr 2002 20:10:28 -0000	1.1.1.1
+++ bfd/elf32-msp430.c	4 Mar 2003 17:13:40 -0000
@@ -566,7 +566,8 @@
      bfd *abfd;
 {
   int e_set = bfd_mach_msp14;
-  if (elf_elfheader (abfd)->e_machine == EM_MSP430)
+  if (elf_elfheader (abfd)->e_machine == EM_MSP430
+      || elf_elfheader (abfd)->e_machine == EM_MSP430_OLD)
     {
       int e_mach = elf_elfheader (abfd)->e_flags & EF_MSP430_MACH;
       switch (e_mach)
Index: include/elf/common.h
===================================================================
RCS file: /cvsroot/mspgcc/gdb/gdb-5.1.1/include/elf/common.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 common.h
--- include/elf/common.h	9 Apr 2002 20:10:42 -0000	1.1.1.1
+++ include/elf/common.h	4 Mar 2003 17:13:40 -0000
@@ -162,6 +162,7 @@
 #define EM_MMIX	       80	/* Donald Knuth's educational 64-bit processor */
 #define EM_HUANY       81	/* Harvard's machine-independent format */
 #define EM_PRISM       82	/* SiTera Prism */
+#define EM_MSP430     105	/* TI msp430 micro controller */
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -222,7 +223,7 @@
 
 /* MSP430 magic number
    Written in the absense everything */
-#define EM_MSP430               0x1059
+#define EM_MSP430_OLD           0x1059
 
 /* OpenRISC magic number
    Written in the absense of an ABI.  */

Reply via email to