Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Sherrill <joel.sherrill@oarcorp.com>
To: gdb-patches@sourceware.org,   Ralf Corsepius <ralf.corsepius@rtems.org>
Subject: gdb 6.6 sim/erc32 does not parse -E option
Date: Thu, 22 Feb 2007 17:02:00 -0000	[thread overview]
Message-ID: <45DDCCAE.9060801@oarcorp.com> (raw)

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

             reply	other threads:[~2007-02-22 17:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 17:02 Joel Sherrill [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45DDCCAE.9060801@oarcorp.com \
    --to=joel.sherrill@oarcorp.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ralf.corsepius@rtems.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox