Re: PATCH: Use target values for signals in simulator

Daniel Jacobowitz
2005-11-25T18:25:20Z

On Wed, Nov 23, 2005 at 06:58:06PM -0000, mitchell@mail.codesourcery.com wrote:
> The principal risk with this patch is that I may have failed to
> translate from one of the various simulator's internal representation
> of a signal to the appropriate TARGET_SIGNAL_ value. However, because
> TARGET_SIGNAL_* uses the conventional UNIX values for signals to the
> extent there are conventions (like, TARGET_SIGNAL_SEGV is 11 and
> TARGET_SIGNAL_TRAP is 5) it's unlikely that any places I missed will
> actually matter.
>
> In other words, the simulators were already translating to the host
> signal numbers, which, in practice, are very likely to match up with
> TARGET_SIGNAL_* -- especially since most of the simulators generate a
> pretty limited set of signals. So, if I missed a spot, it's very
> likely that the values are correct anyhow. Therefore, I think this
> patch is pretty safe.

You missed sim/ppc/psim.c:cntrl_c_simulation. Of course there's also
psim_max_iterations_exceeded, which uses signal -1... let's just ignore
that for the moment...

Other than that, I think it plausibly likely that you got everything.
Does anyone object to this change? This has been a long-standing wart.

--
Daniel Jacobowitz