This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 17/17] MIPS support
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 25 Jul 2013 03:19:58 -0300
- Subject: Re: [PATCH 17/17] MIPS support
- References: <1372664545-3947-1-git-send-email-sergiodj at redhat dot com> <1372664545-3947-18-git-send-email-sergiodj at redhat dot com> <8738rdgj8p dot fsf at fleche dot redhat dot com>
On Wednesday, July 17 2013, Tom Tromey wrote:
>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> MIPS already has a definition of its signals inside mips-linux-tdep.h
> Sergio> (see enum mips_signals). I could have used them, but I chose to
> Sergio> follow the standard and implement an enum containing only differences
> Sergio> between MIPS and x86 signals. In the battle between code duplication
> Sergio> and code standardization, the latter won (in my head, at least). But I
> Sergio> am totally open to suggestions, and I even believe I know what I will
> Sergio> hear: "Please, use mips_signals".
>
> Sergio> Anyway, I thought it was worth raising this point here.
>
> Thanks.
>
> One thing I'm curious about is why the corresponding
> gdbarch_gdb_signal_from_target method is only implemented for MIPS, and
> not for all Linux targets.
Thanks for the review.
The gdbarch_gdb_signal_from_target method for MIPS was introduced by:
<http://sourceware.org/ml/gdb-patches/2012-06/msg00048.html>
As far as I can tell, nobody really cared about implementing it for
other architectures. So far.
I now have a patch which does that for the same architectures that I am
touching to implement the gdbarch_gdb_signal_to_target method, and I
will submit it along with the other patches.
> Consideration of this led me to another possible approach to the problem
> you mention above: you could use your standard approach for the enum,
> but also reimplement the MIPS gdbarch_gdb_signal_from_target method to
> follow. This would be simpler there was already a generic implementation...
Sounds good to me, done that.
Thanks,
--
Sergio