This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFC] Correct gdbserver register packets


On Tue, Dec 03, 2002 at 10:55:34PM -0500, Daniel Jacobowitz wrote:
> On Tue, Dec 03, 2002 at 09:29:14AM +0100, Pierre Muller wrote:
> > At 06:21 03/12/2002, Daniel Jacobowitz wrote:
> > >On Mon, Dec 02, 2002 at 11:44:31AM +0100, Andreas Schwab wrote:
> > >> Daniel Jacobowitz <drow@mvista.com> writes:
> > >> 
> > >> |> Or else Andreas's patch to decrease the number of registers.  Hmm,
> > >> |> probably doing it Andreas's way is better.  I'll take care of this in
> > >> |> the morning.
> > >> 
> > >> My way of fixing it is not complete, I get "Wrong sized register packet"
> > >> messages from gdbserver.
> > >
> > >There's a much easier solution: change the 31 to 29, and remove the
> > >extra two registers from regformats/.  I'm not familiar with any m68k
> > >stubs; do you know of any others that do or do not include the extra
> > >two registers, which GDB no longer seems to know anything about?  Or
> > >are they just bogus?
> > 
> > 
> > config/m68k/tm-sun3.h 
> > seems to use 31 registers including the two not known by
> > other m68k targets...
> > But I don't known the state of that target...
> 
> "very old".  It seems that the base for all/most m68k targets is to
> have 29 registers.  As a result, I think this patch is the way to go. 
> Could you two give it a try?

Since this worked for Andreas, I've checked it in.  With appropriate
copyright date updates this time.

> 2002-11-30  Andreas Schwab  <schwab@suse.de>
> 
> 	* linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
> 
> 2002-12-03  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* regformats/reg-m68k.dat: Remove fpcode and fpflags.
> 
> Index: gdbserver/linux-m68k-low.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbserver/linux-m68k-low.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 linux-m68k-low.c
> --- gdbserver/linux-m68k-low.c	9 Apr 2002 22:44:43 -0000	1.3
> +++ gdbserver/linux-m68k-low.c	4 Dec 2002 03:43:52 -0000
> @@ -26,7 +26,7 @@
>  #include <sys/reg.h>
>  #endif
>  
> -#define m68k_num_regs 31
> +#define m68k_num_regs 29
>  
>  /* This table must line up with REGISTER_NAMES in tm-m68k.h */
>  static int m68k_regmap[] =
> Index: regformats/reg-m68k.dat
> ===================================================================
> RCS file: /cvs/src/src/gdb/regformats/reg-m68k.dat,v
> retrieving revision 1.1
> diff -u -p -r1.1 reg-m68k.dat
> --- regformats/reg-m68k.dat	1 Feb 2002 22:05:28 -0000	1.1
> +++ regformats/reg-m68k.dat	4 Dec 2002 03:43:52 -0000
> @@ -31,5 +31,3 @@ expedite:sp,fp,pc
>  32:fpcontrol
>  32:fpstatus
>  32:fpiaddr
> -32:fpcode
> -32:fpflags
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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