From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9168 invoked by alias); 6 Nov 2009 23:27:02 -0000 Received: (qmail 9155 invoked by uid 22791); 6 Nov 2009 23:27:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Nov 2009 23:26:57 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id nA6NPaWN002429; Sat, 7 Nov 2009 00:25:36 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id nA6NPZHv008499; Sat, 7 Nov 2009 00:25:35 +0100 (CET) Date: Fri, 06 Nov 2009 23:27:00 -0000 Message-Id: <200911062325.nA6NPZHv008499@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: vladimir@codesourcery.com CC: gdb-patches@sources.redhat.com In-reply-to: (message from Vladimir Prus on Fri, 06 Nov 2009 20:24:47 +0300) Subject: Re: [m68k] correct m68k_convert_register_p for coldfire References: <200911061604.18419.vladimir@codesourcery.com> <200911061323.53556.pedro@codesourcery.com> 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: 2009-11/txt/msg00121.txt.bz2 > From: Vladimir Prus > Date: Fri, 06 Nov 2009 20:24:47 +0300 > > Please don't apply this as is without at least trying to > > build it... current_gdbarch doesn't exist anymore. > > Doh! Here's what I've ended up checking it. But that doesn't make any sense. On a real m68k, register_type(gdbarch, M68K_FP0_REGNUM) will return m68881_ext_type(gdbarch) and on coldfire, type != m68881_ext_type(gdbarch) is probably always true. > Index: gdb/ChangeLog > =================================================================== > RCS file: /cvs/src/src/gdb/ChangeLog,v > retrieving revision 1.11036 > diff -u -p -r1.11036 ChangeLog > --- gdb/ChangeLog 6 Nov 2009 14:26:09 -0000 1.11036 > +++ gdb/ChangeLog 6 Nov 2009 17:21:57 -0000 > @@ -1,5 +1,11 @@ > 2009-11-06 Vladimir Prus > > + * m68k-tdep.c (m68k_convert_register_p): Compare with > + the actual type of fp registers, not one of the possible > + values. > + > +2009-11-06 Vladimir Prus > + > Prevent program output from mix with "^running". > > gdb/ > Index: gdb/m68k-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/m68k-tdep.c,v > retrieving revision 1.145 > diff -u -p -r1.145 m68k-tdep.c > --- gdb/m68k-tdep.c 7 Sep 2009 17:52:41 -0000 1.145 > +++ gdb/m68k-tdep.c 6 Nov 2009 17:21:57 -0000 > @@ -192,7 +192,8 @@ m68k_convert_register_p (struct gdbarch > if (!gdbarch_tdep (gdbarch)->fpregs_present) > return 0; > return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FP0_REGNUM + 7 > - && type != m68881_ext_type (gdbarch)); > + && type != m68881_ext_type (gdbarch) > + && type != register_type (gdbarch, M68K_FP0_REGNUM)); > } > > /* Read a value of type TYPE from register REGNUM in frame FRAME, and >