I find this unreadable (and buggy too, which is likely a consequence),
per observations above please rewrite this as below:
if (signo>= MIPS_SIGRTMIN&& signo<= MIPS_SIGRTMAX)
{
/* GDB_SIGNAL_REALTIME values are not contiguous, map parts of
the MIPS block to the respective GDB_SIGNAL_REALTIME blocks. */
signo -= MIPS_SIGRTMIN;
if (signo == 0)
return GDB_SIGNAL_REALTIME_32;
else if (signo< 32)
return ((enum gdb_signal) (signo - 1 + (int) GDB_SIGNAL_REALTIME_33));
else
return ((enum gdb_signal) (signo - 32 + (int) GDB_SIGNAL_REALTIME_64));
}
return GDB_SIGNAL_UNKNOWN;
}
-- the casts are probably redundant, but let them stay.
OK with this change, the rest is fine with me. Thanks for tackling this
problem.