This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 17/17] MIPS support
- From: Tom Tromey <tromey at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 17 Jul 2013 11:59:50 -0600
- 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>
>>>>> "Sergio" == Sergio Durigan Junior <firstname.lastname@example.org> 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.
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.
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...