Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Correct gdbserver register packets
@ 2002-11-26  9:29 Pierre Muller
  2002-12-01 17:14 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2002-11-26  9:29 UTC (permalink / raw)
  To: gdb-patches

 Currently the cvs sources of gdbserver
for m68k linux have a problem.

The problem comes from the fact that the 
register packet is build from the data in regformats 
directory. But the m68k cpu file contains two
registers that are apparently not accessible
(or at least not fetched by current gdb).

This causes connection to remote server to 
stay stucked affect
that warning.
reading register 29: Input/output error

My patch is a liitle bit more genral because I
read that there are similar problems for other configuration.

The main idea is to add a new function
int
register_present( int regno)

that by default allways returns one but
that can be implmented by the target that do
no supply all the regsiters
that are in the regformats dir.

The final patches can be separated probably, but I would first like to 
get comments on the general direction.

ChangeLog entry

2002-11-26  Pierre Muller  <muller@ics.u-strasbg.fr>

        * config.in: Add HAVE_REGISTER_PRESENT.
        * configure.srv: Set srv_register_present for m68k-linux.
        * configure.in: Handle srv_register_present.
        * configure.in: Handle srv_register_present.
        *  linux-m68k-low.c (m68k_regmap): Add missing  -1.
         (m68k_cannot_fetch_register): Handle -1 values.
         (m68k_cannot_store_register): Handle -1 values.
        (register_present): Implement m68k linux specific version.
        * regcache.c (register_present): Implement default version.
        (set_register_cache): Use register_present function to 
        compute correct size for register packet.
        * server.h: Include "regdef.h" header.

Index: config.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/config.in,v
retrieving revision 1.5
diff -u -p -r1.5 config.in
--- config.in   24 Jul 2002 21:30:46 -0000      1.5
+++ config.in   26 Nov 2002 15:26:46 -0000
@@ -9,6 +9,9 @@
 /* Define if the target supports PTRACE_GETREGS for register access.  */
 #undef HAVE_LINUX_REGSETS

+/* Define if the target implements its own register_present function.  */
+#undef HAVE_REGISTER_PRESENT
+
 /* Define if the target supports PTRACE_GETFPXREGS for extended
    register access.  */
 #undef HAVE_PTRACE_GETFPXREGS
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure,v
retrieving revision 1.10
diff -u -p -r1.10 configure
--- configure   24 Jul 2002 21:30:46 -0000      1.10
+++ configure   26 Nov 2002 15:26:47 -0000
@@ -1155,6 +1155,13 @@ EOF

 fi

+if test "${srv_register_present}" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_REGISTER_PRESENT 1
+EOF
+
+fi
+
 if test "${srv_linux_regsets}" = "yes"; then
   echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
 echo "configure:1161: checking for PTRACE_GETREGS" >&5
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.in,v
retrieving revision 1.11
diff -u -p -r1.11 configure.in
--- configure.in        24 Jul 2002 21:30:46 -0000      1.11
+++ configure.in        26 Nov 2002 15:26:47 -0000
@@ -39,6 +39,10 @@ if test "${srv_linux_usrregs}" = "yes";
   AC_DEFINE(HAVE_LINUX_USRREGS)
 fi

+if test "${srv_register_present}" = "yes"; then
+  AC_DEFINE(HAVE_REGISTER_PRESENT)
+fi
+
 if test "${srv_linux_regsets}" = "yes"; then
   AC_MSG_CHECKING(for PTRACE_GETREGS)
   AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs,
Index: configure.srv
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.srv,v
retrieving revision 1.5
diff -u -p -r1.5 configure.srv
--- configure.srv       11 Jun 2002 17:32:39 -0000      1.5
+++ configure.srv       26 Nov 2002 15:26:47 -0000
@@ -36,6 +36,7 @@ case "${target}" in
   m68*-*-linux*)       srv_regobj=reg-m68k.o
                        srv_tgtobj="linux-low.o linux-m68k-low.o"
                        srv_linux_usrregs=yes
+                       srv_register_present=yes
                        ;;
   mips*-*-linux*)      srv_regobj=reg-mips.o
                        srv_tgtobj="linux-low.o linux-mips-low.o"
Index: 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
--- linux-m68k-low.c    9 Apr 2002 22:44:43 -0000       1.3
+++ linux-m68k-low.c    26 Nov 2002 15:26:47 -0000
@@ -45,24 +45,36 @@ static int m68k_regmap[] =
 #ifdef PT_FP0
   PT_FP0 * 4, PT_FP1 * 4, PT_FP2 * 4, PT_FP3 * 4,
   PT_FP4 * 4, PT_FP5 * 4, PT_FP6 * 4, PT_FP7 * 4,
-  PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4
+  PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4,
 #else
   21 * 4, 24 * 4, 27 * 4, 30 * 4, 33 * 4, 36 * 4,
-  39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4
+  39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4,
 #endif
+  -1, -1
 };

 static int
 m68k_cannot_store_register (int regno)
 {
-  return (regno >= m68k_num_regs);
+  return (regno >= m68k_num_regs
+          || m68k_regmap [regno] == -1);
 }

 static int
 m68k_cannot_fetch_register (int regno)
 {
-  return (regno >= m68k_num_regs);
+  return (regno >= m68k_num_regs
+          || m68k_regmap [regno] == -1);
 }
+
+int
+register_present (int regno)
+{
+  return (regno >= 0
+         && regno < m68k_num_regs
+          && m68k_regmap [regno] != -1);
+}
+

 struct linux_target_ops the_low_target = {
   m68k_num_regs,
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/regcache.c,v
retrieving revision 1.6
diff -u -p -r1.6 regcache.c
--- regcache.c  13 Jun 2002 19:29:46 -0000      1.6
+++ regcache.c  26 Nov 2002 15:26:47 -0000
@@ -20,11 +20,19 @@
    Boston, MA 02111-1307, USA.  */

 #include "server.h"
-#include "regdef.h"

 #include <stdlib.h>
 #include <string.h>

+
+#ifndef HAVE_REGISTER_PRESENT
+int
+register_present (int n)
+{
+  return 1;
+}
+#endif /* not HAS_REGISTER_PRESENT */
+
 /* The private data for the register cache.  Note that we have one
    per inferior; this is primarily for simplicity, as the performance
    benefit is minimal.  */
@@ -130,10 +138,11 @@ set_register_cache (struct reg *regs, in

   offset = 0;
   for (i = 0; i < n; i++)
-    {
-      regs[i].offset = offset;
-      offset += regs[i].size;
-    }
+    if (register_present (i))
+      {
+       regs[i].offset = offset;
+       offset += regs[i].size;
+      }

   register_bytes = offset / 8;
 }
Index: regcache.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/regcache.h,v
retrieving revision 1.5
diff -u -p -r1.5 regcache.h
--- regcache.h  11 Jun 2002 17:32:39 -0000      1.5
+++ regcache.h  26 Nov 2002 15:26:47 -0000
@@ -45,6 +45,10 @@ void registers_to_string (char *buf);

 void registers_from_string (char *buf);

+/* Return 1 if register in packets.  */
+
+extern int register_present (int n);
+
 /* Return the size in bytes of a string-encoded register packet.  */

 int registers_length (void);
Index: server.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.h,v
retrieving revision 1.12
diff -u -p -r1.12 server.h
--- server.h    11 Jun 2002 17:32:40 -0000      1.12
+++ server.h    26 Nov 2002 15:26:47 -0000
@@ -70,6 +70,7 @@ struct inferior_list_entry
 /* Opaque type for user-visible threads.  */
 struct thread_info;

+#include "regdef.h"
 #include "regcache.h"
 #include "gdb/signals.h"







Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-11-26  9:29 [RFC] Correct gdbserver register packets Pierre Muller
@ 2002-12-01 17:14 ` Daniel Jacobowitz
  2002-12-02  2:44   ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-01 17:14 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

On Tue, Nov 26, 2002 at 06:27:36PM +0100, Pierre Muller wrote:
>  Currently the cvs sources of gdbserver
> for m68k linux have a problem.
> 
> The problem comes from the fact that the 
> register packet is build from the data in regformats 
> directory. But the m68k cpu file contains two
> registers that are apparently not accessible
> (or at least not fetched by current gdb).
> 
> This causes connection to remote server to 
> stay stucked affect
> that warning.
> reading register 29: Input/output error
> 
> My patch is a liitle bit more genral because I
> read that there are similar problems for other configuration.
> 
> The main idea is to add a new function
> int
> register_present( int regno)
> 
> that by default allways returns one but
> that can be implmented by the target that do
> no supply all the regsiters
> that are in the regformats dir.
> 
> The final patches can be separated probably, but I would first like to 
> get comments on the general direction.

I don't think there's a point yet.  Eventually, once we have a way to
express it properly in the remote protocol, we can handle returning
not-available for registers.  For now all we should need is:

> ChangeLog entry
> 
> 2002-11-26  Pierre Muller  <muller@ics.u-strasbg.fr>
> 
>         * linux-m68k-low.c (m68k_regmap): Add missing  -1.

> Index: 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
> --- linux-m68k-low.c    9 Apr 2002 22:44:43 -0000       1.3
> +++ linux-m68k-low.c    26 Nov 2002 15:26:47 -0000
> @@ -45,24 +45,36 @@ static int m68k_regmap[] =
>  #ifdef PT_FP0
>    PT_FP0 * 4, PT_FP1 * 4, PT_FP2 * 4, PT_FP3 * 4,
>    PT_FP4 * 4, PT_FP5 * 4, PT_FP6 * 4, PT_FP7 * 4,
> -  PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4
> +  PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4,
>  #else
>    21 * 4, 24 * 4, 27 * 4, 30 * 4, 33 * 4, 36 * 4,
> -  39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4
> +  39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4,
>  #endif
> +  -1, -1
>  };
> 

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.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-01 17:14 ` Daniel Jacobowitz
@ 2002-12-02  2:44   ` Andreas Schwab
  2002-12-02  6:14     ` Daniel Jacobowitz
  2002-12-02 21:20     ` Daniel Jacobowitz
  0 siblings, 2 replies; 11+ messages in thread
From: Andreas Schwab @ 2002-12-02  2:44 UTC (permalink / raw)
  To: gdb-patches

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.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-02  2:44   ` Andreas Schwab
@ 2002-12-02  6:14     ` Daniel Jacobowitz
  2002-12-02  6:22       ` Pierre Muller
  2002-12-02 21:20     ` Daniel Jacobowitz
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-02  6:14 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

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.

Really?  Oh, I suppose that gdbserver is receiving 31 registers back
from GDB.  

Why is that happening?  There are 31 registers in m68k_register_name
but no remaining target implements the last two (did any obsolete
target?) and the register packet appears to be sized for 29 registers.

I'll investigate.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-02  6:14     ` Daniel Jacobowitz
@ 2002-12-02  6:22       ` Pierre Muller
  2002-12-02  6:57         ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2002-12-02  6:22 UTC (permalink / raw)
  To: Daniel Jacobowitz, Andreas Schwab; +Cc: gdb-patches

At 15:15 02/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.
>
>Really?  Oh, I suppose that gdbserver is receiving 31 registers back
>from GDB.  
>
>Why is that happening?  There are 31 registers in m68k_register_name
>but no remaining target implements the last two (did any obsolete
>target?) and the register packet appears to be sized for 29 registers.
>
>I'll investigate.


See regformats directory!
reg-m68k.dat define 31
fpcode and fpflags are not known to linux, but I don't know
for other targets... 

Maybe we should add a new packet that would 
give out the name and the format of all the registers that are sent 
in the register packet.
 This would be sent by the remote GDB program at
connexion and gdbserver would then 
 and use the result of that first packet
to check which register  he connected GDB wants,
if we know them and if the format is correct.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-02  6:22       ` Pierre Muller
@ 2002-12-02  6:57         ` Daniel Jacobowitz
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-02  6:57 UTC (permalink / raw)
  To: Pierre Muller; +Cc: Andreas Schwab, gdb-patches

On Mon, Dec 02, 2002 at 03:20:39PM +0100, Pierre Muller wrote:
> At 15:15 02/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.
> >
> >Really?  Oh, I suppose that gdbserver is receiving 31 registers back
> >from GDB.  
> >
> >Why is that happening?  There are 31 registers in m68k_register_name
> >but no remaining target implements the last two (did any obsolete
> >target?) and the register packet appears to be sized for 29 registers.
> >
> >I'll investigate.
> 
> 
> See regformats directory!
> reg-m68k.dat define 31
> fpcode and fpflags are not known to linux, but I don't know
> for other targets... 

No, only gdbserver uses the data in regformats/.  The question is why
the GDB _client_ is sending more than 29 registers.  I can't see why.

> Maybe we should add a new packet that would 
> give out the name and the format of all the registers that are sent 
> in the register packet.
>  This would be sent by the remote GDB program at
> connexion and gdbserver would then 
>  and use the result of that first packet
> to check which register  he connected GDB wants,
> if we know them and if the format is correct.

Search the archives for qRegisters...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-02  2:44   ` Andreas Schwab
  2002-12-02  6:14     ` Daniel Jacobowitz
@ 2002-12-02 21:20     ` Daniel Jacobowitz
  2002-12-03  0:31       ` Pierre Muller
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-02 21:20 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

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?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-02 21:20     ` Daniel Jacobowitz
@ 2002-12-03  0:31       ` Pierre Muller
  2002-12-03 19:55         ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2002-12-03  0:31 UTC (permalink / raw)
  To: Daniel Jacobowitz, Andreas Schwab; +Cc: gdb-patches

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...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-03  0:31       ` Pierre Muller
@ 2002-12-03 19:55         ` Daniel Jacobowitz
  2002-12-04  4:28           ` Andreas Schwab
  2003-01-04 21:56           ` Daniel Jacobowitz
  0 siblings, 2 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-03 19:55 UTC (permalink / raw)
  To: Pierre Muller; +Cc: Andreas Schwab, gdb-patches

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?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-03 19:55         ` Daniel Jacobowitz
@ 2002-12-04  4:28           ` Andreas Schwab
  2003-01-04 21:56           ` Daniel Jacobowitz
  1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2002-12-04  4:28 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz <drow@mvista.com> writes:

|> "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?

Thanks, this is working fine.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] Correct gdbserver register packets
  2002-12-03 19:55         ` Daniel Jacobowitz
  2002-12-04  4:28           ` Andreas Schwab
@ 2003-01-04 21:56           ` Daniel Jacobowitz
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2003-01-04 21:56 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pierre Muller, Andreas Schwab

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-01-04 21:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-26  9:29 [RFC] Correct gdbserver register packets Pierre Muller
2002-12-01 17:14 ` Daniel Jacobowitz
2002-12-02  2:44   ` Andreas Schwab
2002-12-02  6:14     ` Daniel Jacobowitz
2002-12-02  6:22       ` Pierre Muller
2002-12-02  6:57         ` Daniel Jacobowitz
2002-12-02 21:20     ` Daniel Jacobowitz
2002-12-03  0:31       ` Pierre Muller
2002-12-03 19:55         ` Daniel Jacobowitz
2002-12-04  4:28           ` Andreas Schwab
2003-01-04 21:56           ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox