Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb Build glue for x86_64. This is working gdb...
details: https://anonhg.NetBSD.org/src/rev/7c1ed03cef36
branches: trunk
changeset: 769902:7c1ed03cef36
user: christos <christos%NetBSD.org@localhost>
date: Mon Sep 26 03:02:44 2011 +0000
description:
Build glue for x86_64. This is working gdb for amd64 minus kernel stacktrace
support. It is disabled for now because it breaks user program traces.
diffstat:
external/gpl3/gdb/Makefile | 7 +
external/gpl3/gdb/Makefile.inc | 11 +
external/gpl3/gdb/bin/Makefile | 14 +
external/gpl3/gdb/bin/Makefile.inc | 1 +
external/gpl3/gdb/bin/gdb/Makefile | 83 +
external/gpl3/gdb/bin/gdbtui/Makefile | 77 +
external/gpl3/gdb/lib/Makefile | 12 +
external/gpl3/gdb/lib/Makefile.inc | 1 +
external/gpl3/gdb/lib/libbfd/Makefile | 59 +
external/gpl3/gdb/lib/libbfd/arch/x86_64/bfd-in3.h | 5976 ++++++++++++++
external/gpl3/gdb/lib/libbfd/arch/x86_64/bfd.h | 5976 ++++++++++++++
external/gpl3/gdb/lib/libbfd/arch/x86_64/bfd_stdint.h | 51 +
external/gpl3/gdb/lib/libbfd/arch/x86_64/bfdver.h | 8 +
external/gpl3/gdb/lib/libbfd/arch/x86_64/config.h | 356 +
external/gpl3/gdb/lib/libbfd/arch/x86_64/defs.mk | 9 +
external/gpl3/gdb/lib/libbfd/arch/x86_64/targmatch.h | 2622 ++++++
external/gpl3/gdb/lib/libbfd/lib_bfd.c | 4 +
external/gpl3/gdb/lib/libdecnumber/Makefile | 23 +
external/gpl3/gdb/lib/libdecnumber/arch/x86_64/config.h | 243 +
external/gpl3/gdb/lib/libdecnumber/arch/x86_64/defs.mk | 5 +
external/gpl3/gdb/lib/libdecnumber/arch/x86_64/gstdint.h | 51 +
external/gpl3/gdb/lib/libgdb/Makefile | 56 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/config.h | 986 ++
external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk | 7 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/gstdint.h | 51 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c | 254 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/observer.h | 246 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/observer.inc | 1034 ++
external/gpl3/gdb/lib/libgdb/arch/x86_64/version.c | 8 +
external/gpl3/gdb/lib/libgdb/arch/x86_64/xml-builtin.c | 534 +
external/gpl3/gdb/lib/libiberty/Makefile | 25 +
external/gpl3/gdb/lib/libiberty/arch/x86_64/config.h | 495 +
external/gpl3/gdb/lib/libiberty/arch/x86_64/defs.mk | 8 +
external/gpl3/gdb/lib/libopcodes/Makefile | 24 +
external/gpl3/gdb/lib/libopcodes/arch/x86_64/config.h | 114 +
external/gpl3/gdb/lib/libopcodes/arch/x86_64/defs.mk | 7 +
external/gpl3/gdb/lib/libreadline/Makefile | 23 +
external/gpl3/gdb/lib/libreadline/arch/x86_64/config.h | 243 +
external/gpl3/gdb/lib/libreadline/arch/x86_64/defs.mk | 6 +
39 files changed, 19710 insertions(+), 0 deletions(-)
diffs (truncated from 19866 to 300 lines):
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include "Makefile.inc"
+
+SUBDIR= lib .WAIT bin
+
+.include <bsd.subdir.mk>
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/Makefile.inc Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile.inc,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+USE_LIBEDIT=no
+USE_TUI=yes
+WARNS?= 0
+
+CWARNFLAGS.clang+= -Wno-unused-value -Wno-conversion \
+ -Wno-switch-enum -Wno-parentheses -Wno-comment \
+ -Wno-tautological-compare -Wno-format-extra-args
+
+DIST= ${NETBSDSRCDIR}/external/gpl3/gdb/dist
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/bin/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include "../Makefile.inc"
+
+#SUBDIR+= sim .WAIT
+
+SUBDIR+= gdb
+.if ${USE_TUI} == yes
+SUBDIR+= gdbtui
+.endif
+
+#SUBDIR+= gdbserver
+
+.include <bsd.subdir.mk>
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/bin/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/bin/Makefile.inc Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,1 @@
+.include "../Makefile.inc"
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/bin/gdb/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/bin/gdb/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,83 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include "../Makefile.inc"
+
+GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${MACHINE_ARCH}
+.include "${GDBARCHDIR}/defs.mk"
+
+PROG= gdb
+
+SRCS= gdb.c
+CPPFLAGS+= -I${.CURDIR} \
+ -I${GDBARCHDIR} \
+ -I${DIST}/gdb \
+ -I${DIST}/gdb/config \
+ -I${DIST}/include/opcode \
+ -I${DIST} \
+ -I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \
+ -I${DIST}/bfd \
+ -I${DIST}/include \
+ ${GCPPFLAGS:M-D*}
+
+#TEXINFO= gdb.texinfo gdbint.texinfo stabs.texinfo
+#INFOFLAGS= -I${DIST}/gdb/doc -I${DIST}/gdb/mi \
+# -I${DIST}/readline/doc -I${.CURDIR}/..
+
+.include "../../Makefile.inc"
+.include <bsd.info.mk>
+
+LIBOPCODESDIR!= cd ${.CURDIR}/../../lib/libopcodes && ${PRINTOBJDIR}
+LIBBFDDIR!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR}
+LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
+LIBGDBDIR!= cd ${.CURDIR}/../../lib/libgdb && ${PRINTOBJDIR}
+LIBDECNUMBERDIR!= cd ${.CURDIR}/../../lib/libdecnumber && ${PRINTOBJDIR}
+
+.if ${USE_LIBEDIT} == yes
+LIBRL=-ledit
+LIBRLDP=${LIBEDIT}
+.else
+LIBRLDIR!= cd ${.CURDIR}/../../lib/libreadline && ${PRINTOBJDIR}
+LIBRL= -L${LIBRLDIR} -lreadline
+LIBRLDP= ${LIBRLDIR}/libreadline.a
+.endif
+
+LDADD+= -L${LIBGDBDIR} -lgdb
+DPADD+= ${LIBGDBDIR}/libgdb.a
+
+# Simulator support
+.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
+ ${MACHINE_ARCH} == powerpc64
+SIMOBJ!= cd ${.CURDIR}/../sim/ppc && ${PRINTOBJDIR}
+LDADD+= -L${SIMOBJ} -lsim
+DPADD+= ${SIMOBJ}/libsim.a
+.elif ${MACHINE_CPU} == xxmips
+SIMOBJ!= cd ${.CURDIR}/../sim/mips && ${PRINTOBJDIR}
+LDADD+= -L${SIMOBJ} -lsim
+DPADD+= ${SIMOBJ}/libsim.a
+.endif
+
+LDADD+= -L${LIBOPCODESDIR} -lopcodes \
+ -L${LIBBFDDIR} -lbfd \
+ -L${LIBDECNUMBERDIR} -ldecnumber \
+ ${LIBRL} \
+ -lterminfo \
+ -L${LIBIBERTYDIR} -liberty
+
+DPADD+= ${LIBOPCODESDIR}/libopcodes.a \
+ ${LIBBFDDIR}/libbfd.a \
+ ${LIBDECNUMBERDIR}/libdecnumber.a \
+ ${LIBRLDP} \
+ ${LIBTERMINFO} \
+ ${LIBIBERTYDIR}/libiberty.a
+
+LDADD+= -lz -lcurses -lintl -lm -lkvm
+DPADD+= ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
+
+.if ${SRCS:Mnbsd-thread.c} != ""
+LDADD+= -lpthread_dbg
+.endif
+
+.include <bsd.prog.mk>
+
+.PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
+ ${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${MACHINE_ARCH}
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/bin/gdbtui/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/bin/gdbtui/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,77 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include "../Makefile.inc"
+
+GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${MACHINE_ARCH}
+.include "${GDBARCHDIR}/defs.mk"
+
+PROG= gdbtui
+
+SRCS= tui-main.c
+CPPFLAGS+= -I${.CURDIR} \
+ -I${GDBARCHDIR} \
+ -I${DIST}/gdb \
+ -I${DIST}/gdb/config \
+ -I${DIST}/include/opcode \
+ -I${DIST} \
+ -I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \
+ -I${DIST}/bfd \
+ -I${DIST}/include \
+ ${GCPPFLAGS:M-D*}
+
+NOMAN= # defined
+
+.include <bsd.prog.mk>
+
+
+LIBOPCODESDIR!= cd ${.CURDIR}/../../lib/libopcodes && ${PRINTOBJDIR}
+LIBBFDDIR!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR}
+LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
+LIBGDBDIR!= cd ${.CURDIR}/../../lib/libgdb && ${PRINTOBJDIR}
+LIBDECNUMBERDIR!= cd ${.CURDIR}/../../lib/libdecnumber && ${PRINTOBJDIR}
+
+.if ${USE_LIBEDIT} == yes
+LIBEDIT=-ledit
+.else
+LIBRLDIR!= cd ${.CURDIR}/../../lib/libreadline && ${PRINTOBJDIR}
+LIBRL= -L${LIBRLDIR} -lreadline
+LIBRLDP= ${LIBRLDIR}/libreadline.a
+.endif
+
+LDADD+= -L${LIBGDBDIR} -lgdb
+DPADD+= ${LIBGDBDIR}/libgdb.a
+
+# Simulator support
+.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
+ ${MACHINE_ARCH} == powerpc64
+SIMOBJ!= cd ${.CURDIR}/../sim/ppc && ${PRINTOBJDIR}
+LDADD+= -L${SIMOBJ} -lsim
+DPADD+= ${SIMOBJ}/libsim.a
+.elif ${MACHINE_CPU} == xxmips
+SIMOBJ!= cd ${.CURDIR}/../sim/mips && ${PRINTOBJDIR}
+LDADD+= -L${SIMOBJ} -lsim
+DPADD+= ${SIMOBJ}/libsim.a
+.endif
+
+LDADD+= -L${LIBOPCODESDIR} -lopcodes \
+ -L${LIBBFDDIR} -lbfd \
+ -L${LIBDECNUMBERDIR} -ldecnumber \
+ ${LIBRL} \
+ -lterminfo \
+ -L${LIBIBERTYDIR} -liberty
+
+DPADD+= ${LIBOPCODESDIR}/libopcodes.a \
+ ${LIBBFDDIR}/libbfd.a \
+ ${LIBRLDP} \
+ ${LIBTERMINFO} \
+ ${LIBIBERTYDIR}/libiberty.a
+
+LDADD+= -lz -lcurses -lintl -lm -lkvm
+DPADD+= ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
+
+.if ${SRCS:Mnbsd-thread.c} != ""
+LDADD+= -lpthread_dbg
+.endif
+
+.PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
+ ${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${MACHINE_ARCH}
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/lib/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/lib/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include "../Makefile.inc"
+
+#SUBDIR+= libsim .WAIT
+
+SUBDIR= libbfd libiberty libopcodes libgdb libdecnumber
+.if ${USE_LIBEDIT} == no || ${USE_TUI} == yes
+SUBDIR+= libreadline
+.endif
+
+.include <bsd.subdir.mk>
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/lib/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/lib/Makefile.inc Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,1 @@
+.include "../Makefile.inc"
diff -r 2b316b4c7c10 -r 7c1ed03cef36 external/gpl3/gdb/lib/libbfd/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/lib/libbfd/Makefile Mon Sep 26 03:02:44 2011 +0000
@@ -0,0 +1,59 @@
+# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
+
+.include <bsd.own.mk>
+.include "../Makefile.inc"
+
+LIBISPRIVATE= yes
+
+LIB= bfd
+
+.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
+
+GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
+CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH} -I${DIST}/include -I. \
+ -I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
+ -DDEBUGDIR=\"${DESTDIR}/usr/libdata/debug\"
+
+GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
+ ${G_libbfd_la_DEPENDENCIES:M*.lo}
+SRCS= ${GSRCS:.lo=.c}
+
+DPSRCS+= elf32-target.h elf64-target.h targmatch.h \
+ elf32-ia64.c elf64-ia64.c
+CLEANFILES+= elf32-target.h elf64-target.h targmatch.h \
+ elf32-ia64.c elf64-ia64.c
+
+.PATH: ${DIST}/bfd
+
+.include <bsd.lib.mk>
+
+${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
+targets.o targets.pico: targmatch.h Makefile
+
+targmatch.h: config.bfd targmatch.sed
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@
+
+elf32-target.h: elfxx-target.h
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -e s/NN/32/g < $> > $@
+
+elf64-target.h: elfxx-target.h
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -e s/NN/64/g < $> > $@
+
+elf32-ia64.c: elfxx-ia64.c
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -e s/NN/32/g < $> > $@
+
+elf64-ia64.c: elfxx-ia64.c
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -e s/NN/64/g < $> > $@
+
+#peigen.c: peXXigen.c
+# ${_MKTARGET_CREATE}
+# ${TOOL_SED} -e s/XX/pe/g < $> > $@
+
+pex64igen.c: peXXigen.c
+ ${_MKTARGET_CREATE}
Home |
Main Index |
Thread Index |
Old Index