public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: cris: fix a few missing prototype warnings
Date: Wed, 23 Jun 2021 20:20:41 -0400	[thread overview]
Message-ID: <20210624002041.30211-1-vapier@gentoo.org> (raw)

Add a stub prototype for the dump function meant to be called by devs
from gdb, and trim unused functions that aren't supposed to be used.
---
 sim/cris/cris-sim.h |  1 -
 sim/cris/traps.c    | 34 +++-------------------------------
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/sim/cris/cris-sim.h b/sim/cris/cris-sim.h
index dfd2cb83bbb4..13e8c4a15da2 100644
--- a/sim/cris/cris-sim.h
+++ b/sim/cris/cris-sim.h
@@ -79,7 +79,6 @@ typedef struct {
 
 /* Handler prototypes for functions called from the CGEN description.  */
 
-extern USI cris_bmod_handler (SIM_CPU *, UINT, USI);
 extern void cris_flush_simulator_decode_cache (SIM_CPU *, USI);
 extern USI crisv10f_break_handler (SIM_CPU *, USI, USI);
 extern USI crisv32f_break_handler (SIM_CPU *, USI, USI);
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index fd7f9bc7ae29..49f99baa4c1b 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -929,8 +929,10 @@ is_mapped_only (SIM_DESC sd ATTRIBUTE_UNUSED,
   return 0;
 }
 
-/* Debug helper; to be run from gdb.  */
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void cris_dump_map (SIM_CPU *current_cpu);
 
+/* Debug helper; to be run from gdb.  */
 void
 cris_dump_map (SIM_CPU *current_cpu)
 {
@@ -1070,36 +1072,6 @@ sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
   return vpc;
 }
 
-/* Handlers from the CGEN description that should not be called.  */
-
-USI
-cris_bmod_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
-		   UINT srcreg ATTRIBUTE_UNUSED,
-		   USI dstreg ATTRIBUTE_UNUSED)
-{
-  SIM_DESC sd = CPU_STATE (current_cpu);
-  abort ();
-}
-
-void
-h_supr_set_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
-		    UINT index ATTRIBUTE_UNUSED,
-		    USI page ATTRIBUTE_UNUSED,
-		    USI newval ATTRIBUTE_UNUSED)
-{
-  SIM_DESC sd = CPU_STATE (current_cpu);
-  abort ();
-}
-
-USI
-h_supr_get_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
-		    UINT index ATTRIBUTE_UNUSED,
-		    USI page ATTRIBUTE_UNUSED)
-{
-  SIM_DESC sd = CPU_STATE (current_cpu);
-  abort ();
-}
-
 /* Swap one context for another.  */
 
 static void
-- 
2.31.1


                 reply	other threads:[~2021-06-24  0:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210624002041.30211-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).