aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-22 05:55:58 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-22 05:55:58 +0000
commit976bb0be038b72449683a428903658347d581eaa (patch)
tree529d1c62dbd968e77a969d1a7e8eca9cf7acef63
parent06b24c9e49dfa67288c315ec205776c29c086358 (diff)
downloadgdb-976bb0be038b72449683a428903658347d581eaa.zip
gdb-976bb0be038b72449683a428903658347d581eaa.tar.gz
gdb-976bb0be038b72449683a428903658347d581eaa.tar.bz2
* Makefile.in (init.c): Generate using the source, not munch. This
cleans up all kinds of hassles (which nm to use in munch, etc). The new formatting conventions (mostly already followed) are that the name of the _initialize_* routines must start in column zero, and must not be inside #if. * munch: Removed. * Makefile.in: Remove references to munch. * serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c, alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c, procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c, i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c, z8k-tdep.c: Make sure the above conventions are followed. Make sure they are all declared as returning void. Clean up miscellaneous comments and such.
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/Makefile.in39
-rw-r--r--gdb/alpha-tdep.c3
-rw-r--r--gdb/convex-tdep.c1
-rw-r--r--gdb/delta68-nat.c3
-rw-r--r--gdb/dpx2-nat.c2
-rw-r--r--gdb/h8500-tdep.c1
-rw-r--r--gdb/hp300ux-nat.c3
-rw-r--r--gdb/hppa-tdep.c5
-rw-r--r--gdb/hppab-nat.c3
-rw-r--r--gdb/i960-tdep.c1
-rw-r--r--gdb/maint.c23
-rw-r--r--gdb/osfsolib.c3
-rw-r--r--gdb/procfs.c17
-rw-r--r--gdb/remote-es.c2
-rw-r--r--gdb/remote-udi.c3
-rw-r--r--gdb/remote.c4
-rw-r--r--gdb/ser-go32.c1
-rw-r--r--gdb/serial.c4
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/ultra3-xdep.c1
-rw-r--r--gdb/z8k-tdep.c1
22 files changed, 72 insertions, 64 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2851017..2302d30 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,20 @@
Thu Oct 21 12:23:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * Makefile.in (init.c): Generate using the source, not munch. This
+ cleans up all kinds of hassles (which nm to use in munch, etc). The
+ new formatting conventions (mostly already followed) are that
+ the name of the _initialize_* routines must start in column zero,
+ and must not be inside #if.
+ * munch: Removed.
+ * Makefile.in: Remove references to munch.
+ * serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
+ alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
+ procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
+ i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
+ z8k-tdep.c: Make sure the above conventions are followed. Make
+ sure they are all declared as returning void. Clean up
+ miscellaneous comments and such.
+
* sh-tdep.c (sim_load): Add function.
Thu Oct 21 15:58:48 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 01e1779..b4f3f5e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -55,11 +55,6 @@ RANLIB = ranlib
# This can be overridden in the host Makefile fragment file.
TERMCAP = -ltermcap
-# System V: If you compile gdb with a compiler which uses the coff
-# encapsulation feature (this is a function of the compiler used, NOT
-# of the m-?.h file selected by config.gdb), you must make sure that
-# the GNU nm is the one that is used by munch.
-
# If you are compiling with GCC, make sure that either 1) You have the
# fixed include files where GCC can reach them, or 2) You use the
# -traditional flag. Otherwise the ioctl calls in inflow.c
@@ -314,7 +309,7 @@ SFILES = blockframe.c breakpoint.c buildsym.c c-exp.y c-lang.c \
# Files that are not source code, but need to go into
# gdb-$(VERSION).tar.Z.
-NONSRC = Makefile.in munch configure.in ChangeLog ChangeLog-9091 \
+NONSRC = Makefile.in configure.in ChangeLog ChangeLog-9091 \
ChangeLog-92 ChangeLog-3.x gdb.1 refcard.ps README TODO TAGS NEWS \
Projects .gdbinit COPYING $(YYFILES) copying.c copying.awk \
saber.suppress standalone.c stuff.c kdb-start.c gcc.patch \
@@ -483,9 +478,33 @@ uninstall: force
rm -f $(bindir)/gdb $(man1dir)/gdb.1
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
-init.c: munch $(OBS) $(TSOBS)
- $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) > init.c-new
- mv init.c-new init.c
+# 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.).
+init.c: $(OBS) $(TSOBS)
+ @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 $(OBS) $(TSOBS); do \
+ filename=`echo $$i | sed \
+ -e '/^Onindy.o/d' \
+ -e '/^nindy.o/d' \
+ -e '/ttyflush.o/d' \
+ -e '/xdr_ld.o/d' \
+ -e '/xdr_ptrace.o/d' \
+ -e '/xdr_rdb.o/d' \
+ -e '/udr.o/d' \
+ -e '/udip2soc.o/d' \
+ -e '/version.o/d' \
+ -e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
+ -e 's/\.o/.c/'` ; \
+ sed <$(srcdir)/$$filename >>init.c-tmp -n \
+ -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; \
+ done
+ @echo '}' >>init.c-tmp
+ @mv init.c-tmp init.c
.PRECIOUS: init.c
@@ -654,7 +673,7 @@ make-proto-testsuite.dir: force_update
clean:
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
- rm -f *.o $(ADD_FILES) *~
+ rm -f *.o $(ADD_FILES) *~ init.c-tmp
rm -f init.c version.c
rm -f gdb core make.log
rm -f gdb[0-9]
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index fb4eecf..adaec4b 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -51,9 +51,6 @@ alpha_in_lenient_prologue PARAMS ((CORE_ADDR, CORE_ADDR));
static void
reinit_frame_cache_sfunc PARAMS ((char *, int, struct cmd_list_element *));
-void
-_initialize_alpha_tdep PARAMS ((void));
-
/* Heuristic_proc_start may hunt through the text section for a long
time across a 2400 baud serial line. Allows the user to limit this
search. */
diff --git a/gdb/convex-tdep.c b/gdb/convex-tdep.c
index dd4daeb..4fbf34b 100644
--- a/gdb/convex-tdep.c
+++ b/gdb/convex-tdep.c
@@ -858,6 +858,7 @@ psw_info (arg)
}
}
+void
_initialize_convex_dep ()
{
add_com ("alias", class_support, alias_command,
diff --git a/gdb/delta68-nat.c b/gdb/delta68-nat.c
index d5d0049..ab5fa80 100644
--- a/gdb/delta68-nat.c
+++ b/gdb/delta68-nat.c
@@ -62,7 +62,8 @@ Internal error: invalid register number %d in REGISTER_U_ADDR\n",
CORE_ADDR kernel_u_addr;
/* Read the value of the u area from the kernel. */
-void _initialize_kernel_u_addr ()
+void
+_initialize_delta68_nat ()
{
stuct nlist nl[2];
diff --git a/gdb/dpx2-nat.c b/gdb/dpx2-nat.c
index ee1ccb7..c437c75 100644
--- a/gdb/dpx2-nat.c
+++ b/gdb/dpx2-nat.c
@@ -72,7 +72,7 @@ dpx2_register_u_addr (blockend, regnum)
CORE_ADDR kernel_u_addr;
void
-_initialize_kernel_u_addr ()
+_initialize_dpx2_nat ()
{
struct utsname uts;
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 0ffb02b..cda468c 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -764,6 +764,7 @@ h8500_set_trapped_internalvar (var, newval, bitpos, bitsize, offset)
parse_and_eval (expression);
}
+void
_initialize_h8500_tdep ()
{
add_prefix_cmd ("memory", no_class, set_memory,
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
index d5248fc..af852fc 100644
--- a/gdb/hp300ux-nat.c
+++ b/gdb/hp300ux-nat.c
@@ -53,7 +53,8 @@ struct hpnlist {
static struct hpnlist nl[] = {{ "_u", -1, }, { (char *) 0, }};
/* read the value of the u area from the hp-ux kernel */
-void _initialize_kernel_u_addr ()
+void
+_initialize_hp300ux_nat ()
{
#ifndef HPUX_VERSION_5
nlist ("/hp-ux", nl);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 08f9e4e..92199ed 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1218,13 +1218,14 @@ unwind_command (exp, from_tty)
printf ("%08x\n%08X\n%08X\n%08X\n", xxx.foo[0], xxx.foo[1], xxx.foo[2],
xxx.foo[3]);
}
+#endif /* MAINTENANCE_CMDS */
void
_initialize_hppa_tdep ()
{
+#ifdef MAINTENANCE_CMDS
add_cmd ("unwind", class_maintenance, unwind_command,
"Print unwind table entry at given address.",
&maintenanceprintlist);
-}
-
#endif /* MAINTENANCE_CMDS */
+}
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index 5f3cdf7..a47474f 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -135,7 +135,8 @@ struct hpnlist {
static struct hpnlist nl[] = {{ "_u", -1, }, { (char *) 0, }};
/* read the value of the u area from the hp-ux kernel */
-void _initialize_kernel_u_addr ()
+void
+_initialize_kernel_u_addr ()
{
struct user u;
nlist ("/hp-ux", &nl);
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index df9f04a..728474b 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -636,6 +636,7 @@ print_fault( siggnal )
/* Initialization stub */
+void
_initialize_i960_tdep ()
{
check_host ();
diff --git a/gdb/maint.c b/gdb/maint.c
index 7addd4e..35da83f 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -217,27 +217,12 @@ maintenance_print_command (arg, from_tty)
help_list (maintenanceprintlist, "maintenance print ", -1, stdout);
}
-/*
-
-GLOBAL FUNCTION
-
- _initialize_maint_cmds -- initialize the process file system stuff
-
-SYNOPSIS
-
- void _initialize_maint_cmds (void)
-
-DESCRIPTION
-
- Do required initializations during gdb startup for using the
- /proc file system interface.
-
-*/
-
+#endif /* MAINTENANCE_CMDS */
void
_initialize_maint_cmds ()
{
+#if MAINTENANCE_CMDS /* Entire file goes away if not including maint cmds */
add_prefix_cmd ("maintenance", class_maintenance, maintenance_command,
"Commands for use by GDB maintainers.\n\
Includes commands to dump specific internal GDB structures in\n\
@@ -301,7 +286,5 @@ If a SOURCE file is specified, dump only that file's partial symbols.",
add_cmd ("objfiles", class_maintenance, maintenance_print_objfiles,
"Print dump of current object file definitions.",
&maintenanceprintlist);
-
-}
-
#endif /* MAINTENANCE_CMDS */
+}
diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c
index 4006f17..bf272d1 100644
--- a/gdb/osfsolib.c
+++ b/gdb/osfsolib.c
@@ -130,9 +130,6 @@ xfer_link_map_member PARAMS ((struct so_list *, struct link_map *));
static void
solib_map_sections PARAMS ((struct so_list *));
-void
-_initialize_solib PARAMS ((void));
-
/*
LOCAL FUNCTION
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 9a6937d..e667c82 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3537,23 +3537,6 @@ struct target_ops procfs_ops = {
OPS_MAGIC /* to_magic */
};
-/*
-
-GLOBAL FUNCTION
-
- _initialize_procfs -- initialize the process file system stuff
-
-SYNOPSIS
-
- void _initialize_procfs (void)
-
-DESCRIPTION
-
- Do required initializations during gdb startup for using the
- /proc file system interface.
-
-*/
-
void
_initialize_procfs ()
{
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index 66a62da..acff4e3 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -2250,8 +2250,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
OPS_MAGIC /* to_magic (always last) */
};
-/* _initialize_es1800 () */
-
void
_initialize_es1800 ()
{
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index 91fe86b..536d743 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -1589,7 +1589,8 @@ Arguments are\n\
OPS_MAGIC, /* Always the last thing */
};
-void _initialize_remote_udi()
+void
+_initialize_remote_udi ()
{
add_target (&udi_ops);
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 9bc32da..189977d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1259,10 +1259,12 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", /* to_doc */
NULL, /* sections_end */
OPS_MAGIC /* to_magic */
};
+#endif /* Use remote. */
void
_initialize_remote ()
{
+#if !defined(DONT_USE_REMOTE)
add_target (&remote_ops);
-}
#endif
+}
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index e77fd56..68c43b0 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -379,6 +379,7 @@ static struct serial_ops go32_ops =
go32_setbaudrate,
};
+void
_initialize_ser_go32 ()
{
serial_add_interface (&go32_ops);
diff --git a/gdb/serial.c b/gdb/serial.c
index 6913fd6..70f4323 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -250,12 +250,14 @@ connect_command (args, fromtty)
}
}
}
+#endif /* 0 */
void
_initialize_serial ()
{
+#if 0
add_com ("connect", class_obscure, connect_command,
"Connect the terminal directly up to the command monitor.\n\
Use <CR>~. or <CR>~^D to break out.");
-}
#endif /* 0 */
+}
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 5b89780..3b04d54 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -254,6 +254,7 @@ char *prog;
return sim_load_standard (abfd);
}
+void
_initialize_sh_tdep ()
{
extern int sim_memory_size;
diff --git a/gdb/ultra3-xdep.c b/gdb/ultra3-xdep.c
index fb24657..ff56622 100644
--- a/gdb/ultra3-xdep.c
+++ b/gdb/ultra3-xdep.c
@@ -119,6 +119,7 @@ unsigned int sigmask;
/* Initialization code for this module. */
+void
_initialize_ultra3 ()
{
#ifdef SYM1
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index e6b5e8a..cf6060b 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -461,6 +461,7 @@ set_memory (args, from_tty)
help_list (setmemorylist, "set memory ", -1, stdout);
}
+void
_initialize_z8ktdep ()
{
add_prefix_cmd ("memory", no_class, set_memory,