From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28482 invoked by alias); 25 Dec 2015 01:37:15 -0000 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 Received: (qmail 28465 invoked by uid 89); 25 Dec 2015 01:37:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=3010, Hx-languages-length:3289, families X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Dec 2015 01:37:12 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9A58F34069F for ; Fri, 25 Dec 2015 01:37:10 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: cris: move option install to sim_open [committed] Date: Fri, 25 Dec 2015 01:37:00 -0000 Message-Id: <1451007426-27017-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00481.txt.bz2 We've moved custom option install for other targets to sim_open, so update cris too. It's the last one using MODULE_LIST, so we can drop that from the common code too. --- sim/common/ChangeLog | 4 ++++ sim/common/sim-module.c | 4 ---- sim/cr16/ChangeLog | 7 +++++++ sim/cris/sim-if.c | 18 +++++++----------- sim/cris/tconfig.h | 4 ---- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index cb1a9a6..8340928 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,9 @@ 2015-12-24 Mike Frysinger + * sim-module.c (MODULE_LIST): Delete. + +2015-12-24 Mike Frysinger + * sim-options.c (OPTION_H8300H, OPTION_H8300S, OPTION_H8300SX): Move to h8300/compile.c. [SIM_H8300] (standard_options): Likewise. diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 8498f80..4f23882 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -65,10 +65,6 @@ static MODULE_INSTALL_FN * const modules[] = { /* TODO: Shouldn't have device models here. */ dv_sockser_install, #endif - /* Configured in [simulator specific] additional modules. */ -#ifdef MODULE_LIST - MODULE_LIST -#endif 0 }; diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index c63586a..b23e0cb 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,10 @@ +2015-12-24 Mike Frysinger + + * sim-if.c (cris_option_install): Delete. + (sim_open): Call sim_add_option_table. + * tconfig.h: Delete sim-module.h include. + (MODULE_INSTALL_FN, MODULE_LIST): Delete. + 2015-11-15 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-reason.o, sim-reg.o, and diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 9fb1e13..115ff21 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -127,17 +127,6 @@ static const OPTION cris_options[] = { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL, NULL } }; -/* Add the CRIS-specific option list to the simulator. */ - -SIM_RC -cris_option_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sim_add_option_table (sd, NULL, cris_options) != SIM_RC_OK) - return SIM_RC_FAIL; - return SIM_RC_OK; -} - /* Handle CRIS-specific options. */ static SIM_RC @@ -761,6 +750,13 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, return 0; } + /* Add the CRIS-specific option list to the simulator. */ + if (sim_add_option_table (sd, NULL, cris_options) != SIM_RC_OK) + { + free_state (sd); + return 0; + } + /* getopt will print the error message so we just have to exit if this fails. FIXME: Hmmm... in the case of gdb we need getopt to call print_filtered. */ diff --git a/sim/cris/tconfig.h b/sim/cris/tconfig.h index 8f82ac7..e512c3d 100644 --- a/sim/cris/tconfig.h +++ b/sim/cris/tconfig.h @@ -30,10 +30,6 @@ along with this program. If not, see . */ /* For MSPR support. FIXME: revisit. */ #define WITH_DEVICES 1 -#include "sim-module.h" -extern MODULE_INSTALL_FN cris_option_install; -#define MODULE_LIST cris_option_install, - #define SIM_HAVE_MODEL /* This is a global setting. Different cpu families can't mix-n-match -scache -- 2.6.2