Module Name:    src
Committed By:   christos
Date:           Wed Sep 23 23:37:00 UTC 2020

Added Files:
        src/external/gpl3/gdb/bin/gdbserver: Makefile
        src/external/gpl3/gdb/bin/gdbserver/arch/x86_64: config.h

Log Message:
Add build glue (does not link)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gdb/bin/gdbserver/Makefile
cvs rdiff -u -r0 -r1.1 \
    src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h

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

Added files:

Index: src/external/gpl3/gdb/bin/gdbserver/Makefile
diff -u /dev/null src/external/gpl3/gdb/bin/gdbserver/Makefile:1.1
--- /dev/null	Wed Sep 23 19:37:00 2020
+++ src/external/gpl3/gdb/bin/gdbserver/Makefile	Wed Sep 23 19:36:59 2020
@@ -0,0 +1,61 @@
+#	$NetBSD: Makefile,v 1.1 2020/09/23 23:36:59 christos Exp $
+
+NOCTF=
+NOMAN=
+.include <bsd.own.mk>
+.include "../Makefile.inc"
+
+PROG=		gdbserver
+
+SERVER_SRCS=		server.cc
+NETBSD_SRCS=		netbsd-low.cc fork-child.cc fork-inferior.c netbsd-nat.c
+ARCH_SRCS=		netbsd-${MACHINE}-low.cc ${MACHINE}.c
+SRCS=		${SERVER_SRCS} ${NETBSD_SRCS} ${ARCH_SRCS}
+CPPFLAGS+=	-I${.CURDIR} \
+		-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \
+		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \
+		-I${DIST}/gdb \
+		-I${DIST}/gdbserver \
+		-I${DIST}/gdbsupport \
+		-I${DIST}/gdb/regformats \
+		-I${DIST}/gdb/config \
+		-I${DIST}/gnulib/import \
+		-I${DIST} \
+		-I${.CURDIR}/../../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
+		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH} \
+		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
+		-I${DIST}/include \
+		${GCPPFLAGS:M-D*}
+
+.include "../../Makefile.inc"
+.include <bsd.info.mk>
+
+LIBGDB!=	     cd ${.CURDIR}/../../lib/libgdb	   && ${PRINTOBJDIR}
+LIBBFD!=	     cd ${.CURDIR}/../../lib/libbfd	   && ${PRINTOBJDIR}
+LIBGNULIBDIR!=	     cd ${.CURDIR}/../../lib/libgnulib	   && ${PRINTOBJDIR}
+LIBGDBSUPPORTDIR!=   cd ${.CURDIR}/../../lib/libgdbsupport && ${PRINTOBJDIR}
+LIBIBERTYDIR!=	     cd ${.CURDIR}/../../lib/libiberty	   && ${PRINTOBJDIR}
+
+LDADD+= -L${LIBGDB} -lgdb \
+	-L${LIBGDBSUPPORTDIR} -lgdbsupport \
+	-L${LIBGNULIBDIR} -lgnulib \
+	-L${LIBBFD} -lbfd \
+	-L${LIBIBERTYDIR} -liberty \
+	-lintl -lz
+
+DPADD+=	${LIBGDB}/libgdb.a \
+	${LIBGDBSUPPORTDIR}/libgdbsupport.a \
+	${LIBGNULIBDIR}/libgnulib.a \
+	${LIBBFD}/libbfd.a \
+	${LIBIBERTYDIR}/libiberty.a \
+	${LIBINTL} ${LIBZ}
+
+.include <bsd.prog.mk>
+
+# Force c++
+CWARNFLAGS.clang+=	-Wno-deprecated
+HOST_CC:=		${HOST_CXX}
+CC:=			${CXX}
+CFLAGS:=		${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector -pthread
+
+.PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch

Index: src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h
diff -u /dev/null src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h:1.1
--- /dev/null	Wed Sep 23 19:37:00 2020
+++ src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h	Wed Sep 23 19:36:59 2020
@@ -0,0 +1,513 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
+
+/* config.h.  Generated from config.in by configure.  */
+/* config.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if std::thread works. */
+#define CXX_STD_THREAD 1
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#define ENABLE_NLS 1
+
+/* Define if self-testing features should be enabled */
+#define GDB_SELF_TEST 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* define if the compiler supports basic C++11 syntax */
+#define HAVE_CXX11 1
+
+/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
+   you don't. */
+#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
+
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL_ASPRINTF 1
+
+/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if
+   you don't. */
+#define HAVE_DECL_BASENAME 0
+
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#define HAVE_DECL_FFS 1
+
+/* Define to 1 if you have the declaration of `perror', and to 0 if you don't.
+   */
+#define HAVE_DECL_PERROR 1
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL_SNPRINTF 1
+
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+   */
+#define HAVE_DECL_STRSTR 1
+
+/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
+   */
+#define HAVE_DECL_STRTOL 1
+
+/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRTOLL 1
+
+/* Define to 1 if you have the declaration of `strtoul', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRTOUL 1
+
+/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRTOULL 1
+
+/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRVERSCMP 0
+
+/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL_VASPRINTF 1
+
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL_VSNPRINTF 1
+
+/* Define to 1 if you have the `dladdr' function. */
+/* #undef HAVE_DLADDR */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if the system has the type `Elf32_auxv_t'. */
+/* #undef HAVE_ELF32_AUXV_T */
+
+/* Define to 1 if the system has the type `Elf64_auxv_t'. */
+/* #undef HAVE_ELF64_AUXV_T */
+
+/* Define if <sys/procfs.h> has elf_fpregset_t. */
+/* #undef HAVE_ELF_FPREGSET_T */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fdwalk' function. */
+/* #undef HAVE_FDWALK */
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Define if <sys/procfs.h> has fpregset_t. */
+/* #undef HAVE_FPREGSET_T */
+
+/* Define to 1 if you have the `getauxval' function. */
+/* #undef HAVE_GETAUXVAL */
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+#define HAVE_GETRLIMIT 1
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define if <sys/procfs.h> has gregset_t. */
+/* #undef HAVE_GREGSET_T */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if your system has the kinfo_getfile function. */
+/* #undef HAVE_KINFO_GETFILE */
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#define HAVE_LANGINFO_CODESET 1
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+/* #undef HAVE_LIBDL */
+
+/* Define if you have the ipt library. */
+/* #undef HAVE_LIBIPT */
+
+/* Define if the target supports branch tracing. */
+/* #undef HAVE_LINUX_BTRACE */
+
+/* Define to 1 if you have the <linux/elf.h> header file. */
+/* #undef HAVE_LINUX_ELF_H */
+
+/* Define to 1 if you have the <linux/perf_event.h> header file. */
+/* #undef HAVE_LINUX_PERF_EVENT_H */
+
+/* Define if the target supports register sets. */
+/* #undef HAVE_LINUX_REGSETS */
+
+/* Define if the target supports PTRACE_PEEKUSR for register access. */
+/* #undef HAVE_LINUX_USRREGS */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if the system has the type `long long'. */
+#define HAVE_LONG_LONG 1
+
+/* Define if <thread_db.h> has lwpid_t. */
+/* #undef HAVE_LWPID_T */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#define HAVE_NETINET_TCP_H 1
+
+/* Define if you support the personality syscall. */
+/* #undef HAVE_PERSONALITY */
+
+/* Define to 1 if you have the `pipe' function. */
+#define HAVE_PIPE 1
+
+/* Define to 1 if you have the `pipe2' function. */
+#define HAVE_PIPE2 1
+
+/* Define to 1 if you have the `poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* Define to 1 if you have the `pread' function. */
+#define HAVE_PREAD 1
+
+/* Define to 1 if you have the `pread64' function. */
+/* #undef HAVE_PREAD64 */
+
+/* Define if <sys/procfs.h> has prfpregset_t. */
+/* #undef HAVE_PRFPREGSET_T */
+
+/* Define if <sys/procfs.h> has prgregset32_t. */
+/* #undef HAVE_PRGREGSET32_T */
+
+/* Define if <sys/procfs.h> has prgregset_t. */
+/* #undef HAVE_PRGREGSET_T */
+
+/* Define to 1 if you have the <proc_service.h> header file. */
+/* #undef HAVE_PROC_SERVICE_H */
+
+/* Define if <thread_db.h> has psaddr_t. */
+/* #undef HAVE_PSADDR_T */
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#define HAVE_PTHREAD_PRIO_INHERIT 1
+
+/* Define to 1 if you have the `pthread_setname_np' function. */
+#define HAVE_PTHREAD_SETNAME_NP 1
+
+/* Define to 1 if you have the `pthread_sigmask' function. */
+#define HAVE_PTHREAD_SIGMASK 1
+
+/* Define to 1 if you have the `ptrace64' function. */
+/* #undef HAVE_PTRACE64 */
+
+/* Define if the target supports PTRACE_GETFPXREGS for extended register
+   access. */
+/* #undef HAVE_PTRACE_GETFPXREGS */
+
+/* Define if the target supports PTRACE_GETREGS for register access. */
+/* #undef HAVE_PTRACE_GETREGS */
+
+/* Define to 1 if you have the <ptrace.h> header file. */
+/* #undef HAVE_PTRACE_H */
+
+/* Define to 1 if you have the `pt_insn_event' function. */
+/* #undef HAVE_PT_INSN_EVENT */
+
+/* Define to 1 if you have the `pwrite' function. */
+#define HAVE_PWRITE 1
+
+/* Define to 1 if you have the `sbrk' function. */
+#define HAVE_SBRK 1
+
+/* Define to 1 if you have the `setns' function. */
+/* #undef HAVE_SETNS */
+
+/* Define to 1 if you have the `setpgid' function. */
+#define HAVE_SETPGID 1
+
+/* Define to 1 if you have the `setpgrp' function. */
+#define HAVE_SETPGRP 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#define HAVE_SIGALTSTACK 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#define HAVE_SIGPROCMASK 1
+
+/* Define if sigsetjmp is available. */
+#define HAVE_SIGSETJMP 1
+
+/* Define to 1 if you have the `socketpair' function. */
+#define HAVE_SOCKETPAIR 1
+
+/* Define to 1 if the system has the type `socklen_t'. */
+#define HAVE_SOCKLEN_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if `enabled' is a member of `struct pt_insn'. */
+/* #undef HAVE_STRUCT_PT_INSN_ENABLED */
+
+/* Define to 1 if `resynced' is a member of `struct pt_insn'. */
+/* #undef HAVE_STRUCT_PT_INSN_RESYNCED */
+
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+
+/* Define to 1 if `st_blocks' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+
+/* Define to 1 if the target supports __sync_*_compare_and_swap */
+#define HAVE_SYNC_BUILTINS 1
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#define HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the <sys/procfs.h> header file. */
+/* #undef HAVE_SYS_PROCFS_H */
+
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#define HAVE_SYS_PTRACE_H 1
+
+/* Define to 1 if you have the <sys/reg.h> header file. */
+/* #undef HAVE_SYS_REG_H */
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#define HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define if TD_VERSION is available. */
+/* #undef HAVE_TD_VERSION */
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the <thread_db.h> header file. */
+/* #undef HAVE_THREAD_DB_H */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if UST is available */
+/* #undef HAVE_UST */
+
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H */
+
+/* Define to 1 if you have the <wait.h> header file. */
+/* #undef HAVE_WAIT_H */
+
+/* Define to 1 if `fork' works. */
+#define HAVE_WORKING_FORK 1
+
+/* Define to 1 if `vfork' works. */
+#define HAVE_WORKING_VFORK 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+/* #undef HAVE_WS2TCPIP_H */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Additional package description */
+#define PKGVERSION "(GDB) "
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define to the type of arg 1 for ptrace. */
+#define PTRACE_TYPE_ARG1 int
+
+/* Define to the type of arg 3 for ptrace. */
+#define PTRACE_TYPE_ARG3 void *
+
+/* Define to the type of arg 4 for ptrace. */
+#define PTRACE_TYPE_ARG4 int
+
+/* Define to the type of arg 5 for ptrace. */
+/* #undef PTRACE_TYPE_ARG5 */
+
+/* Define as the return type of ptrace. */
+#define PTRACE_TYPE_RET int
+
+/* Bug reporting address */
+#define REPORT_BUGS_TO "<http://www.gnu.org/software/gdb/bugs/>"
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if we should use libthread_db directly. */
+/* #undef USE_LIBTHREAD_DB_DIRECTLY */
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define if we should use libthread_db. */
+/* #undef USE_THREAD_DB */
+
+/* Define if we should use the Windows API, instead of the POSIX API. On
+   Windows, we use the Windows API when building for MinGW, but the POSIX API
+   when building for Cygwin. */
+/* #undef USE_WIN32API */
+
+/* Define if an XML target description is available. */
+/* #undef USE_XML */
+
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Use structured /proc on Solaris. */
+#define _STRUCTURED_PROC 1
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define as `fork' if `vfork' does not work. */
+/* #undef vfork */

Reply via email to