From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19503 invoked by alias); 22 Feb 2007 17:02:54 -0000 Received: (qmail 19481 invoked by uid 22791); 22 Feb 2007 17:02:51 -0000 X-Spam-Check-By: sourceware.org Received: from mail.oarcorp.com (HELO mail.oarcorp.com) (216.186.189.5) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 22 Feb 2007 17:02:41 +0000 Received: (qmail 23783 invoked by uid 507); 22 Feb 2007 17:02:38 -0000 Received: from 192.168.1.3 by mail.oarcorp.com (envelope-from , uid 501) with qmail-scanner-1.25st (spamassassin: 3.1.1. perlscan: 1.25st. Clear:RC:1(192.168.1.3):. Processed in 0.037992 secs); 22 Feb 2007 17:02:38 -0000 X-Qmail-Scanner-Mail-From: joel.sherrill@oarcorp.com via mail.oarcorp.com X-Qmail-Scanner: 1.25st (Clear:RC:1(192.168.1.3):. Processed in 0.037992 secs Process 23776) Received: from unknown (HELO ?192.168.1.3?) (192.168.1.3) by mail.oarcorp.com with SMTP; 22 Feb 2007 17:02:38 -0000 Message-ID: <45DDCCAE.9060801@oarcorp.com> Date: Thu, 22 Feb 2007 17:02:00 -0000 From: Joel Sherrill User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: gdb-patches@sourceware.org, Ralf Corsepius Subject: gdb 6.6 sim/erc32 does not parse -E option Content-Type: multipart/mixed; boundary="------------010205050301090606070301" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00273.txt.bz2 This is a multi-part message in MIME format. --------------010205050301090606070301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 506 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 * interf.c: Add parsing of -E option to eliminate error message. --------------010205050301090606070301 Content-Type: text/x-patch; name="sis.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sis.diff" Content-length: 712 --- 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 option for -E (%s)\n", + endian); + } } else { (*sim_callback->printf_filtered) (sim_callback, "unknown option %s\n", --------------010205050301090606070301--