From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1632 invoked by alias); 25 Jul 2013 06:20:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 1622 invoked by uid 89); 25 Jul 2013 06:20:22 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_50,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Jul 2013 06:20:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6P6K2a5013111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Jul 2013 02:20:11 -0400 Received: from psique (ovpn-113-37.phx2.redhat.com [10.3.113.37]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6P6JwDj032292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 25 Jul 2013 02:20:00 -0400 From: Sergio Durigan Junior To: Tom Tromey Cc: GDB Patches Subject: Re: [PATCH 17/17] MIPS support References: <1372664545-3947-1-git-send-email-sergiodj@redhat.com> <1372664545-3947-18-git-send-email-sergiodj@redhat.com> <8738rdgj8p.fsf@fleche.redhat.com> X-URL: http://www.redhat.com Date: Thu, 25 Jul 2013 06:20:00 -0000 In-Reply-To: <8738rdgj8p.fsf@fleche.redhat.com> (Tom Tromey's message of "Wed, 17 Jul 2013 11:59:50 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00594.txt.bz2 On Wednesday, July 17 2013, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior 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: 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