This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code in sim/
> Eli Zaretskii <eliz@is.elta.co.il> writes:
>
>> Does someone know why this is done? If SIGTRAP etc. are not defined,
>> the code should simply not reference it.
>
>
> The problem is that the simulators generate these signals (the
> simulated environment supports them) but they're translated to the
> hosts's SIG* values to "standardize" how they're handled by gdb. If
> the sim supports more signals than the host, there needs to be some
> fake value they're translated into.
>
> Not that I agree with the technique, but that's how it is...
The simulator currently passes target signal values across its
interface. I agree it is silly.
To quote the TODO file:
--
Fix target_signal_from_host() etc.
The name is wrong for starters. ``target_signal'' should probably be
``gdb_signal''. ``from_host'' should be ``from_target_signal''.
After that it needs to be multi-arched and made independent of any
host signal numbering.
--
Suprisingly, remote.c got it right (the doco is wrong). It passes
GDB signals to the remote target.
Andrew