aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>2002-05-24 04:42:51 +0000
committerJohn Polstra <jdp@FreeBSD.org>2002-05-24 04:42:51 +0000
commit137057189f7f1e9d6381a0d3555ba547cb859c32 (patch)
tree7e8826e75ff3790811331c996b03f6059d571631 /lang
parenta9c25bea066e291141c1814ae7465941602724fc (diff)
downloadports-137057189f7f1e9d6381a0d3555ba547cb859c32.tar.gz
ports-137057189f7f1e9d6381a0d3555ba547cb859c32.zip
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/m3gdb/Makefile2
-rw-r--r--lang/m3gdb/files/patch-ae59
2 files changed, 58 insertions, 3 deletions
diff --git a/lang/m3gdb/Makefile b/lang/m3gdb/Makefile
index c3b0a2e7fb2d..2b6d5f1f158f 100644
--- a/lang/m3gdb/Makefile
+++ b/lang/m3gdb/Makefile
@@ -15,8 +15,6 @@ DISTFILES= m3gdb-4.17.tar.gz \
MAINTAINER= jdp@FreeBSD.org
-BROKEN= "Does not compile"
-
MAN1= m3gdb.1
MANCOMPRESSED= yes
ONLY_FOR_ARCHS= i386
diff --git a/lang/m3gdb/files/patch-ae b/lang/m3gdb/files/patch-ae
index 4e680810f397..8e7eb464ff60 100644
--- a/lang/m3gdb/files/patch-ae
+++ b/lang/m3gdb/files/patch-ae
@@ -1,5 +1,5 @@
--- src/gnu/usr.bin/gdb/gdb/freebsd-nat.c.orig Mon Sep 14 15:49:02 1998
-+++ src/gnu/usr.bin/gdb/gdb/freebsd-nat.c Wed Sep 8 10:33:06 1999
++++ src/gnu/usr.bin/gdb/gdb/freebsd-nat.c Thu May 23 21:36:56 2002
@@ -115,9 +115,7 @@
for (regno = 0; regno < NUM_REGS; regno++)
{
@@ -11,3 +11,60 @@
addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_gs);
else
addr = offset + 4 * cregno;
+@@ -136,7 +134,7 @@
+ error ("Register %s not found in core file.", reg_names[bad_reg]);
+ }
+
+- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_savefpu);
++ addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_save);
+ memcpy (&pcb_savefpu, core_reg_sect + addr, sizeof pcb_savefpu);
+ }
+
+@@ -166,7 +164,6 @@
+ extern void print_387_status_word ();
+
+ #define fpstate save87
+-#define U_FPSTATE(u) u.u_pcb.pcb_savefpu
+
+ static void
+ i387_to_double (from, to)
+@@ -331,36 +328,14 @@
+ void
+ i386_float_info ()
+ {
+- struct user u; /* just for address computations */
+- int i;
+- /* fpstate defined in <sys/user.h> */
++ struct fpstate fps;
+ struct fpstate *fpstatep;
+- char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
+- unsigned int uaddr;
+- char fpvalid;
+- unsigned int rounded_addr;
+- unsigned int rounded_size;
+- /*extern int corechan;*/
+- int skip;
+ extern int inferior_pid;
+
+- uaddr = (char *)&U_FPSTATE(u) - (char *)&u;
+ if (inferior_pid != 0 && core_bfd == NULL)
+ {
+- int *ip;
+-
+- rounded_addr = uaddr & -sizeof (int);
+- rounded_size = (((uaddr + sizeof (struct fpstate)) - uaddr) +
+- sizeof (int) - 1) / sizeof (int);
+- skip = uaddr - rounded_addr;
+-
+- ip = (int *)buf;
+- for (i = 0; i < rounded_size; i++)
+- {
+- *ip++ = ptrace (PT_READ_U, inferior_pid, (caddr_t)rounded_addr, 0);
+- rounded_addr += sizeof (int);
+- }
+- fpstatep = (struct fpstate *)(buf + skip);
++ ptrace(PT_GETFPREGS, inferior_pid, (caddr_t)&fps, 0);
++ fpstatep = &fps;
+ }
+ else
+ fpstatep = &pcb_savefpu;