mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Import the "m3gdb" port. It is a modified version of gdb-4.17 which
supports debugging Modula-3 programs. Submitted by: Olaf Wagner <wagner@luthien.in-berlin.de>
This commit is contained in:
parent
564defaee6
commit
d7d078dbae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=16957
29
lang/m3gdb/Makefile
Normal file
29
lang/m3gdb/Makefile
Normal file
@ -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 <bsd.port.mk>
|
1
lang/m3gdb/distinfo
Normal file
1
lang/m3gdb/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (m3gdb-4.17.tar.gz) = 017ac31f4eea81621a396af5970323bd
|
137
lang/m3gdb/files/patch-aa
Normal file
137
lang/m3gdb/files/patch-aa
Normal file
@ -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
|
13
lang/m3gdb/files/patch-ab
Normal file
13
lang/m3gdb/files/patch-ab
Normal file
@ -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));
|
1
lang/m3gdb/pkg-comment
Normal file
1
lang/m3gdb/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
The GNU debugger with support for Modula-3
|
17
lang/m3gdb/pkg-descr
Normal file
17
lang/m3gdb/pkg-descr
Normal file
@ -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 <wagner@luthien.in-berlin.de>
|
1
lang/m3gdb/pkg-plist
Normal file
1
lang/m3gdb/pkg-plist
Normal file
@ -0,0 +1 @@
|
||||
bin/m3gdb
|
Loading…
Reference in New Issue
Block a user