aboutsummaryrefslogtreecommitdiffstats
path: root/lang/m3gdb
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2004-09-22 01:18:56 +0800
committerleeym <leeym@FreeBSD.org>2004-09-22 01:18:56 +0800
commit0bc807f515548126995fc97f64d03e0623e23378 (patch)
tree1b88725a15f15f42b8cf18f275d49ae3906855f7 /lang/m3gdb
parent0d2ed0e57e6d54590ccae23c6c7283e8f68d58cf (diff)
downloadfreebsd-ports-gnome-0bc807f515548126995fc97f64d03e0623e23378.tar.gz
freebsd-ports-gnome-0bc807f515548126995fc97f64d03e0623e23378.tar.zst
freebsd-ports-gnome-0bc807f515548126995fc97f64d03e0623e23378.zip
- unbreak this port on 5.x
- utilize PORTNAME and PORTVERSION PR: 71839 Submitted by: leeym Approved by: portmgr (marcus), jdp (maintainer)
Diffstat (limited to 'lang/m3gdb')
-rw-r--r--lang/m3gdb/Makefile14
-rw-r--r--lang/m3gdb/files/patch-aa3
-rw-r--r--lang/m3gdb/files/patch-ae39
-rw-r--r--lang/m3gdb/files/patch-af67
-rw-r--r--lang/m3gdb/files/patch-defs.h13
-rw-r--r--lang/m3gdb/files/patch-top.c10
6 files changed, 126 insertions, 20 deletions
diff --git a/lang/m3gdb/Makefile b/lang/m3gdb/Makefile
index 0154bac083e1..b72c91c249da 100644
--- a/lang/m3gdb/Makefile
+++ b/lang/m3gdb/Makefile
@@ -9,9 +9,9 @@ PORTNAME= m3gdb
PORTVERSION= 4.17
CATEGORIES= lang devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR=jdp/m3gdb
-DISTFILES= m3gdb-4.17.tar.gz \
- m3gdb-fbsd-4.17.tar.gz
+MASTER_SITE_SUBDIR=jdp/${PORTNAME}
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz \
+ ${PORTNAME}-fbsd-${PORTVERSION}.tar.gz
MAINTAINER= jdp@FreeBSD.org
COMMENT= The GNU debugger with support for Modula-3
@@ -23,16 +23,12 @@ PLIST_FILES= bin/m3gdb
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not build"
-.endif
-
.if ${PORTOBJFORMAT} == "aout"
BROKEN= does not support a.out systems
.endif
pre-build:
- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} make depend
- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} make libbuild
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} depend
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} libbuild
.include <bsd.port.post.mk>
diff --git a/lang/m3gdb/files/patch-aa b/lang/m3gdb/files/patch-aa
index c40941d6d7b8..50df754a2cac 100644
--- a/lang/m3gdb/files/patch-aa
+++ b/lang/m3gdb/files/patch-aa
@@ -1,7 +1,6 @@
--- Makefile.orig Wed Feb 17 09:55:20 1999
+++ Makefile Wed Sep 8 09:35:39 1999
-@@ -1,23 +1,25 @@
- # $Id: Makefile,v 1.38 1998/10/15 14:15:09 bde Exp $
+@@ -2,22 +2,24 @@
-PROG = m3gdb
+PROG= m3gdb
diff --git a/lang/m3gdb/files/patch-ae b/lang/m3gdb/files/patch-ae
index 8e7eb464ff60..adf093ca0951 100644
--- a/lang/m3gdb/files/patch-ae
+++ b/lang/m3gdb/files/patch-ae
@@ -1,22 +1,43 @@
---- 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 Thu May 23 21:36:56 2002
-@@ -115,9 +115,7 @@
+--- src/gnu/usr.bin/gdb/gdb/freebsd-nat.c.orig Tue Sep 15 06:49:02 1998
++++ src/gnu/usr.bin/gdb/gdb/freebsd-nat.c Sat Sep 18 10:54:57 2004
+@@ -108,17 +108,23 @@
+ * First get virtual address of user structure. Then calculate offset.
+ */
+ memcpy(&tmp_uaddr,
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ &((struct user *) core_reg_sect)->u_kproc.ki_addr,
++#else
+ &((struct user *) core_reg_sect)->u_kproc.kp_proc.p_addr,
++#endif
+ sizeof(tmp_uaddr));
+ offset = -reg_addr - (int) tmp_uaddr;
+
for (regno = 0; regno < NUM_REGS; regno++)
{
cregno = tregmap[regno];
- if (cregno == tFS)
- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_fs);
- else if (cregno == tGS)
+- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_gs);
+ if (cregno == tGS)
- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_gs);
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ addr = offsetof (struct user, u_kproc) + offsetof (struct kinfo_proc, ki_pcb) + offsetof (struct pcb, pcb_gs);
++#else
++ addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_gs);
++#endif
else
addr = offset + 4 * cregno;
-@@ -136,7 +134,7 @@
+ if (addr < 0 || addr >= core_reg_size)
+@@ -136,7 +134,11 @@
error ("Register %s not found in core file.", reg_names[bad_reg]);
}
- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_savefpu);
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ addr = offsetof (struct user, u_kproc) + offsetof (struct kinfo_proc, ki_pcb) + offsetof (struct pcb, pcb_save);
++#else
+ addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_save);
++#endif
memcpy (&pcb_savefpu, core_reg_sect + addr, sizeof pcb_savefpu);
}
@@ -28,7 +49,7 @@
static void
i387_to_double (from, to)
-@@ -331,36 +328,14 @@
+@@ -331,41 +328,19 @@
void
i386_float_info ()
{
@@ -68,3 +89,9 @@
}
else
fpstatep = &pcb_savefpu;
+
+- print_387_status (fpstatep->sv_ex_sw, (struct env387 *)fpstatep);
++ print_387_status (fpstatep->sv_env, (struct env387 *)fpstatep);
+ }
+ #endif /* FLOAT_INFO */
+
diff --git a/lang/m3gdb/files/patch-af b/lang/m3gdb/files/patch-af
index a30c3972b895..5ab1e1b742e6 100644
--- a/lang/m3gdb/files/patch-af
+++ b/lang/m3gdb/files/patch-af
@@ -1,6 +1,58 @@
---- kvm-fbsd.c.orig Sun Feb 7 04:36:10 1999
-+++ kvm-fbsd.c Wed Sep 8 10:38:14 1999
-@@ -835,9 +835,8 @@
+--- kvm-fbsd.c.orig Sun Feb 7 20:36:10 1999
++++ kvm-fbsd.c Sat Sep 18 11:23:31 2004
+@@ -22,6 +22,7 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <fcntl.h>
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <sys/param.h>
+ #include <sys/time.h>
+@@ -361,10 +362,19 @@
+ struct user *uaddr;
+
+ /* find the pcb for the current process */
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ if (cur_proc == NULL || kvread (&cur_proc->p_uarea, &uaddr))
++#else
+ if (cur_proc == NULL || kvread (&cur_proc->p_addr, &uaddr))
++#endif
+ error ("cannot read u area ptr for proc at %#x", cur_proc);
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_kproc.ki_pcb) < 0)
++ error ("cannot read pcb at %#x", &uaddr->u_kproc.ki_pcb);
++#else
+ if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_pcb) < 0)
+ error ("cannot read pcb at %#x", &uaddr->u_pcb);
++#endif
+ }
+
+ static void
+@@ -450,7 +451,11 @@
+ kp = kvm_getprocs(core_kd, KERN_PROC_PID, paddr, &cnt);
+ if (!cnt)
+ error("invalid pid");
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ if (set_proc_context((CORE_ADDR)kp->ki_paddr))
++#else
+ if (set_proc_context((CORE_ADDR)kp->kp_eproc.e_paddr))
++#endif
+ error("invalid proc address");
+ }
+ }
+@@ -643,7 +644,11 @@
+ return (0);
+ if (lp.p_pid != pid)
+ continue;
++#if defined(__FreeBSD__) && __FreeBSD__ >= 5
++ kp.ki_paddr = p;
++#else
+ kp.kp_eproc.e_paddr = p;
++#endif
+ *cnt = 1;
+ return (1);
+ }
+@@ -835,9 +836,8 @@
supply_register (6, (char *)&pcb.pcb_esi);
supply_register (7, (char *)&pcb.pcb_edi);
supply_register (PC_REGNUM, (char *)&pcb.pcb_eip);
@@ -11,3 +63,12 @@
supply_register (15, (char *)&pcb.pcb_gs);
/* XXX 80387 registers? */
+@@ -919,7 +919,7 @@
+ #if 0
+ kcore_stratum, /* to_stratum */
+ #else
+- NULL, /* haven't yet found this one... */
++ 0, /* haven't yet found this one... */
+ #endif
+ NULL, /* to_next */
+ 0, /* to_has_all_memory */
diff --git a/lang/m3gdb/files/patch-defs.h b/lang/m3gdb/files/patch-defs.h
new file mode 100644
index 000000000000..c27e6c042872
--- /dev/null
+++ b/lang/m3gdb/files/patch-defs.h
@@ -0,0 +1,13 @@
+--- defs.h.orig Sat Sep 18 11:08:32 2004
++++ defs.h Sat Sep 18 11:08:47 2004
+@@ -420,10 +420,6 @@
+
+ extern int read_relative_register_raw_bytes PARAMS ((int, char *));
+
+-/* From readline (but not in any readline .h files). */
+-
+-extern char *tilde_expand PARAMS ((char *));
+-
+ /* Control types for commands */
+
+ enum misc_command_type
diff --git a/lang/m3gdb/files/patch-top.c b/lang/m3gdb/files/patch-top.c
new file mode 100644
index 000000000000..bc35c1679589
--- /dev/null
+++ b/lang/m3gdb/files/patch-top.c
@@ -0,0 +1,10 @@
+--- top.c.orig Sat Sep 18 11:05:40 2004
++++ top.c Sat Sep 18 11:06:55 2004
+@@ -1503,7 +1503,6 @@
+ char *word;
+ {
+ /* From readline. */
+- extern char *filename_completion_function PARAMS ((char *, int));
+ int subsequent_name;
+ char **return_val;
+ int return_val_used;