* Makefile.in (init.c): Generate using the source, not munch. This
authorJim Kingdon <jkingdon@engr.sgi.com>
Fri, 22 Oct 1993 05:55:58 +0000 (05:55 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Fri, 22 Oct 1993 05:55:58 +0000 (05:55 +0000)
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.

22 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/alpha-tdep.c
gdb/convex-tdep.c
gdb/delta68-nat.c
gdb/dpx2-nat.c
gdb/h8500-tdep.c
gdb/hp300ux-nat.c
gdb/hppa-tdep.c
gdb/hppab-nat.c
gdb/i960-tdep.c
gdb/maint.c
gdb/osfsolib.c
gdb/procfs.c
gdb/remote-es.c
gdb/remote-udi.c
gdb/remote.c
gdb/ser-go32.c
gdb/serial.c
gdb/sh-tdep.c
gdb/ultra3-xdep.c
gdb/z8k-tdep.c

index 2851017f1a996c1090b861989dde06e6443ae76d..2302d30e94bb16ef0b32bcfce452a75dd230e082 100644 (file)
@@ -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)
index 01e177936ba682949f1090c8cef474c2c71d58fc..b4f3f5ed25987a0b808d49925e38a54f905882b6 100644 (file)
@@ -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]
index fb4eecf7c88b0ccdacb89e5e1165d04d67880309..adaec4b71679f729125a1a41d9d5675835418c4d 100644 (file)
@@ -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.  */
index dd4daeb9f35722bc1263a0ecc768d1807bb4a4fb..4fbf34bc57b557da2d8602c6003342b4784e91f2 100644 (file)
@@ -858,6 +858,7 @@ psw_info (arg)
     }
 }
 \f
+void
 _initialize_convex_dep ()
 {
   add_com ("alias", class_support, alias_command,
index d5d004973c542c0df914b3f1e619323b17a92f8d..ab5fa8053660bdff06b36a3f0bb80a6345a17862 100644 (file)
@@ -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];
 
index ee1ccb75503ea1d32838bb250a3b4b91882b1e44..c437c7596dbd1e200101d03de85393b17ebc8798 100644 (file)
@@ -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;
 
index 0ffb02b2e05e69ef568c47eb7978dd13df61b7d8..cda468ca25cbb5591b9836306635e74467661a26 100644 (file)
@@ -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,
index d5248fc5ee7f359140a41b2d28f2348a9046cc14..af852fc14e86bc617b5d34ba31a9956a9b0a3bba 100644 (file)
@@ -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);
index 08f9e4ed2e577f36509f516f1ba9ac48b680d546..92199edd8d99512ebbbbd59cff24f09820e0c507 100644 (file)
@@ -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 */
+}
index 5f3cdf724dc7a6d1d45d0af7971aa11a1d153d6d..a47474f966948b256453cc852973ea0e69595a46 100644 (file)
@@ -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);
index df9f04a615e8522f0f3a467dfd9b9e6d907ee371..728474bcf0075a4e8c1f5445f3a816ede59b849b 100644 (file)
@@ -636,6 +636,7 @@ print_fault( siggnal )
 
 /* Initialization stub */
 
+void
 _initialize_i960_tdep ()
 {
   check_host ();
index 7addd4e7eb2ccc11b2bb8b2dac7468f3d3cd2132..35da83f7abf7ec68a6e03d18436dc933d2e31579 100644 (file)
@@ -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 */
+}
index 4006f172f8bbf88b4908327a0752fb39c74b1212..bf272d1c0e190d12c31b1727edadc1324a07c989 100644 (file)
@@ -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
index 9a6937d15adad6a81d39ad319976403da68de972..e667c82b634d2a4f513eb98a12ceb990fbe10c63 100644 (file)
@@ -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 ()
 {
index 66a62dae3df81cb9184d8773812bd438a1556095..acff4e3aa5e9020e7799848a0a6514a4560ed008 100644 (file)
@@ -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 ()
 {
index 91fe86b7e7061f05a43580c9d96793a6d18c46bf..536d7434f96fb744098b6d0d2c02181e753bc8cc 100644 (file)
@@ -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);
 }
index 9bc32dac166bf260430e856c913717e0ed455bab..189977ddb9698e9c21aa8d7ff23a98236b758a44 100644 (file)
@@ -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
+}
index e77fd56320bbdf34824842cb0e5ded718ed2e6b2..68c43b00ffeb69cd9ecb9335dd851e2abf385870 100644 (file)
@@ -379,6 +379,7 @@ static struct serial_ops go32_ops =
   go32_setbaudrate,
 };
 
+void
 _initialize_ser_go32 ()
 {
   serial_add_interface (&go32_ops);
index 6913fd6e239893565bc94ebb10cdccd161021a81..70f4323a7d3f6bd0df8ffa7f3f3c34a1426e2bdf 100644 (file)
@@ -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 */
+}
index 5b89780ed27ddc634dbcf52f707ecc4411bf10c8..3b04d54fb4725c84d416786e7968eec0942d480e 100644 (file)
@@ -254,6 +254,7 @@ char *prog;
   return sim_load_standard (abfd); 
 }
 \f
+void
 _initialize_sh_tdep ()
 {
   extern int sim_memory_size;
index fb24657fed34fa187f107100f5eaad73cbab872a..ff566226050d28c2b1ab82531830b31fb17b51bc 100644 (file)
@@ -119,6 +119,7 @@ unsigned int sigmask;
 
 /* Initialization code for this module.  */
 
+void
 _initialize_ultra3 ()
 {
 #ifdef SYM1
index e6b5e8aff971d048b13fcc96427f8ad3504e4825..cf6060bc975aad00ffb2c0ae5c1bf211618583ad 100644 (file)
@@ -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,
This page took 0.048869 seconds and 4 git commands to generate.