This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 17/17] MIPS support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]