* 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.
This commit is contained in:
Jim Kingdon 1993-10-22 05:55:58 +00:00
parent 06b24c9e49
commit 976bb0be03
22 changed files with 72 additions and 64 deletions

View 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)

View 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]

View 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. */

View File

@ -858,6 +858,7 @@ psw_info (arg)
}
}
void
_initialize_convex_dep ()
{
add_com ("alias", class_support, alias_command,

View 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];

View 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;

View 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,

View 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);

View 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 */
}

View 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);

View File

@ -636,6 +636,7 @@ print_fault( siggnal )
/* Initialization stub */
void
_initialize_i960_tdep ()
{
check_host ();

View 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 */
}

View 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

View 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 ()
{

View 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 ()
{

View 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);
}

View 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
}

View File

@ -379,6 +379,7 @@ static struct serial_ops go32_ops =
go32_setbaudrate,
};
void
_initialize_ser_go32 ()
{
serial_add_interface (&go32_ops);

View 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 */
}

View File

@ -254,6 +254,7 @@ char *prog;
return sim_load_standard (abfd);
}
void
_initialize_sh_tdep ()
{
extern int sim_memory_size;

View File

@ -119,6 +119,7 @@ unsigned int sigmask;
/* Initialization code for this module. */
void
_initialize_ultra3 ()
{
#ifdef SYM1

View 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,