This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Use target values for signals in simulator
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 25 Nov 2005 13:25:14 -0500
- Subject: Re: PATCH: Use target values for signals in simulator
- References: <20051123185806.29594.qmail@mail.codesourcery.com>
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
CodeSourcery, LLC