All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from  [Jun Sun <jsun@mvista.com>]]
@ 2000-05-16 17:33 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-16 17:33 UTC (permalink / raw)
  To: linux

resending bounced mail.

-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 16 May 2000 10:13:23 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu



Ralf Baechle wrote:
> 
> On Mon, May 15, 2000 at 06:07:49PM -0700, Jun Sun wrote:
> 
> > I found
> > ftp://oss.sgi.com/pub/linux/mips/src/kernel/v2.3/linux-19991209.tar.gz,
> > but that is version 2.3.21.  Have all the patches been taken into the
> > latest standard linux release?  Just to make sure ...
> 
> We only occasionally generate snapshots.  If you want a current source
> tree then please see the MIPS FAQ at http://oss.sgi.com/mips/ for how to
> use anonymous CVS.  CVS is currently at version 2.3.99-pre8.
> 
>   Ralf

I see.

Is the intention to merge MIPS work back to the standard Linux tree?  If
yes, do we have an idea when?  If no, I assume the MIPS branch has to
keep getting forward merges from the standard tree.  That will be a
pain.

Jun

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

* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from [Jun Sun <jsun@mvista.com>]]
@ 2000-05-16 17:33 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-16 17:33 UTC (permalink / raw)
  To: linux

resending bounced mail.

-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 16 May 2000 10:13:23 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu



Ralf Baechle wrote:
> 
> On Mon, May 15, 2000 at 06:07:49PM -0700, Jun Sun wrote:
> 
> > I found
> > ftp://oss.sgi.com/pub/linux/mips/src/kernel/v2.3/linux-19991209.tar.gz,
> > but that is version 2.3.21.  Have all the patches been taken into the
> > latest standard linux release?  Just to make sure ...
> 
> We only occasionally generate snapshots.  If you want a current source
> tree then please see the MIPS FAQ at http://oss.sgi.com/mips/ for how to
> use anonymous CVS.  CVS is currently at version 2.3.99-pre8.
> 
>   Ralf

I see.

Is the intention to merge MIPS work back to the standard Linux tree?  If
yes, do we have an idea when?  If no, I assume the MIPS branch has to
keep getting forward merges from the standard tree.  That will be a
pain.

Jun

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

* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from  [Jun Sun <jsun@mvista.com>]]
@ 2000-05-16 18:02 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-16 18:02 UTC (permalink / raw)
  To: linux



-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 16 May 2000 10:49:56 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu

>From owner-linux  Tue May 16 10:49:55 2000
Received: from sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id KAA52215
	for <linux@engr.sgi.com>;
	Tue, 16 May 2000 10:49:54 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from hermes.mvista.com (gateway.mvista.com [63.192.220.206]) 
	by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id KAA06183
	for <linux@engr.sgi.com>; Tue, 16 May 2000 10:49:52 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75])
	by hermes.mvista.com (8.9.3/8.9.3) with ESMTP id KAA22202;
	Tue, 16 May 2000 10:49:43 -0700
Sender: jsun@hermes.mvista.com
Message-ID: <39218A14.919D119A@mvista.com>
Date: Tue, 16 May 2000 10:49:08 -0700
From: Jun Sun <jsun@mvista.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20b i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Ralf Baechle <ralf@oss.sgi.com>
CC: linux@engr.sgi.com, linux-mips@fnet.fr, linux-mips@vger.rutgers.edu
Subject: Re: HELP : ptrace returns puzzling results
References: <392045FC.827CACB5@mvista.com>
<20000516133620.C4561@uni-koblenz.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ralf Baechle wrote:
> 
> On Mon, May 15, 2000 at 11:46:20AM -0700, Jun Sun wrote:
> 
> > I am writing a gdbserver for linux/mips.  The server can now talk with
> > the gdb client, and can run to completion if you press 'c'.
> 
> > reg #29 ($29,sp) = 2147483120 (0x7ffffdf0)
> 
> The value of sp looks sane, it a value near the absolute top of the stack
> at 0x80000000.
> 
> > reg #37 ($64,pc) = 263607008 (0x0fb652e0)
> 
> Also looks sane at first look, this value is in the typical address range
> where the dynamic linker gets mapped.
> 
> Many of the registers in the dump you gave have a value of zero and that is
> worrying me much more.  All the caller saved registers are zero, that
> smells.
> 

I looked at the problem again.  The registers are actually correct. 
Most registers are zero becase that is the program start up time (in
exec()). I now can set a breakpoint and run until that breakpoint.

However, step or next or setting another breakpoint do not work.  It
appears that gdbserver calls ptrace with PTRACE_SINGLESTEP option, which
is not implemented in the kernel I am using (it is v2.3.99-pre3).  Is
this implemented in the latest version?  If not, is it difficult to add
one?  Or can we get around without it?

Jun

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

* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from [Jun Sun <jsun@mvista.com>]]
@ 2000-05-16 18:02 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-16 18:02 UTC (permalink / raw)
  To: linux



-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 16 May 2000 10:49:56 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu

From owner-linux  Tue May 16 10:49:55 2000
Received: from sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id KAA52215
	for <linux@engr.sgi.com>;
	Tue, 16 May 2000 10:49:54 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from hermes.mvista.com (gateway.mvista.com [63.192.220.206]) 
	by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id KAA06183
	for <linux@engr.sgi.com>; Tue, 16 May 2000 10:49:52 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75])
	by hermes.mvista.com (8.9.3/8.9.3) with ESMTP id KAA22202;
	Tue, 16 May 2000 10:49:43 -0700
Sender: jsun@hermes.mvista.com
Message-ID: <39218A14.919D119A@mvista.com>
Date: Tue, 16 May 2000 10:49:08 -0700
From: Jun Sun <jsun@mvista.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20b i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Ralf Baechle <ralf@oss.sgi.com>
CC: linux@engr.sgi.com, linux-mips@fnet.fr, linux-mips@vger.rutgers.edu
Subject: Re: HELP : ptrace returns puzzling results
References: <392045FC.827CACB5@mvista.com>
<20000516133620.C4561@uni-koblenz.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ralf Baechle wrote:
> 
> On Mon, May 15, 2000 at 11:46:20AM -0700, Jun Sun wrote:
> 
> > I am writing a gdbserver for linux/mips.  The server can now talk with
> > the gdb client, and can run to completion if you press 'c'.
> 
> > reg #29 ($29,sp) = 2147483120 (0x7ffffdf0)
> 
> The value of sp looks sane, it a value near the absolute top of the stack
> at 0x80000000.
> 
> > reg #37 ($64,pc) = 263607008 (0x0fb652e0)
> 
> Also looks sane at first look, this value is in the typical address range
> where the dynamic linker gets mapped.
> 
> Many of the registers in the dump you gave have a value of zero and that is
> worrying me much more.  All the caller saved registers are zero, that
> smells.
> 

I looked at the problem again.  The registers are actually correct. 
Most registers are zero becase that is the program start up time (in
exec()). I now can set a breakpoint and run until that breakpoint.

However, step or next or setting another breakpoint do not work.  It
appears that gdbserver calls ptrace with PTRACE_SINGLESTEP option, which
is not implemented in the kernel I am using (it is v2.3.99-pre3).  Is
this implemented in the latest version?  If not, is it difficult to add
one?  Or can we get around without it?

Jun

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

* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from  [Jun Sun <jsun@mvista.com>]]
@ 2000-05-24 18:43 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-24 18:43 UTC (permalink / raw)
  To: linux



-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 23 May 2000 16:48:51 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu

>From owner-linux  Tue May 23 16:48:50 2000
Received: from sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id QAA62223
	for <linux@engr.sgi.com>;
	Tue, 23 May 2000 16:48:42 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from hermes.mvista.com (gateway.mvista.com [63.192.220.206]) 
	by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id QAA04698
	for <linux@engr.sgi.com>; Tue, 23 May 2000 16:48:37 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75])
	by hermes.mvista.com (8.9.3/8.9.3) with ESMTP id QAA03052;
	Tue, 23 May 2000 16:48:38 -0700
Sender: jsun@hermes.mvista.com
Message-ID: <392B18D6.F4B11BED@mvista.com>
Date: Tue, 23 May 2000 16:48:38 -0700
From: Jun Sun <jsun@mvista.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20b i586)
X-Accept-Language: en
MIME-Version: 1.0
To: linux@engr.sgi.com, linux-mips@fnet.fr
Subject: gdbserver for MIPS
Content-Type: multipart/mixed;
 boundary="------------732E7D3674406CC64CF16CED"

This is a multi-part message in MIME format.
--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I finally got gdbserver working on MIPS.  Who should I submit the
patches to?

There are three patches/changes made :

1. in kernel, arch/mips/ptrace.c - I did not generate patch file as my
kernel version is probably outdated.  Basically if  CONFIG_CPU_NO_FPU is
defined, return -1 for reading FPC_EIR register, instead of actually
reading the hardware.

2. a patch for gdbserver - see attached gdb-4.17-mips-gdbserver.patch

3. I need an additional patch for my particular board to work.  I am not
sure if they are generically applicable.  This patch overcomes a VERY
SLOW getprotobyname() problem and sending a virtual FP register value
problem.  See the second attached file.

There is still one annoyance - stepping through a glibc function would
generate a unknown address warning.  Other than that, everything seems
to work fine - with my limited tests, that it.


Jun
--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii;
 name="gdb-4.17-mips-gdbserver.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdb-4.17-mips-gdbserver.patch"

--- gdb-4.17/gdb/config/mips/mipsel-linux.mh.orig	Mon May 22 18:39:07
2000
+++ gdb-4.17/gdb/config/mips/mipsel-linux.mh	Mon May 22 18:39:07 2000
@@ -3,6 +3,8 @@
 XM_FILE= xm-llinux.h
 NAT_FILE= nm-linux.h
 NATDEPFILES= infptrace.o inftarg.o mipslinux-nat.o corelow.o
core-regset.o fork-child.o solib.o
+GDBSERVER_DEPFILES= low-linux.o
+GDBSERVER_LIBS=
 
 MMALLOC =
 MMALLOC_CFLAGS = -DNO_MMALLOC
--- gdb-4.17/gdb/config/mips/xm-llinux.h.orig	Mon May 22 18:39:07 2000
+++ gdb-4.17/gdb/config/mips/xm-llinux.h	Mon May 22 18:41:36 2000
@@ -31,3 +31,6 @@
 #define HAVE_TERMIOS
 #define HAVE_SIGSETMASK 1
 #define USG
+
+#define REGISTER_U_ADDR(addr, blockend, regno)          \
+	addr = regno
--- gdb-4.17/gdb/gdbserver/utils.c.orig	Fri Aug  8 21:49:48 1997
+++ gdb-4.17/gdb/gdbserver/utils.c	Mon May 22 18:39:07 2000
@@ -32,7 +32,7 @@
      char *string;
 {
   extern int sys_nerr;
-  extern char *sys_errlist[];
+  extern const char * const sys_errlist[];
   extern int errno;
   char *err;
   char *combined;
--- gdb-4.17/gdb/gdbserver/low-linux.c.orig	Fri Oct 11 12:26:04 1996
+++ gdb-4.17/gdb/gdbserver/low-linux.c	Mon May 22 18:44:37 2000
@@ -44,11 +44,17 @@
 char buf2[MAX_REGISTER_RAW_SIZE];
 /***************End MY defs*********************/
 
-#include <sys/ptrace.h>
+#include <asm/ptrace.h>
 #if 0
+#include <sys/ptrace.h>
 #include <machine/reg.h>
 #endif
 
+/* [jsun] if NUM_FREGS is not defined, it probably should be 0 */
+#if !defined(NUM_FREGS)
+#define		NUM_FREGS		0
+#endif
+
 extern char **environ;
 extern int errno;
 extern int inferior_pid;
@@ -72,7 +78,7 @@
 
   if (pid == 0)
     {
-      ptrace (PTRACE_TRACEME, 0, 0, 0);
+      ptrace (PTRACE_TRACEME, 0, 0, 0); 
 
       execv (program, allargs);
 
@@ -165,6 +171,7 @@
     - KERNEL_U_ADDR
 #endif
 
+#if defined(__i386)
 /* this table must line up with REGISTER_NAMES in tm-i386v.h */
 /* symbols like 'EAX' come from <sys/reg.h> */
 static int regmap[] = 
@@ -198,6 +205,8 @@
     return (blockend + 4 * regmap[regnum]);
   
 }
+#endif		/* defined(__i386) */
+
 
 CORE_ADDR
 register_addr (regno, blockend)
@@ -215,7 +224,6 @@
 }
 
 /* Fetch one register.  */
-
 static void
 fetch_register (regno)
      int regno;
@@ -257,7 +265,7 @@
 {
   if (regno == -1 || regno == 0)
     for (regno = 0; regno < NUM_REGS-NUM_FREGS; regno++)
-      fetch_register (regno);
+	  fetch_register (regno);
   else
     fetch_register (regno);
 }
--- gdb-4.17/gdb/gdbserver/gdbreplay.c.orig	Fri Oct 11 12:26:03 1996
+++ gdb-4.17/gdb/gdbserver/gdbreplay.c	Mon May 22 18:39:07 2000
@@ -41,7 +41,7 @@
      char *string;
 {
   extern int sys_nerr;
-  extern char *sys_errlist[];
+  extern const char *const sys_errlist[];
   extern int errno;
   char *err;
   char *combined;

--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii;
 name="gdb-4.17-mips-gdbserver-hhl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdb-4.17-mips-gdbserver-hhl.patch"

--- gdb-4.17/gdb/gdbserver/remote-utils.c.orig	Tue Mar 11 07:49:17 1997
+++ gdb-4.17/gdb/gdbserver/remote-utils.c	Tue May 23 11:12:12 2000
@@ -127,9 +127,12 @@
       if (remote_desc == -1)
 	perror_with_name ("Accept failed");
 
+/* [jsun] getprotobyname() hangs on mips - we just use number 6
directly */
+/*
       protoent = getprotobyname ("tcp");
       if (!protoent)
 	perror_with_name ("getprotobyname");
+ */
 
       /* Enable TCP keep alive process. */
       tmp = 1;
@@ -138,7 +141,10 @@
       /* Tell TCP not to delay small packets.  This greatly speeds up
 	 interactive response. */
       tmp = 1;
+/*
       setsockopt (remote_desc, protoent->p_proto, TCP_NODELAY,
+ */
+      setsockopt (remote_desc, 6, TCP_NODELAY,
 		  (char *)&tmp, sizeof(tmp));
 
       close (tmp_desc);		/* No longer need this */
@@ -447,7 +453,8 @@
   if (status == 'T')
     {
       buf = outreg (PC_REGNUM, buf);
-      buf = outreg (FP_REGNUM, buf);
+      /* [jsun] this causes client to complain */
+      /* buf = outreg (FP_REGNUM, buf); */
       buf = outreg (SP_REGNUM, buf);
 #ifdef NPC_REGNUM
       buf = outreg (NPC_REGNUM, buf);

--------------732E7D3674406CC64CF16CED--

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

* [Fwd: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from [Jun Sun <jsun@mvista.com>]]
@ 2000-05-24 18:43 ` Nancy Bigham
  0 siblings, 0 replies; 6+ messages in thread
From: Nancy Bigham @ 2000-05-24 18:43 UTC (permalink / raw)
  To: linux



-------- Original Message --------
Subject: BOUNCE linux@relay.engr.sgi.com:    Non-member submission from
[Jun Sun <jsun@mvista.com>]
Date: Tue, 23 May 2000 16:48:51 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu

From owner-linux  Tue May 23 16:48:50 2000
Received: from sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id QAA62223
	for <linux@engr.sgi.com>;
	Tue, 23 May 2000 16:48:42 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from hermes.mvista.com (gateway.mvista.com [63.192.220.206]) 
	by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id QAA04698
	for <linux@engr.sgi.com>; Tue, 23 May 2000 16:48:37 -0700 (PDT)
	mail_from (jsun@mvista.com)
Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75])
	by hermes.mvista.com (8.9.3/8.9.3) with ESMTP id QAA03052;
	Tue, 23 May 2000 16:48:38 -0700
Sender: jsun@hermes.mvista.com
Message-ID: <392B18D6.F4B11BED@mvista.com>
Date: Tue, 23 May 2000 16:48:38 -0700
From: Jun Sun <jsun@mvista.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20b i586)
X-Accept-Language: en
MIME-Version: 1.0
To: linux@engr.sgi.com, linux-mips@fnet.fr
Subject: gdbserver for MIPS
Content-Type: multipart/mixed;
 boundary="------------732E7D3674406CC64CF16CED"

This is a multi-part message in MIME format.
--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I finally got gdbserver working on MIPS.  Who should I submit the
patches to?

There are three patches/changes made :

1. in kernel, arch/mips/ptrace.c - I did not generate patch file as my
kernel version is probably outdated.  Basically if  CONFIG_CPU_NO_FPU is
defined, return -1 for reading FPC_EIR register, instead of actually
reading the hardware.

2. a patch for gdbserver - see attached gdb-4.17-mips-gdbserver.patch

3. I need an additional patch for my particular board to work.  I am not
sure if they are generically applicable.  This patch overcomes a VERY
SLOW getprotobyname() problem and sending a virtual FP register value
problem.  See the second attached file.

There is still one annoyance - stepping through a glibc function would
generate a unknown address warning.  Other than that, everything seems
to work fine - with my limited tests, that it.


Jun
--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii;
 name="gdb-4.17-mips-gdbserver.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdb-4.17-mips-gdbserver.patch"

--- gdb-4.17/gdb/config/mips/mipsel-linux.mh.orig	Mon May 22 18:39:07
2000
+++ gdb-4.17/gdb/config/mips/mipsel-linux.mh	Mon May 22 18:39:07 2000
@@ -3,6 +3,8 @@
 XM_FILE= xm-llinux.h
 NAT_FILE= nm-linux.h
 NATDEPFILES= infptrace.o inftarg.o mipslinux-nat.o corelow.o
core-regset.o fork-child.o solib.o
+GDBSERVER_DEPFILES= low-linux.o
+GDBSERVER_LIBS=
 
 MMALLOC =
 MMALLOC_CFLAGS = -DNO_MMALLOC
--- gdb-4.17/gdb/config/mips/xm-llinux.h.orig	Mon May 22 18:39:07 2000
+++ gdb-4.17/gdb/config/mips/xm-llinux.h	Mon May 22 18:41:36 2000
@@ -31,3 +31,6 @@
 #define HAVE_TERMIOS
 #define HAVE_SIGSETMASK 1
 #define USG
+
+#define REGISTER_U_ADDR(addr, blockend, regno)          \
+	addr = regno
--- gdb-4.17/gdb/gdbserver/utils.c.orig	Fri Aug  8 21:49:48 1997
+++ gdb-4.17/gdb/gdbserver/utils.c	Mon May 22 18:39:07 2000
@@ -32,7 +32,7 @@
      char *string;
 {
   extern int sys_nerr;
-  extern char *sys_errlist[];
+  extern const char * const sys_errlist[];
   extern int errno;
   char *err;
   char *combined;
--- gdb-4.17/gdb/gdbserver/low-linux.c.orig	Fri Oct 11 12:26:04 1996
+++ gdb-4.17/gdb/gdbserver/low-linux.c	Mon May 22 18:44:37 2000
@@ -44,11 +44,17 @@
 char buf2[MAX_REGISTER_RAW_SIZE];
 /***************End MY defs*********************/
 
-#include <sys/ptrace.h>
+#include <asm/ptrace.h>
 #if 0
+#include <sys/ptrace.h>
 #include <machine/reg.h>
 #endif
 
+/* [jsun] if NUM_FREGS is not defined, it probably should be 0 */
+#if !defined(NUM_FREGS)
+#define		NUM_FREGS		0
+#endif
+
 extern char **environ;
 extern int errno;
 extern int inferior_pid;
@@ -72,7 +78,7 @@
 
   if (pid == 0)
     {
-      ptrace (PTRACE_TRACEME, 0, 0, 0);
+      ptrace (PTRACE_TRACEME, 0, 0, 0); 
 
       execv (program, allargs);
 
@@ -165,6 +171,7 @@
     - KERNEL_U_ADDR
 #endif
 
+#if defined(__i386)
 /* this table must line up with REGISTER_NAMES in tm-i386v.h */
 /* symbols like 'EAX' come from <sys/reg.h> */
 static int regmap[] = 
@@ -198,6 +205,8 @@
     return (blockend + 4 * regmap[regnum]);
   
 }
+#endif		/* defined(__i386) */
+
 
 CORE_ADDR
 register_addr (regno, blockend)
@@ -215,7 +224,6 @@
 }
 
 /* Fetch one register.  */
-
 static void
 fetch_register (regno)
      int regno;
@@ -257,7 +265,7 @@
 {
   if (regno == -1 || regno == 0)
     for (regno = 0; regno < NUM_REGS-NUM_FREGS; regno++)
-      fetch_register (regno);
+	  fetch_register (regno);
   else
     fetch_register (regno);
 }
--- gdb-4.17/gdb/gdbserver/gdbreplay.c.orig	Fri Oct 11 12:26:03 1996
+++ gdb-4.17/gdb/gdbserver/gdbreplay.c	Mon May 22 18:39:07 2000
@@ -41,7 +41,7 @@
      char *string;
 {
   extern int sys_nerr;
-  extern char *sys_errlist[];
+  extern const char *const sys_errlist[];
   extern int errno;
   char *err;
   char *combined;

--------------732E7D3674406CC64CF16CED
Content-Type: text/plain; charset=us-ascii;
 name="gdb-4.17-mips-gdbserver-hhl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdb-4.17-mips-gdbserver-hhl.patch"

--- gdb-4.17/gdb/gdbserver/remote-utils.c.orig	Tue Mar 11 07:49:17 1997
+++ gdb-4.17/gdb/gdbserver/remote-utils.c	Tue May 23 11:12:12 2000
@@ -127,9 +127,12 @@
       if (remote_desc == -1)
 	perror_with_name ("Accept failed");
 
+/* [jsun] getprotobyname() hangs on mips - we just use number 6
directly */
+/*
       protoent = getprotobyname ("tcp");
       if (!protoent)
 	perror_with_name ("getprotobyname");
+ */
 
       /* Enable TCP keep alive process. */
       tmp = 1;
@@ -138,7 +141,10 @@
       /* Tell TCP not to delay small packets.  This greatly speeds up
 	 interactive response. */
       tmp = 1;
+/*
       setsockopt (remote_desc, protoent->p_proto, TCP_NODELAY,
+ */
+      setsockopt (remote_desc, 6, TCP_NODELAY,
 		  (char *)&tmp, sizeof(tmp));
 
       close (tmp_desc);		/* No longer need this */
@@ -447,7 +453,8 @@
   if (status == 'T')
     {
       buf = outreg (PC_REGNUM, buf);
-      buf = outreg (FP_REGNUM, buf);
+      /* [jsun] this causes client to complain */
+      /* buf = outreg (FP_REGNUM, buf); */
       buf = outreg (SP_REGNUM, buf);
 #ifdef NPC_REGNUM
       buf = outreg (NPC_REGNUM, buf);

--------------732E7D3674406CC64CF16CED--

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

end of thread, other threads:[~2000-05-24 18:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-16 17:33 [Fwd: BOUNCE linux@relay.engr.sgi.com: Non-member submission from [Jun Sun <jsun@mvista.com>]] Nancy Bigham
2000-05-16 17:33 ` Nancy Bigham
  -- strict thread matches above, loose matches on Subject: below --
2000-05-16 18:02 Nancy Bigham
2000-05-16 18:02 ` Nancy Bigham
2000-05-24 18:43 Nancy Bigham
2000-05-24 18:43 ` Nancy Bigham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.