From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Sep 18 04:10:31 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAFC016A4CE for ; Sat, 18 Sep 2004 04:10:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8338843D41 for ; Sat, 18 Sep 2004 04:10:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i8I4AVdB000966 for ; Sat, 18 Sep 2004 04:10:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8I4AViA000965; Sat, 18 Sep 2004 04:10:31 GMT (envelope-from gnats) Resent-Date: Sat, 18 Sep 2004 04:10:31 GMT Resent-Message-Id: <200409180410.i8I4AViA000965@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yen-Ming Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 145E416A4CE; Sat, 18 Sep 2004 04:07:52 +0000 (GMT) Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3406343D2D; Sat, 18 Sep 2004 04:07:51 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from localhost (localhost [127.0.0.1]) by utopia.leeym.com (Postfix) with ESMTP id 5C8143E9CD4; Sat, 18 Sep 2004 12:07:50 +0800 (CST) Received: from utopia.leeym.com ([127.0.0.1]) by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 59981-09; Sat, 18 Sep 2004 12:07:48 +0800 (CST) Received: by utopia.leeym.com (Postfix, from userid 1000) id 1A7E83E9CE8; Sat, 18 Sep 2004 12:07:48 +0800 (CST) Message-Id: <20040918040748.1A7E83E9CE8@utopia.leeym.com> Date: Sat, 18 Sep 2004 12:07:48 +0800 (CST) From: Yen-Ming Lee To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: jdp@FreeBSD.org Subject: ports/71839: [PATCH] lang/m3gdb: unbreak on 5.x X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2004 04:10:31 -0000 >Number: 71839 >Category: ports >Synopsis: [PATCH] lang/m3gdb: unbreak on 5.x >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Sep 18 04:10:31 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 5.3-BETA4 i386 >Organization: FreeBSD Taiwan >Environment: System: FreeBSD utopia.leeym.com 5.3-BETA4 FreeBSD 5.3-BETA4 #7: Mon Sep 13 05:12:30 CST 2004 >Description: - unbreak it on 5.x (tested on 4.9-RC and 5.3-BETA4) Added file(s): - files/patch-defs.h - files/patch-top.c Port maintainer (jdp@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- m3gdb-4.17.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/lang/m3gdb/Makefile,v retrieving revision 1.14 diff -u -u -r1.14 Makefile --- Makefile 6 Feb 2004 13:11:37 -0000 1.14 +++ Makefile 18 Sep 2004 04:05:57 -0000 @@ -23,16 +23,12 @@ .include -.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 Index: files/patch-aa =================================================================== RCS file: /home/pcvs/ports/lang/m3gdb/files/patch-aa,v retrieving revision 1.3 diff -u -u -r1.3 patch-aa --- files/patch-aa 10 Sep 1999 00:40:04 -0000 1.3 +++ files/patch-aa 18 Sep 2004 04:05:58 -0000 @@ -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 Index: files/patch-ae =================================================================== RCS file: /home/pcvs/ports/lang/m3gdb/files/patch-ae,v retrieving revision 1.2 diff -u -u -r1.2 patch-ae --- files/patch-ae 24 May 2002 04:42:51 -0000 1.2 +++ files/patch-ae 18 Sep 2004 04:05:58 -0000 @@ -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 */ + Index: files/patch-af =================================================================== RCS file: /home/pcvs/ports/lang/m3gdb/files/patch-af,v retrieving revision 1.1 diff -u -u -r1.1 patch-af --- files/patch-af 8 Sep 1999 18:02:33 -0000 1.1 +++ files/patch-af 18 Sep 2004 04:05:58 -0000 @@ -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 + #include + #include ++#include + #include + #include + #include +@@ -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 */ Index: files/patch-defs.h =================================================================== RCS file: files/patch-defs.h diff -N files/patch-defs.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-defs.h 18 Sep 2004 04:05:58 -0000 @@ -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 Index: files/patch-top.c =================================================================== RCS file: files/patch-top.c diff -N files/patch-top.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-top.c 18 Sep 2004 04:05:58 -0000 @@ -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; --- m3gdb-4.17.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: