summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-04-30 08:03:50 +0000
committerdfr <dfr@FreeBSD.org>1998-04-30 08:03:50 +0000
commit9adf2e878f5d098466fa5d876ff62362e02fd9db (patch)
tree12caf146856e18a1e003f6251d1dff0204a67d27 /gnu
parent008b6ec3138fe90adb228cee424f11dcfda42e36 (diff)
downloadFreeBSD-src-9adf2e878f5d098466fa5d876ff62362e02fd9db.zip
FreeBSD-src-9adf2e878f5d098466fa5d876ff62362e02fd9db.tar.gz
Add support for ELF shared libraries. Also use bfd from the binutils in that
case rather than gdb's own copy.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile33
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/nm.h7
-rw-r--r--gnu/usr.bin/gdb/gdb/Makefile33
-rw-r--r--gnu/usr.bin/gdb/gdb/nm.h7
4 files changed, 74 insertions, 6 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile
index b75e304..8937114 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile
+++ b/gnu/usr.bin/binutils/gdb/Makefile
@@ -1,12 +1,21 @@
-# $Id: Makefile,v 1.30 1998/03/07 08:54:42 bde Exp $
+# $Id: Makefile,v 1.31 1998/03/19 15:21:19 bde Exp $
PROG = gdb
GDBDIR= ${.CURDIR}/../../../../contrib/gdb
+.if ${BINFORMAT} == elf
+BFDDIR= ${.CURDIR}/../../binutils/libbfd/${MACHINE_ARCH}
+.else
+BFDDIR= ${.CURDIR}/../bfd
+.endif
.PATH: ${GDBDIR}/gdb
.PATH: ${GDBDIR}/opcodes
-BINDIR= /usr/bin
+.if ${BINFORMAT} == elf
+CFLAGS+= -DFREEBSD_ELF
+.endif
+
+BINDIR?= /usr/bin
XSRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \
c-typeprint.c c-valprint.c ch-lang.c ch-typeprint.c \
ch-valprint.c coffread.c command.c complaints.c copying.c \
@@ -32,7 +41,7 @@ XSRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \
XSRCS+= i386-dis.c dis-buf.c disassemble.c
SRCS= init.c ${XSRCS}
-CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd
+CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I${BFDDIR}
# use phkmalloc
CFLAGS+= -DNO_MMALLOC
# uncomment the next line if you want to debug gdb
@@ -40,6 +49,22 @@ CFLAGS+= -DNO_MMALLOC
CLEANFILES+= c-exp.c f-exp.c m2-exp.c init.c y.tab.h init.c-tmp
+.if ${BINFORMAT} == 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
@@ -52,6 +77,8 @@ LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
.endif
+.endif # BINFORMAT
+
DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP}
LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap
DPADD+= ${LIBIBERTY}
diff --git a/gnu/usr.bin/binutils/gdb/i386/nm.h b/gnu/usr.bin/binutils/gdb/i386/nm.h
index 1edc1ce..84ec01e 100644
--- a/gnu/usr.bin/binutils/gdb/i386/nm.h
+++ b/gnu/usr.bin/binutils/gdb/i386/nm.h
@@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Be shared lib aware */
#include "solib.h"
+#ifdef FREEBSD_ELF
+#define SVR4_SHARED_LIBS
+#endif
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
@@ -42,6 +45,8 @@ i386_register_u_addr PARAMS ((int, int));
#define PTRACE_ARG3_TYPE char*
+#ifndef FREEBSD_ELF
+
/* make structure definitions match up with those expected in solib.c */
#define link_object sod
#define lo_name sod_name
@@ -95,6 +100,8 @@ i386_register_u_addr PARAMS ((int, int));
#define ld_un d_un
#define ld_2 d_sdt
+#endif
+
/* Return sizeof user struct to callers in less machine dependent routines */
#define KERNEL_U_SIZE kernel_u_size()
diff --git a/gnu/usr.bin/gdb/gdb/Makefile b/gnu/usr.bin/gdb/gdb/Makefile
index b75e304..8937114 100644
--- a/gnu/usr.bin/gdb/gdb/Makefile
+++ b/gnu/usr.bin/gdb/gdb/Makefile
@@ -1,12 +1,21 @@
-# $Id: Makefile,v 1.30 1998/03/07 08:54:42 bde Exp $
+# $Id: Makefile,v 1.31 1998/03/19 15:21:19 bde Exp $
PROG = gdb
GDBDIR= ${.CURDIR}/../../../../contrib/gdb
+.if ${BINFORMAT} == elf
+BFDDIR= ${.CURDIR}/../../binutils/libbfd/${MACHINE_ARCH}
+.else
+BFDDIR= ${.CURDIR}/../bfd
+.endif
.PATH: ${GDBDIR}/gdb
.PATH: ${GDBDIR}/opcodes
-BINDIR= /usr/bin
+.if ${BINFORMAT} == elf
+CFLAGS+= -DFREEBSD_ELF
+.endif
+
+BINDIR?= /usr/bin
XSRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \
c-typeprint.c c-valprint.c ch-lang.c ch-typeprint.c \
ch-valprint.c coffread.c command.c complaints.c copying.c \
@@ -32,7 +41,7 @@ XSRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \
XSRCS+= i386-dis.c dis-buf.c disassemble.c
SRCS= init.c ${XSRCS}
-CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd
+CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I${BFDDIR}
# use phkmalloc
CFLAGS+= -DNO_MMALLOC
# uncomment the next line if you want to debug gdb
@@ -40,6 +49,22 @@ CFLAGS+= -DNO_MMALLOC
CLEANFILES+= c-exp.c f-exp.c m2-exp.c init.c y.tab.h init.c-tmp
+.if ${BINFORMAT} == 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
@@ -52,6 +77,8 @@ LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
.endif
+.endif # BINFORMAT
+
DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP}
LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap
DPADD+= ${LIBIBERTY}
diff --git a/gnu/usr.bin/gdb/gdb/nm.h b/gnu/usr.bin/gdb/gdb/nm.h
index 1edc1ce..84ec01e 100644
--- a/gnu/usr.bin/gdb/gdb/nm.h
+++ b/gnu/usr.bin/gdb/gdb/nm.h
@@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Be shared lib aware */
#include "solib.h"
+#ifdef FREEBSD_ELF
+#define SVR4_SHARED_LIBS
+#endif
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
@@ -42,6 +45,8 @@ i386_register_u_addr PARAMS ((int, int));
#define PTRACE_ARG3_TYPE char*
+#ifndef FREEBSD_ELF
+
/* make structure definitions match up with those expected in solib.c */
#define link_object sod
#define lo_name sod_name
@@ -95,6 +100,8 @@ i386_register_u_addr PARAMS ((int, int));
#define ld_un d_un
#define ld_2 d_sdt
+#endif
+
/* Return sizeof user struct to callers in less machine dependent routines */
#define KERNEL_U_SIZE kernel_u_size()
OpenPOWER on IntegriCloud