From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25156 invoked by alias); 12 Apr 2005 12:16:39 -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 24440 invoked from network); 12 Apr 2005 12:16:27 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Apr 2005 12:16:27 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DLKJe-0001zS-T5; Tue, 12 Apr 2005 08:16:26 -0400 Date: Tue, 12 Apr 2005 12:16:00 -0000 From: Daniel Jacobowitz To: Kei Sakamoto Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/m32r] Add gdbserver support to m32r-linux Message-ID: <20050412121626.GA7373@nevyn.them.org> Mail-Followup-To: Kei Sakamoto , gdb-patches@sources.redhat.com References: <016101c53f1d$67b40660$5169910a@E5A02646> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <016101c53f1d$67b40660$5169910a@E5A02646> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00091.txt.bz2 On Tue, Apr 12, 2005 at 02:06:17PM +0900, Kei Sakamoto wrote: > +linux-m32r-low.o: linux-m32r-low.c $(linux_low_h) $(server_h) ../m32r-tdep.h This doesn't seem to be necessary. > +#define m32r_num_regs 25 > + > +static int m32r_regmap[] = { > +#ifdef PT_R0 > + PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5, PT_R6, PT_R7, > + PT_R8, PT_R9, PT_R10, PT_R11, PT_R12, PT_FP, PT_LR, PT_SPU, > + PT_PSW, PT_CBR, PT_SPI, PT_SPU, PT_BPC, PT_PC, PT_ACCL, PT_ACCH, PT_EVB > +#else > + 4 * 4, 4 * 5, 4 * 6, 4 * 7, 4 * 0, 4 * 1, 4 * 2, 4 * 8, > + 4 * 9, 4 * 10, 4 * 11, 4 * 12, 4 * 13, 4 * 24, 4 * 25, 4 * 23, > + 4 * 19, 4 * 31, 4 * 26, 4 * 23, 4 * 20, 4 * 30, 4 * 16, 4 * 15, 4 * 32 > +#endif > +}; You've got 25 regs here... > +static int > +m32r_cannot_store_register (int regno) > +{ > + return (regno >= m32r_num_regs); > +} > + > +static int > +m32r_cannot_fetch_register (int regno) > +{ > + return (regno >= m32r_num_regs); > +} And you allow storing to registers 0-24 here... > Index: regformats/reg-m32r.dat > =================================================================== > RCS file: regformats/reg-m32r.dat > diff -N regformats/reg-m32r.dat > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ regformats/reg-m32r.dat 12 Apr 2005 04:27:26 -0000 > @@ -0,0 +1,45 @@ > +name:m32r > +expedite:pc,lr,sp > +32:r0 > +32:r1 > +32:r2 > +32:r3 > +32:r4 > +32:r5 > +32:r6 > +32:r7 > +32:r8 > +32:r9 > +32:r10 > +32:r11 > +32:r12 > +32:fp > +32:lr > +32:sp > +32:psw > +32:cbr > +32:spi > +32:spu > +32:bpc > +32:pc > +32:accl > +32:acch ... but this is only 24; what about evb? > + > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: > +32: Did you test without this padding? If nothing follows it, I don't believe the trailing padding is necessary. -- Daniel Jacobowitz CodeSourcery, LLC