From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8429 invoked by alias); 26 Jan 2012 04:57:09 -0000 Received: (qmail 8421 invoked by uid 22791); 26 Jan 2012 04:57:07 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jan 2012 04:56:55 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DC60D2BB3CC; Wed, 25 Jan 2012 23:56:54 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tirj7LzO+Ijk; Wed, 25 Jan 2012 23:56:54 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 74A582BB3BB; Wed, 25 Jan 2012 23:56:54 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9029E145615; Thu, 26 Jan 2012 08:56:48 +0400 (RET) Date: Thu, 26 Jan 2012 06:21:00 -0000 From: Joel Brobecker To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Add support for the Renesas rl78 architecture Message-ID: <20120126045648.GT31383@adacore.com> References: <20120125165800.5351c291@mesquite.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120125165800.5351c291@mesquite.lan> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2012-01/txt/msg00887.txt.bz2 Hi Kevin, > Comments? FWIW, I took a quick look at the code, although I don't know anything about this architecture. You took the time to comment it nicely, I also appreciate that. > gdb/ChangeLog: > > * configure.tgt (rl78-*-elf): New target. > * rl78-tdep.c: New file. > > include/gdb/ChangeLog: > > * sim-rl78.h: New file. For the GDB bits, my only comments are with the coding style: - There should be an empty line between a function description and the start of its definition. - There should be an empty line after variable declarations - I noticed that you exceeded the 80 characters line size a few times - I think you want the opening curly brace on the next line at the same column as the previous one (not indented 2 characters): > +/* Implement the "register_name" gdbarch method. */ > +static const char * > +rl78_register_name (struct gdbarch *gdbarch, int regnr) > +{ > + static const char *const reg_names[] = { > + "bank0_r0", and > +enum sim_rl78_regnum > + { > + sim_rl78_bank0_r0_regnum, > + sim_rl78_bank0_r1_regnum, > + sim_rl78_bank0_r2_regnum, That's all I can really say. -- Joel