Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* gdb 6.6 sim/erc32 does not parse -E option
@ 2007-02-22 17:02 Joel Sherrill
  2007-02-22 17:12 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2007-02-22 17:02 UTC (permalink / raw)
  To: gdb-patches, Ralf Corsepius

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

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.

[-- Attachment #2: sis.diff --]
[-- Type: text/x-patch, Size: 712 bytes --]

--- 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",

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

end of thread, other threads:[~2007-02-22 18:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 17:02 gdb 6.6 sim/erc32 does not parse -E option Joel Sherrill
2007-02-22 17:12 ` Daniel Jacobowitz
2007-02-22 17:28   ` Joel Sherrill
2007-02-22 18:16     ` Daniel Jacobowitz
2007-02-22 18:26       ` Joel Sherrill
2007-02-22 18:32         ` Daniel Jacobowitz
2007-02-22 18:46           ` Joel Sherrill
2007-02-22 18:49             ` Daniel Jacobowitz

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