Re: MIPS Linux signals

Pedro Alves
2012-05-22T13:32:11Z

On 05/22/2012 02:16 PM, Maciej W. Rozycki wrote:

> On Tue, 22 May 2012, Pedro Alves wrote:
>
>> > So I think that to sort all of this out, we should:
>> >
>> > enum target_signal => enum gdb_signal
>> >
>> > target_signal_from_host => gdb_signal_from_host (or gdb_signal_from_host_signal)
>> > target_signal_to_host => gdb_signal_to_host (or gdb_signal_to_host_signal)
>> >
>> > gdbarch_target_signal_from_host => gdbarch_gdb_signal_from_target (or gdbarch_gdb_signal_from_target_signal)
>> > gdbarch_target_signal_to_host => gdbarch_gdb_signal_to_target (or gdbarch_gdb_signal_to_target_signal)
> How about we call the context of the signal "inferior" here and therefore
> avoid the confusion which target is the host and which host is the target
> altogether? I.e.:
>
> enum target_signal => enum gdb_signal
>
> target_signal_from_host => gdb_signal_from_inferior
> target_signal_to_host => gdb_signal_to_inferior
>
> gdbarch_target_signal_from_host => gdbarch_gdb_signal_from_inferior
> gdbarch_target_signal_to_host => gdbarch_gdb_signal_to_inferior

This blurs the point that gdb_signal_from_host/gdb_signal_from_inferior
should never be called if not from native/host code, IOW, only when you want
a mapping of the signal of the system the code is running on (host) and will
thus add to confusion. I prefer my variant for making the distinction clear
with the naming.

--
Pedro Alves