This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[patch/rfa] cpu-h8300.c move default target to begin of list
- From: Andrew Volkov <Andrew dot Volkov at transas dot com>
- To: binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Cc: Alan Modra <amodra at bigpond dot net dot au>,Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 28 May 2002 19:33:11 +0400
- Subject: [patch/rfa] cpu-h8300.c move default target to begin of list
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
};