aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2002-05-24 12:42:51 +0800
committerjdp <jdp@FreeBSD.org>2002-05-24 12:42:51 +0800
commit31e56b6ea3ce470d0da6722adbaa8f20dd7210ea (patch)
tree6a1da54bdf25f0248d8d1dec22c389d85c17a2d7 /lang
parent2c46d23c2690e8dff8967b9d931b57cc315011fb (diff)
downloadfreebsd-ports-gnome-31e56b6ea3ce470d0da6722adbaa8f20dd7210ea.tar.gz
freebsd-ports-gnome-31e56b6ea3ce470d0da6722adbaa8f20dd7210ea.tar.zst
freebsd-ports-gnome-31e56b6ea3ce470d0da6722adbaa8f20dd7210ea.zip
Make this port compile again, and remove the BROKEN annotation.
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;