From d7d078dbae04af55305c16a1548c17343d812546 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Mon, 1 Mar 1999 04:11:23 +0000 Subject: [PATCH] Import the "m3gdb" port. It is a modified version of gdb-4.17 which supports debugging Modula-3 programs. Submitted by: Olaf Wagner --- lang/m3gdb/Makefile | 29 ++++++++ lang/m3gdb/distinfo | 1 + lang/m3gdb/files/patch-aa | 137 ++++++++++++++++++++++++++++++++++++++ lang/m3gdb/files/patch-ab | 13 ++++ lang/m3gdb/pkg-comment | 1 + lang/m3gdb/pkg-descr | 17 +++++ lang/m3gdb/pkg-plist | 1 + 7 files changed, 199 insertions(+) create mode 100644 lang/m3gdb/Makefile create mode 100644 lang/m3gdb/distinfo create mode 100644 lang/m3gdb/files/patch-aa create mode 100644 lang/m3gdb/files/patch-ab create mode 100644 lang/m3gdb/pkg-comment create mode 100644 lang/m3gdb/pkg-descr create mode 100644 lang/m3gdb/pkg-plist diff --git a/lang/m3gdb/Makefile b/lang/m3gdb/Makefile new file mode 100644 index 000000000000..2c14e8844b45 --- /dev/null +++ b/lang/m3gdb/Makefile @@ -0,0 +1,29 @@ +# New ports collection makefile for: m3gdb +# Version required: 4.17 +# Date created: 17 February 1999 +# Whom: wagner@luthien.in-berlin.de +# +# $Id$ +# + +DISTNAME= m3gdb-4.17 +CATEGORIES= lang +MASTER_SITES= http://www.freebsd.org/~jdp/distfiles/ + +MAINTAINER= jdp@FreeBSD.ORG + +MAN1= m3gdb.1 +MANCOMPRESSED= yes + +pre-fetch: + @if [ ! -d /usr/src/contrib/gdb ]; then \ + echo "To build this port you must have the FreeBSD" \ + "sources in \"/usr/src\"."; \ + exit 1; \ + fi + +pre-build: + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} make depend + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} make libbuild + +.include diff --git a/lang/m3gdb/distinfo b/lang/m3gdb/distinfo new file mode 100644 index 000000000000..7ad2a31b5105 --- /dev/null +++ b/lang/m3gdb/distinfo @@ -0,0 +1 @@ +MD5 (m3gdb-4.17.tar.gz) = 017ac31f4eea81621a396af5970323bd diff --git a/lang/m3gdb/files/patch-aa b/lang/m3gdb/files/patch-aa new file mode 100644 index 000000000000..2f452844efa8 --- /dev/null +++ b/lang/m3gdb/files/patch-aa @@ -0,0 +1,137 @@ +--- Makefile.orig Wed Feb 17 09:55:20 1999 ++++ Makefile Sun Feb 28 19:23:16 1999 +@@ -1,23 +1,25 @@ + # $Id: Makefile,v 1.38 1998/10/15 14:15:09 bde Exp $ + +-PROG = m3gdb ++PROG= m3gdb + +-GDBDIR= ${.CURDIR}/../../../../contrib/gdb +-.if ${OBJFORMAT} == elf +-BFDDIR= ${.CURDIR}/../../binutils/libbfd/${MACHINE_ARCH} +-BINDIR= /usr/local/bin ++FBSDGDBDIR= /usr/src/gnu/usr.bin/gdb/gdb ++ ++GDBDIR= ${FBSDGDBDIR}/../../../../contrib/gdb ++ ++.if ${PORTOBJFORMAT} == elf ++BFDDIR= ${FBSDGDBDIR}/../../binutils/libbfd/${MACHINE_ARCH} + .else +-BFDDIR= ${.CURDIR}/../bfd +-BINDIR= /usr/local/bin/aout ++BFDDIR= ${FBSDGDBDIR}/../bfd + .endif +-MANDIR= /usr/local/man/man + +-FBSDGDB=${.CURDIR}/../gdb +-.PATH: ${FBSDGDB} ++BINDIR= ${PREFIX}/bin ++MANDIR= ${PREFIX}/man/man ++ ++.PATH: ${FBSDGDBDIR} + .PATH: ${GDBDIR}/gdb + .PATH: ${GDBDIR}/opcodes + +-.if ${OBJFORMAT} == elf ++.if ${PORTOBJFORMAT} == elf + CFLAGS+= -DFREEBSD_ELF + .endif + CFLAGS+= -DNEED_DECLARATION_FREE +@@ -50,6 +52,9 @@ + m3-lang.c m3-token.c m3-uid.c + SRCS= init.c ${XSRCS} + ++.PHONY: show check libdepend libbuild beforedepend afterdepend ++.PHONY: links localclean ++ + show: + @echo ${XSRCS} + +@@ -60,7 +65,34 @@ + @cd ${.CURDIR} && wc *-files + @echo "" + +-beforedepend: ++beforedepend: libdepend ++#afterdepend: libbuild # too ugly, call it explicitly in pre-build ++ ++.if ${PORTOBJFORMAT} == elf ++LIBBFDDIR= ${FBSDGDBDIR}/../../binutils/libbfd ++LIBIBERTYDIR= ${FBSDGDBDIR}/../../binutils/libiberty ++.else ++LIBBFDDIR= ${FBSDGDBDIR}/../bfd ++LIBIBERTYDIR= ${FBSDGDBDIR}/../libiberty ++.endif ++ ++LIBBFDOBJ= ${.CURDIR}/../libbfd ++LIBIBERTYOBJ= ${.CURDIR}/../libiberty ++ ++libdepend: ++ @echo building dependencies in ${LIBBFDDIR} ++ @mkdir -p ${LIBBFDOBJ} ++ @cd ${LIBBFDDIR} && MAKEOBJDIR=${LIBBFDOBJ} make depend ++ @echo building dependencies in ${LIBIBERTYDIR} ++ @mkdir -p ${LIBIBERTYOBJ} ++ @cd ${LIBIBERTYDIR} && MAKEOBJDIR=${LIBIBERTYOBJ} make depend ++ ++libbuild: ++ @echo building libbfd.a ++ @cd ${LIBBFDDIR} && MAKEOBJDIR=${LIBBFDOBJ} make all ++ @echo building libiberty.a ++ @cd ${LIBIBERTYDIR} && MAKEOBJDIR=${LIBIBERTYOBJ} make all ++ + + links: + @cd ${.CURDIR} && ${.CURDIR}/link-non-local-files.sh +@@ -69,7 +101,12 @@ + @cd ${.CURDIR} && ${.CURDIR}/rm-all-links.sh + cd ${.CURDIR} && rm -f ${.CURDIR}/*.core ${.CURDIR}/*~ + +-CFLAGS+= -I- -I$(.CURDIR) -I${FBSDGDB} -I${DESTDIR}/usr/include/readline -I${BFDDIR} ++CFLAGS+= -I- -I$(.CURDIR) -I${FBSDGDBDIR} ++CFLAGS+= -I${DESTDIR}/usr/include/readline -I${BFDDIR} ++CFLAGS+= -I${GDBDIR}/include -I${GDBDIR}/gdb -I${GDBDIR}/bfd ++CFLAGS+= -I${GDBDIR}/libiberty -I${GDBDIR}/gdb/config ++CFLAGS+= -DHAVE_CONFIG_H ++ + # use phkmalloc + CFLAGS+= -DNO_MMALLOC + # uncomment the next line if you want to debug gdb +@@ -78,35 +115,8 @@ + + CLEANFILES= init.c init.c-tmp + +-.if ${OBJFORMAT} == elf +- +-.if exists(${.OBJDIR}/../../binutils/libbfd) +-LIBBFD= ${.OBJDIR}/../../binutils/libbfd/libbfd.a +-.else +-LIBBFD= ${.CURDIR}/../../binutils/libbfd/libbfd.a +-.endif +- +-.if exists(${.OBJDIR}/../../binutils/libiberty) +-LIBIBERTY= ${.OBJDIR}/../../binutils/libiberty/libiberty.a +-.else +-LIBIBERTY= ${.CURDIR}/../../binutils/libiberty/libiberty.a +-.endif +- +-.else +- +-.if exists(${.OBJDIR}/../bfd) +-LIBBFD= ${.OBJDIR}/../bfd/libbfd.a +-.else +-LIBBFD= ${.CURDIR}/../bfd/libbfd.a +-.endif +- +-.if exists(${.OBJDIR}/../libiberty) +-LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a +-.else +-LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a +-.endif +- +-.endif # OBJFORMAT ++LIBBFD= ${LIBBFDOBJ}/libbfd.a ++LIBIBERTY= ${LIBIBERTYOBJ}/libiberty.a + + DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP} + LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap diff --git a/lang/m3gdb/files/patch-ab b/lang/m3gdb/files/patch-ab new file mode 100644 index 000000000000..39ef141a2144 --- /dev/null +++ b/lang/m3gdb/files/patch-ab @@ -0,0 +1,13 @@ +--- symfile.c.orig Sat Feb 6 13:40:02 1999 ++++ symfile.c Sun Feb 28 19:33:48 1999 +@@ -52,6 +52,10 @@ + #define O_BINARY 0 + #endif + ++#ifndef bfd_section_lma ++#define bfd_section_lma(bfd, ptr) ((ptr)->lma) ++#endif ++ + int (*ui_load_progress_hook) PARAMS ((char *, unsigned long)); + void (*pre_add_symbol_hook) PARAMS ((char *)); + void (*post_add_symbol_hook) PARAMS ((void)); diff --git a/lang/m3gdb/pkg-comment b/lang/m3gdb/pkg-comment new file mode 100644 index 000000000000..35a5944c98ee --- /dev/null +++ b/lang/m3gdb/pkg-comment @@ -0,0 +1 @@ +The GNU debugger with support for Modula-3 diff --git a/lang/m3gdb/pkg-descr b/lang/m3gdb/pkg-descr new file mode 100644 index 000000000000..166257098baa --- /dev/null +++ b/lang/m3gdb/pkg-descr @@ -0,0 +1,17 @@ +This is a port of the GNU debugger with Modula-3 support for +FreeBSD. Using it you can + + o step through your Modula-3 programs in source format + o set/clear/enable/disable breakpoints in Modula-3 programs + o inspect the values of variables and evaluate Modula-3 expressions + o view and inspect stack frames + +Thread support seems not to work right now. + +This debugger is much more useful if your Modula-3 libraries contain +debugging symbols. To accomplish that, do a "make configure" of the +modula-3-lib port. Then edit its "work/m3/m3build/templates/FreeBSD2" +file. Search for "-g" and follow the instructions there. Then finish +building and installing the modula-3-lib port with "make install". + +Olaf Wagner diff --git a/lang/m3gdb/pkg-plist b/lang/m3gdb/pkg-plist new file mode 100644 index 000000000000..d95832722d86 --- /dev/null +++ b/lang/m3gdb/pkg-plist @@ -0,0 +1 @@ +bin/m3gdb