This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
gdb 6.6 sim/erc32 does not parse -E option
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: gdb-patches at sourceware dot org, Ralf Corsepius <ralf dot corsepius at rtems dot org>
- Date: Thu, 22 Feb 2007 11:02:38 -0600
- Subject: gdb 6.6 sim/erc32 does not parse -E option
Hi,
Apparently gdb 6.6 passes a -E endian option
to the sim_open hook. The erc32 simulator
does not parse this option and produces
a error message like this:
(gdb) tar sim
unknown option -E
open of big failed
Connected to the simulator.
The attached patch is in the style of the
existing code and silently eats the -E option
if the endian value is big or little.
2007-02-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* interf.c: Add parsing of -E <endian> option
to eliminate error message.
--- gdb-6.6-orig/sim/erc32/interf.c 2005-11-28 12:33:03.000000000 -0600
+++ gdb-6.6/sim/erc32/interf.c 2007-02-22 10:56:55.000000000 -0600
@@ -236,6 +236,18 @@
if ((stat + 1) < argc) {
freq = VAL(argv[++stat]);
}
+ } else
+ if (strcmp(argv[stat], "-E") == 0) {
+ const char *endian = argv[++stat];
+ if ((strcmp(endian, "big") == 0) ||
+ (strcmp(endian, "little") == 0)) {
+ ; /* not supported but correctly supplied, be silent */
+ } else {
+ (*sim_callback->printf_filtered) (
+ sim_callback,
+ "Invalid <endian> option for -E (%s)\n",
+ endian);
+ }
} else {
(*sim_callback->printf_filtered) (sim_callback,
"unknown option %s\n",