diff options
author | pst <pst@FreeBSD.org> | 1997-05-01 00:18:51 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1997-05-01 00:18:51 +0000 |
commit | efe87a3276cbd8b742ec49825a5219b5ff034d4d (patch) | |
tree | 33f1192e3b6a4d3f2ad8900eda3602791baf75c7 /gnu/usr.bin/gdb | |
parent | e5a31f09a5c14dde31f01c06c7ca2c8ccb35f39b (diff) | |
download | FreeBSD-src-efe87a3276cbd8b742ec49825a5219b5ff034d4d.zip FreeBSD-src-efe87a3276cbd8b742ec49825a5219b5ff034d4d.tar.gz |
Merge from 2.2: auto-gen init.c and add ser-tcp.c
Diffstat (limited to 'gnu/usr.bin/gdb')
-rw-r--r-- | gnu/usr.bin/gdb/gdb/Makefile | 58 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/gdb/init.c | 59 |
2 files changed, 53 insertions, 64 deletions
diff --git a/gnu/usr.bin/gdb/gdb/Makefile b/gnu/usr.bin/gdb/gdb/Makefile index a9fb47c..9889d70 100644 --- a/gnu/usr.bin/gdb/gdb/Makefile +++ b/gnu/usr.bin/gdb/gdb/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.22 1997/04/27 21:36:48 gj Exp $ +# $Id: Makefile,v 1.23 1997/04/30 15:23:02 bde Exp $ PROG = gdb @@ -7,7 +7,7 @@ GDBDIR= ${.CURDIR}/../../../../contrib/gdb .PATH: ${GDBDIR}/opcodes BINDIR= /usr/bin -SRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \ +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 \ corelow.c cp-valprint.c \ @@ -15,20 +15,23 @@ SRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \ elfread.c environ.c eval.c exec.c expprint.c \ findvar.c fork-child.c freebsd-nat.c gdbtypes.c \ i386-tdep.c infcmd.c inflow.c infptrace.c \ - infrun.c inftarg.c init.c kcorelow.c language.c \ + infrun.c inftarg.c kcorelow.c language.c \ m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \ mem-break.c minsyms.c objfiles.c parse.c \ printcmd.c remote.c remote-utils.c solib.c source.c \ stabsread.c stack.c symfile.c symmisc.c \ symtab.c target.c thread.c top.c \ typeprint.c utils.c valarith.c valops.c \ - valprint.c values.c version.c serial.c ser-unix.c mdebugread.c\ + valprint.c values.c version.c \ + serial.c ser-unix.c ser-tcp.c mdebugread.c \ c-exp.c f-exp.c m2-exp.c i387-tdep.c \ kvm-fbsd.c bcache.c \ corefile.c ch-exp.c f-lang.c scm-exp.c scm-lang.c \ scm-valprint.c f-typeprint.c f-valprint.c nlmread.c \ callback.c -SRCS+= i386-dis.c dis-buf.c disassemble.c +XSRCS+= i386-dis.c dis-buf.c disassemble.c +SRCS= ${.OBJDIR}/init.c ${XSRCS} +CLEANFILES+= init.c CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd # use phkmalloc @@ -70,3 +73,48 @@ DPADD+= ${.CURDIR}/../libiberty/libiberty.a .endif .include <bsd.prog.mk> + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (remote-udi.o -> _initialize_remote_udi, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +${.OBJDIR}/init.c: ${XSRCS} + @echo Making init.c + @rm -f init.c-tmp + @echo '/* Do not modify this file. */' >init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo 'void initialize_all_files () {' >>init.c-tmp + @for i in ${XSRCS} ; do \ + filename=`echo $$i | sed \ + -e '/^Onindy.c/d' \ + -e '/^nindy.c/d' \ + -e '/ttyflush.c/d' \ + -e '/xdr_ld.c/d' \ + -e '/xdr_ptrace.c/d' \ + -e '/xdr_rdb.c/d' \ + -e '/udr.c/d' \ + -e '/udip2soc.c/d' \ + -e '/udi2go32.c/d' \ + -e '/version.c/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].c/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.c/d'` ; \ + case $$filename in \ + "") ;; \ + *) fn=${.CURDIR}/$$filename ; \ + test -f $$fn || fn=${GDBDIR}/gdb/$$filename ; \ + test -f $$fn || fn=${GDBDIR}/opcodes/$$filename ; \ + sed <$$fn >>init.c-tmp -n \ + -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; ;; \ + esac ; \ + @done + @echo '}' >>init.c-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c diff --git a/gnu/usr.bin/gdb/gdb/init.c b/gnu/usr.bin/gdb/gdb/init.c deleted file mode 100644 index d3d83f4..0000000 --- a/gnu/usr.bin/gdb/gdb/init.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Do not modify this file. */ -/* It is created automatically by the Makefile. */ -void initialize_all_files () { - {extern void _initialize_blockframe (); _initialize_blockframe ();} - {extern void _initialize_breakpoint (); _initialize_breakpoint ();} - {extern void _initialize_stack (); _initialize_stack ();} - {extern void _initialize_thread (); _initialize_thread ();} - {extern void _initialize_source (); _initialize_source ();} - {extern void _initialize_values (); _initialize_values ();} - {extern void _initialize_valops (); _initialize_valops ();} - {extern void _initialize_valarith (); _initialize_valarith ();} - {extern void _initialize_valprint (); _initialize_valprint ();} - {extern void _initialize_printcmd (); _initialize_printcmd ();} - {extern void _initialize_symtab (); _initialize_symtab ();} - {extern void _initialize_symfile (); _initialize_symfile ();} - {extern void _initialize_symmisc (); _initialize_symmisc ();} - {extern void _initialize_infcmd (); _initialize_infcmd ();} - {extern void _initialize_infrun (); _initialize_infrun ();} - {extern void _initialize_command (); _initialize_command ();} - {extern void _initialize_gdbtypes (); _initialize_gdbtypes ();} - {extern void _initialize_copying (); _initialize_copying ();} - {extern void _initialize_i386_tdep (); _initialize_i386_tdep ();} - {extern void _initialize_solib (); _initialize_solib ();} - {extern void _initialize_ser_hardwire (); _initialize_ser_hardwire ();} - {extern void _initialize_kernel_u_addr (); _initialize_kernel_u_addr ();} - {extern void _initialize_infptrace (); _initialize_infptrace ();} - {extern void _initialize_inftarg (); _initialize_inftarg ();} - {extern void _initialize_corelow (); _initialize_corelow ();} - {extern void _initialize_core_aout (); _initialize_core_aout ();} - {extern void _initialize_kcorelow (); _initialize_kcorelow ();} - {extern void _initialize_remote (); _initialize_remote ();} - {extern void _initialize_dcache (); _initialize_dcache ();} - {extern void _initialize_sr_support (); _initialize_sr_support ();} - {extern void _initialize_parse (); _initialize_parse ();} - {extern void _initialize_language (); _initialize_language ();} - {extern void _initialize_buildsym (); _initialize_buildsym ();} - {extern void _initialize_exec (); _initialize_exec ();} - {extern void _initialize_maint_cmds (); _initialize_maint_cmds ();} - {extern void _initialize_demangler (); _initialize_demangler ();} - {extern void _initialize_dbxread (); _initialize_dbxread ();} - {extern void _initialize_coffread (); _initialize_coffread ();} - {extern void _initialize_elfread (); _initialize_elfread ();} - {extern void _initialize_stabsread (); _initialize_stabsread ();} - {extern void _initialize_core (); _initialize_core ();} - {extern void _initialize_c_language (); _initialize_c_language ();} - {extern void _initialize_chill_language (); _initialize_chill_language ();} - {extern void _initialize_f_language (); _initialize_f_language ();} - {extern void _initialize_m2_language (); _initialize_m2_language ();} - {extern void _initialize_scheme_language (); _initialize_scheme_language ();} - {extern void _initialize_complaints (); _initialize_complaints ();} - {extern void _initialize_typeprint (); _initialize_typeprint ();} - {extern void _initialize_cp_valprint (); _initialize_cp_valprint ();} - {extern void _initialize_f_valprint (); _initialize_f_valprint ();} - {extern void _initialize_nlmread (); _initialize_nlmread ();} - {extern void _initialize_serial (); _initialize_serial ();} - {extern void _initialize_mdebugread (); _initialize_mdebugread ();} - {extern void _initialize_annotate (); _initialize_annotate ();} - {extern void _initialize_inflow (); _initialize_inflow ();} -} |