aboutsummaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 00:38:31 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-21 01:59:22 -0500
commitd137b254d9aa4c91d5d2e7865d971bbdaa40e769 (patch)
treea9ddb0f1f76874b83a4efce003732b2e305b5664 /sim/mips
parentf184f3a224405473d605ba1d7a455b011e8f2b9e (diff)
downloadgdb-d137b254d9aa4c91d5d2e7865d971bbdaa40e769.zip
gdb-d137b254d9aa4c91d5d2e7865d971bbdaa40e769.tar.gz
gdb-d137b254d9aa4c91d5d2e7865d971bbdaa40e769.tar.bz2
sim: signal: mark signal callback funcs as noreturn since they don't return
All funcs already call other funcs that don't return. The mips port is the only exception because its generic exception handler can return in the case of normal exceptions. So while the exceptions its signal handler triggers doesn't return, we can't express that conditional logic. So add some useless abort calls to make the compiler happy.
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/interp.c6
-rw-r--r--sim/mips/sim-main.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index cb650a5..255807f 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -2498,7 +2498,8 @@ mips_core_signal (SIM_DESC sd,
(unsigned long) addr, (unsigned long) ip);
COP0_BADVADDR = addr;
SignalExceptionDataReference();
- break;
+ /* Shouldn't actually be reached. */
+ abort ();
case sim_core_unaligned_signal:
sim_io_eprintf (sd, "mips-core: %d byte %s to unaligned address 0x%lx at 0x%lx\n",
@@ -2509,7 +2510,8 @@ mips_core_signal (SIM_DESC sd,
SignalExceptionAddressLoad();
else
SignalExceptionAddressStore();
- break;
+ /* Shouldn't actually be reached. */
+ abort ();
default:
sim_engine_abort (sd, cpu, cia,
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index d5a0dc8..5d35856 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -1038,7 +1038,7 @@ extern int DSPLO_REGNUM[4];
extern int DSPHI_REGNUM[4];
INLINE_SIM_MAIN (void) pending_tick (SIM_DESC sd, sim_cpu *cpu, address_word cia);
-extern SIM_CORE_SIGNAL_FN mips_core_signal;
+extern SIM_CORE_SIGNAL_FN mips_core_signal ATTRIBUTE_NORETURN;
char* pr_addr (address_word addr);
char* pr_uword64 (uword64 addr);