From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 480 invoked by alias); 12 Aug 2005 10:36:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32759 invoked by uid 22791); 12 Aug 2005 10:36:02 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 12 Aug 2005 10:36:02 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j7CAZuQJ016021; Fri, 12 Aug 2005 12:35:56 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j7CAZtI0006808; Fri, 12 Aug 2005 12:35:55 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j7CAZs6D029649; Fri, 12 Aug 2005 12:35:54 +0200 (CEST) Date: Fri, 12 Aug 2005 11:51:00 -0000 Message-Id: <200508121035.j7CAZs6D029649@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: kevinb@redhat.com CC: gdb-patches@sources.redhat.com In-reply-to: <20050811165333.7d9d02f8@ironwood.lan> (message from Kevin Buettner on Thu, 11 Aug 2005 16:53:33 -0700) Subject: Re: [RFC] Add support for Morpho ms1 processor References: <20050603172038.449a41b9@ironwood.lan> <20050811165333.7d9d02f8@ironwood.lan> X-SW-Source: 2005-08/txt/msg00130.txt.bz2 > Date: Thu, 11 Aug 2005 16:53:33 -0700 > From: Kevin Buettner > > I'm reposting a revised version of the ms1-tdep.c portion of my earlier > patch (since that's where all that's where all the problems were). > > Thanks to Daniel and Mark for their earlier comments. I believe I > have addressed all of the earlier concerns. (Except for adding an entry > to MAINTAINERS - I'll address that separately). > > Further comments? > > + if (regnum >= 0 && > + regnum < sizeof (register_names) / sizeof (register_names[0])) > + { > + return register_names[regnum]; > + } > + else > + internal_error (__FILE__, __LINE__, > + _("ms1_register_name: illegal register number %d"), regnum); > +} Please consider usin ARRAY_SIZE. I'd also use gdb_assert() here instead of the excplicit internal_error(), but that's a bit of a personal preference I assume. Please use invalid instead of illegal. > +static const unsigned char * > +ms1_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) > +{ > + static char breakpoint[] = { 0x68, 0, 0, 0 }; > + > + *bp_size = 4; > + return breakpoint; > +} Please use gdb_byte here too. Otherwise this looks great! Mark