pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/gdb-netbsd: import gdb-8.2.1



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Aug 12 17:28:33 2019 +0200
Changeset:	6cca4dc785f53b3277898da3cd631624ab87ddc5

Added Files:
	gdb-netbsd/DESCR
	gdb-netbsd/Makefile
	gdb-netbsd/PLIST.DragonFly
	gdb-netbsd/PLIST.Linux
	gdb-netbsd/PLIST.common
	gdb-netbsd/TODO
	gdb-netbsd/distinfo
	gdb-netbsd/options.mk
	gdb-netbsd/patches/patch-Makefile.in
	gdb-netbsd/patches/patch-sim_ppc_emul_netbsd.c

Log Message:
wip/gdb-netbsd: import gdb-8.2.1

   The purpose of a debugger such as GDB is to allow you to see what
is going on "inside" another program while it executes--or what
another program was doing at the moment it crashed.

   GDB can do four main kinds of things (plus other things in support
of these) to help you catch bugs in the act:

   * Start your program, specifying anything that might affect its
     behavior.

   * Make your program stop on specified conditions.

   * Examine what has happened, when your program has stopped.

   * Change things in your program, so you can experiment with
     correcting the effects of one bug and go on to learn about
     another.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6cca4dc785f53b3277898da3cd631624ab87ddc5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gdb-netbsd/DESCR                               | 17 +++++
 gdb-netbsd/Makefile                            | 99 ++++++++++++++++++++++++++
 gdb-netbsd/PLIST.DragonFly                     |  3 +
 gdb-netbsd/PLIST.Linux                         |  4 ++
 gdb-netbsd/PLIST.common                        | 52 ++++++++++++++
 gdb-netbsd/TODO                                |  2 +
 gdb-netbsd/distinfo                            |  8 +++
 gdb-netbsd/options.mk                          | 13 ++++
 gdb-netbsd/patches/patch-Makefile.in           | 32 +++++++++
 gdb-netbsd/patches/patch-sim_ppc_emul_netbsd.c | 39 ++++++++++
 10 files changed, 269 insertions(+)

diffs:
diff --git a/gdb-netbsd/DESCR b/gdb-netbsd/DESCR
new file mode 100644
index 0000000000..c7c2207693
--- /dev/null
+++ b/gdb-netbsd/DESCR
@@ -0,0 +1,17 @@
+   The purpose of a debugger such as GDB is to allow you to see what
+is going on "inside" another program while it executes--or what
+another program was doing at the moment it crashed.
+
+   GDB can do four main kinds of things (plus other things in support
+of these) to help you catch bugs in the act:
+
+   * Start your program, specifying anything that might affect its
+     behavior.
+
+   * Make your program stop on specified conditions.
+
+   * Examine what has happened, when your program has stopped.
+
+   * Change things in your program, so you can experiment with
+     correcting the effects of one bug and go on to learn about
+     another.
diff --git a/gdb-netbsd/Makefile b/gdb-netbsd/Makefile
new file mode 100644
index 0000000000..4f66385fab
--- /dev/null
+++ b/gdb-netbsd/Makefile
@@ -0,0 +1,99 @@
+# $NetBSD: Makefile,v 1.61 2019/01/23 15:03:34 kamil Exp $
+
+DISTNAME=	gdb-8.2.1
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GNU:=gdb/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.gnu.org/software/gdb/gdb.html
+COMMENT=	Symbolic debugger for multiple language frontends
+LICENSE=	gnu-gpl-v3
+
+USE_LANGUAGES=		c c++11
+
+BROKEN_GETTEXT_DETECTION=	yes
+GNU_CONFIGURE=			YES
+USE_PKGLOCALEDIR=		YES
+USE_LIBTOOL=			YES
+USE_TOOLS+=			bash gmake msgfmt makeinfo perl:build
+REPLACE_LOCALEDIR_PATTERNS+=	Make-in
+REPLACE_BASH+=			gdb/gcore.in
+INSTALL_TARGET=			install install-info
+TEST_TARGET=			check
+INFO_FILES=			yes
+CONFIGURE_ENV+=			CONFIG_LDFLAGS=${LDFLAGS:M*:Q}
+
+# In gdb/configure, depcomp is parsed with sed.
+SUBST_CLASSES+=			fix-depcomp
+SUBST_STAGE.fix-depcomp=	pre-configure
+SUBST_MESSAGE.fix-depcomp=	Read depcomp directly
+SUBST_FILES.fix-depcomp+=	gdb/configure
+SUBST_SED.fix-depcomp+=		-e 's,< ./depcomp,${_OVERRIDE_PATH.depcomp},'
+
+CONFIGURE_ARGS+=	--disable-binutils
+CONFIGURE_ARGS+=	--disable-gprof
+CONFIGURE_ARGS+=	--disable-gold
+CONFIGURE_ARGS+=	--disable-gas
+CONFIGURE_ARGS+=	--disable-ld
+
+CONFIGURE_ARGS+=	--enable-targets=all
+
+AUTO_MKDIRS=		yes
+
+.include "options.mk"
+
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+=	gcore
+.if (${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" \
+    || ${OPSYS} == "Linux" || ${OPSYS} == "FreeBSD")
+PLIST.gcore=	yes
+.endif
+
+.if ${OPSYS} == "SunOS"
+# Work around a bug in gdb's configure
+CONFIGURE_ENV+=		ac_cv_header_curses_h=yes
+.elif ${OPSYS} == "NetBSD"
+.include "../../mk/curses.buildlink3.mk"
+CONFIGURE_ARGS+= -with-curses
+CONFIGURE_ENV+= gdb_cv_var_elf=yes
+MAKE_ENV+= gdb_cv_var_elf=yes
+CONFIGURE_ENV+= gdb_cv_struct_lwp=yes
+MAKE_ENV+= gdb_cv_struct_lwp=yes
+
+CONFIGURE_ARGS+=	--with-separate-debug-dir=/usr/libdata/debug
+.elif ${OPSYS} == "DragonFly"
+TARGET_STR=		${MACHINE_ARCH}--dragonfly
+BUILD_DEFS+=		${TARGET_STR}
+## Remove "-pc" string, without this, getting following message:
+##	   *** Gdb does not support native target i386-pc-dragonfly"
+CONFIGURE_ARGS+=	--target=${TARGET_STR}
+TEST_ENV=		DEJAGNU=${WRKDIR}/../files/dragonfly-default.exp
+.endif
+
+post-install:
+	${RM} -f ${DESTDIR}/${PREFIX}/lib/charset.alias
+.if ${OPSYS} == "DragonFly"
+# Following are installed by binutils
+#. for f in ansidecl.h bfdlink.h dis-asm.h symcat.h
+#	(cd ${WRKSRC}/include; ${INSTALL_DATA} ${f}  ${DESTDIR}${PREFIX}/include)
+#. endfor
+	(cd ${DESTDIR}${PREFIX}/bin;               ${LN} ${TARGET_STR}-gdb gdb)
+	(cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; ${LN} ${TARGET_STR}-gdb.1 gdb.1)
+.endif
+#
+# PATH of libiberty.a differs between clang and gcc: (and conflicts to other toolchain)
+# Rename to avoid conflict to native and other toolchain
+# and clang differs its path so, (the same as avr-binutils).
+
+	(cd ${DESTDIR}${PREFIX};				\
+	for d in ${MACHINE_ARCH}/libiberty.a libiberty.a;	\
+	  do if [ -f lib/$$d ]; then				\
+		${MV}	lib/$$d	 lib/gdb/libiberty.a;		\
+		break;						\
+	     fi;						\
+	  done;	)
+
+.include "../../mk/termcap.buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gdb-netbsd/PLIST.DragonFly b/gdb-netbsd/PLIST.DragonFly
new file mode 100644
index 0000000000..6c353f82c7
--- /dev/null
+++ b/gdb-netbsd/PLIST.DragonFly
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.DragonFly,v 1.1 2015/03/15 14:56:46 bsiegert Exp $
+bin/i386--dragonfly-gdb
+man/man1/i386--dragonfly-gdb.1
diff --git a/gdb-netbsd/PLIST.Linux b/gdb-netbsd/PLIST.Linux
new file mode 100644
index 0000000000..e4fe491ac0
--- /dev/null
+++ b/gdb-netbsd/PLIST.Linux
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST.Linux,v 1.5 2018/01/31 20:33:11 maya Exp $
+bin/gdbserver
+lib/libinproctrace.so
+man/man1/gcore.1
diff --git a/gdb-netbsd/PLIST.common b/gdb-netbsd/PLIST.common
new file mode 100644
index 0000000000..9e7295ea95
--- /dev/null
+++ b/gdb-netbsd/PLIST.common
@@ -0,0 +1,52 @@
+@comment $NetBSD: PLIST.common,v 1.13 2018/01/31 20:33:11 maya Exp $
+bin/gdb
+bin/gdb-add-index
+include/gdb/jit-reader.h
+info/annotate.info
+info/gdb.info
+info/stabs.info
+man/man1/gdb.1
+man/man1/gdb-add-index.1
+man/man1/gdbserver.1
+man/man5/gdbinit.5
+share/gdb/python/gdb/FrameDecorator.py
+share/gdb/python/gdb/FrameIterator.py
+share/gdb/python/gdb/__init__.py
+share/gdb/python/gdb/command/__init__.py
+share/gdb/python/gdb/command/explore.py
+share/gdb/python/gdb/command/frame_filters.py
+share/gdb/python/gdb/command/pretty_printers.py
+share/gdb/python/gdb/command/prompt.py
+share/gdb/python/gdb/command/type_printers.py
+share/gdb/python/gdb/command/unwinders.py
+share/gdb/python/gdb/command/xmethods.py
+share/gdb/python/gdb/frames.py
+share/gdb/python/gdb/function/__init__.py
+share/gdb/python/gdb/function/as_string.py
+share/gdb/python/gdb/function/caller_is.py
+share/gdb/python/gdb/function/strfns.py
+share/gdb/python/gdb/printer/__init__.py
+share/gdb/python/gdb/printer/bound_registers.py
+share/gdb/python/gdb/printing.py
+share/gdb/python/gdb/prompt.py
+share/gdb/python/gdb/types.py
+share/gdb/python/gdb/unwinder.py
+share/gdb/python/gdb/xmethod.py
+share/gdb/syscalls/aarch64-linux.xml
+share/gdb/syscalls/amd64-linux.xml
+share/gdb/syscalls/arm-linux.xml
+share/gdb/syscalls/freebsd.xml
+share/gdb/syscalls/gdb-syscalls.dtd
+share/gdb/syscalls/i386-linux.xml
+share/gdb/syscalls/mips-n32-linux.xml
+share/gdb/syscalls/mips-n64-linux.xml
+share/gdb/syscalls/mips-o32-linux.xml
+share/gdb/syscalls/ppc-linux.xml
+share/gdb/syscalls/ppc64-linux.xml
+share/gdb/syscalls/s390-linux.xml
+share/gdb/syscalls/s390x-linux.xml
+share/gdb/syscalls/sparc-linux.xml
+share/gdb/syscalls/sparc64-linux.xml
+share/gdb/system-gdbinit/elinos.py
+share/gdb/system-gdbinit/wrs-linux.py
+${PLIST.gcore}bin/gcore
diff --git a/gdb-netbsd/TODO b/gdb-netbsd/TODO
new file mode 100644
index 0000000000..f1b0bed742
--- /dev/null
+++ b/gdb-netbsd/TODO
@@ -0,0 +1,2 @@
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=21600
diff --git a/gdb-netbsd/distinfo b/gdb-netbsd/distinfo
new file mode 100644
index 0000000000..93938e0659
--- /dev/null
+++ b/gdb-netbsd/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (gdb-8.2.1.tar.gz) = d6e40134c92e0f10636455cded0312cc799672c9
+RMD160 (gdb-8.2.1.tar.gz) = a92cabfd5da3e358e16aa424a4a3d8de63366614
+SHA512 (gdb-8.2.1.tar.gz) = 13f557290c7b3fbb99f90d95478d8c3b74f9222cfc391cbb0baad2eb7de76e31513521e4dfffcbbf4d7ab84fa72602df0e38c32666d598ac43ef12823deb84fa
+Size (gdb-8.2.1.tar.gz) = 37601384 bytes
+SHA1 (patch-Makefile.in) = 48f65798f96fdda2a35eb8b18a7cc2993023bcc7
+SHA1 (patch-sim_ppc_emul_netbsd.c) = 34fcb884c3c82e8eae6cd6f8c87ce42e9354c347
diff --git a/gdb-netbsd/options.mk b/gdb-netbsd/options.mk
new file mode 100644
index 0000000000..12f7c7ac0b
--- /dev/null
+++ b/gdb-netbsd/options.mk
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.5 2018/07/03 05:03:09 adam Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.gdb
+PKG_SUPPORTED_OPTIONS=	python
+PKG_SUGGESTED_OPTIONS=	python
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+=		--with-python=${PYTHONBIN}
+PYTHON_VERSIONS_INCOMPATIBLE=	36 37
+.include "../../lang/python/application.mk"
+.endif
diff --git a/gdb-netbsd/patches/patch-Makefile.in b/gdb-netbsd/patches/patch-Makefile.in
new file mode 100644
index 0000000000..88cfa27f1f
--- /dev/null
+++ b/gdb-netbsd/patches/patch-Makefile.in
@@ -0,0 +1,32 @@
+$NetBSD: patch-Makefile.in,v 1.2 2016/04/14 08:40:44 fhajny Exp $
+
+Do not install bfd and opcodes. Conflicts with devel/binutils.
+
+--- Makefile.in.orig	2016-02-24 09:57:08.000000000 +0000
++++ Makefile.in
+@@ -1596,7 +1596,6 @@ do-install-info:
+ 
+ .PHONY: install-info-host
+ 
+-install-info-host: maybe-install-info-bfd
+ install-info-host: maybe-install-info-opcodes
+ install-info-host: maybe-install-info-binutils
+ install-info-host: maybe-install-info-bison
+@@ -2482,8 +2481,6 @@ install:
+ 
+ .PHONY: install-host-nogcc
+ install-host-nogcc:  \
+-    maybe-install-bfd \
+-    maybe-install-opcodes \
+     maybe-install-binutils \
+     maybe-install-bison \
+     maybe-install-cgen \
+@@ -2530,8 +2527,6 @@ install-host-nogcc:  \
+ 
+ .PHONY: install-host
+ install-host:  \
+-    maybe-install-bfd \
+-    maybe-install-opcodes \
+     maybe-install-binutils \
+     maybe-install-bison \
+     maybe-install-cgen \
diff --git a/gdb-netbsd/patches/patch-sim_ppc_emul_netbsd.c b/gdb-netbsd/patches/patch-sim_ppc_emul_netbsd.c
new file mode 100644
index 0000000000..d2feed94f6
--- /dev/null
+++ b/gdb-netbsd/patches/patch-sim_ppc_emul_netbsd.c
@@ -0,0 +1,39 @@
+$NetBSD: patch-sim_ppc_emul_netbsd.c,v 1.1 2015/03/15 14:56:46 bsiegert Exp $
+
+time_t conversion compatibility, experimental.
+Please correct the naming, thank you.
+
+--- sim/ppc/emul_netbsd.c.orig	2014-06-11 16:34:42.000000000 +0000
++++ sim/ppc/emul_netbsd.c
+@@ -118,6 +118,7 @@ extern int errno;
+ 
+ #if WITH_NetBSD_HOST
+ #define SYS(X) ASSERT(call == (SYS_##X))
++#define SYSSYS(X) ASSERT(call == (SYS___##X50))
+ #else
+ #define SYS(X)
+ #endif
+@@ -737,7 +738,11 @@ do_gettimeofday(os_emul_data *emul,
+   if (WITH_TRACE && ppc_trace[trace_os_emul])
+     printf_filtered ("0x%lx, 0x%lx", (long)t_addr, (long)tz_addr);
+ 
++#if 0
+   SYS(gettimeofday);
++#else
++  SYS___gettimeofday50;
++#endif
+   emul_write_status(processor, status, err);
+   if (status == 0) {
+     if (t_addr != 0)
+@@ -767,7 +772,11 @@ do_getrusage(os_emul_data *emul,
+   if (WITH_TRACE && ppc_trace[trace_os_emul])
+     printf_filtered ("%d, 0x%lx", who, (long)rusage_addr);
+ 
++#if 0
+   SYS(getrusage);
++#else
++  SYS___getrusage50;
++#endif
+   emul_write_status(processor, status, err);
+   if (status == 0) {
+     if (rusage_addr != 0)


Home | Main Index | Thread Index | Old Index