Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfa] cpu-h8300.c move default target to begin of list
@ 2002-05-28  8:50 Andrew Volkov
  2002-05-28 18:05 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Volkov @ 2002-05-28  8:50 UTC (permalink / raw)
  To: binutils, gdb-patches; +Cc: Alan Modra, Andrew Cagney

Hi,

This patch temporarily solve problem with loose arches in gdb 
(set/show architecture command).

Andrey Volkov

2002-05-28  Andrey Volkov  <avolkov@transas.com>

    * cpu-h8300.c : Make default h8300 machine first in
    machine list.


Index: cpu-h8300.c
===================================================================
RCS file: /cvs/src/src/bfd/cpu-h8300.c,v
retrieving revision 1.8
diff -u -r1.8 cpu-h8300.c
--- cpu-h8300.c	4 Apr 2002 14:04:39 -0000	1.8
+++ cpu-h8300.c	28 May 2002 15:20:39 -0000
@@ -97,34 +97,36 @@
     return in;
 }
 
-static const bfd_arch_info_type h8300_info_struct =
+static const bfd_arch_info_type h8300s_info_struct;
+
+static const bfd_arch_info_type h8300h_info_struct =
 {
-  16,				/* 16 bits in a word */
-  16,				/* 16 bits in an address */
+  32,				/* 32 bits in a word */
+  32,				/* 32 bits in an address */
   8,				/* 8 bits in a byte */
   bfd_arch_h8300,
-  bfd_mach_h8300,
-  "h8300",			/* arch_name  */
-  "h8300",			/* printable name */
+  bfd_mach_h8300h,
+  "h8300h",			/* arch_name  */
+  "h8300h",			/* printable name */
   1,
-  true,				/* the default machine */
+  false,			/* the default machine */
   compatible,
   h8300_scan,
 #if 0
   local_bfd_reloc_type_lookup,
 #endif
-  0,
+  &h8300s_info_struct
 };
 
-static const bfd_arch_info_type h8300h_info_struct =
+static const bfd_arch_info_type h8300s_info_struct =
 {
   32,				/* 32 bits in a word */
   32,				/* 32 bits in an address */
   8,				/* 8 bits in a byte */
   bfd_arch_h8300,
-  bfd_mach_h8300h,
-  "h8300h",			/* arch_name  */
-  "h8300h",			/* printable name */
+  bfd_mach_h8300s,
+  "h8300s",			/* arch_name  */
+  "h8300s",			/* printable name */
   1,
   false,			/* the default machine */
   compatible,
@@ -132,24 +134,26 @@
 #if 0
   local_bfd_reloc_type_lookup,
 #endif
-  &h8300_info_struct,
+  0
 };
 
+/* avolkov: Must be first in list, since this is default */
+
 const bfd_arch_info_type bfd_h8300_arch =
 {
-  32,				/* 32 bits in a word */
-  32,				/* 32 bits in an address */
+  16,				/* 16 bits in a word */
+  16,				/* 16 bits in an address */
   8,				/* 8 bits in a byte */
   bfd_arch_h8300,
-  bfd_mach_h8300s,
-  "h8300s",			/* arch_name  */
-  "h8300s",			/* printable name */
+  bfd_mach_h8300,
+  "h8300",			/* arch_name  */
+  "h8300",			/* printable name */
   1,
-  false,			/* the default machine */
+  true,				/* the default machine */
   compatible,
   h8300_scan,
 #if 0
   local_bfd_reloc_type_lookup,
 #endif
-  &h8300h_info_struct,
+  &h8300h_info_struct
 };
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-29  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-28  8:50 [patch/rfa] cpu-h8300.c move default target to begin of list Andrew Volkov
2002-05-28 18:05 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox