This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [m68k] correct m68k_convert_register_p for coldfire


> From: Vladimir Prus <vladimir@codesourcery.com>
> 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  <vladimir@codesourcery.com>
>  
> +	* 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  <vladimir@codesourcery.com>
> +
>          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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]