From patchwork Sun Nov 22 05:54:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 9769 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 23620 invoked by alias); 22 Nov 2015 05:58:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20820 invoked by uid 89); 22 Nov 2015 05:54:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 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; Sun, 22 Nov 2015 05:54:43 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id A4508340676 for ; Sun, 22 Nov 2015 05:54:30 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: mn10300: drop global callback handle [committed] Date: Sun, 22 Nov 2015 00:54:28 -0500 Message-Id: <1448171668-304-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes It's used in one place and can easily be replaced by using the sim state. --- sim/mn10300/ChangeLog | 7 +++++++ sim/mn10300/interp.c | 7 +------ sim/mn10300/mn10300_sim.h | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 7a9d3b3..920625e 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,10 @@ +2015-11-21 Mike Frysinger + + * interp.c (mn10300_callback): Delete. + (sim_open): Delete mn10300_callback assignment. + (program_interrupt): Call sim_io_printf. + * mn10300_sim.h (mn10300_callback): Delete. + 2015-11-17 Mike Frysinger * sim-main.h (WITH_CORE): Delete. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index f3941ae..4940acc 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -24,7 +24,6 @@ #include "bfd.h" -host_callback *mn10300_callback; struct _state State; @@ -97,7 +96,6 @@ sim_open (SIM_OPEN_KIND kind, { int i; SIM_DESC sd = sim_state_alloc (kind, cb); - mn10300_callback = cb; SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); @@ -418,10 +416,7 @@ program_interrupt (SIM_DESC sd, /* avoid infinite recursion */ if (in_interrupt) - { - (*mn10300_callback->printf_filtered) (mn10300_callback, - "ERROR: recursion in program_interrupt during software exception dispatch."); - } + sim_io_printf (sd, "ERROR: recursion in program_interrupt during software exception dispatch."); else { in_interrupt = 1; diff --git a/sim/mn10300/mn10300_sim.h b/sim/mn10300/mn10300_sim.h index 6e8f53a..f70d486 100644 --- a/sim/mn10300/mn10300_sim.h +++ b/sim/mn10300/mn10300_sim.h @@ -8,7 +8,6 @@ #include "bfd.h" #include "sim-fpu.h" -extern host_callback *mn10300_callback; extern SIM_DESC simulator; typedef unsigned8 uint8;