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)
# 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
# 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 \
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
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]
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. */
}
}
\f
+void
_initialize_convex_dep ()
{
add_com ("alias", class_support, alias_command,
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];
CORE_ADDR kernel_u_addr;
void
-_initialize_kernel_u_addr ()
+_initialize_dpx2_nat ()
{
struct utsname uts;
parse_and_eval (expression);
}
+void
_initialize_h8500_tdep ()
{
add_prefix_cmd ("memory", no_class, set_memory,
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);
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 */
+}
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);
/* Initialization stub */
+void
_initialize_i960_tdep ()
{
check_host ();
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\
add_cmd ("objfiles", class_maintenance, maintenance_print_objfiles,
"Print dump of current object file definitions.",
&maintenanceprintlist);
-
-}
-
#endif /* MAINTENANCE_CMDS */
+}
static void
solib_map_sections PARAMS ((struct so_list *));
-void
-_initialize_solib PARAMS ((void));
-
/*
LOCAL FUNCTION
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 ()
{
OPS_MAGIC /* to_magic (always last) */
};
-/* _initialize_es1800 () */
-
void
_initialize_es1800 ()
{
OPS_MAGIC, /* Always the last thing */
};
-void _initialize_remote_udi()
+void
+_initialize_remote_udi ()
{
add_target (&udi_ops);
}
NULL, /* sections_end */
OPS_MAGIC /* to_magic */
};
+#endif /* Use remote. */
void
_initialize_remote ()
{
+#if !defined(DONT_USE_REMOTE)
add_target (&remote_ops);
-}
#endif
+}
go32_setbaudrate,
};
+void
_initialize_ser_go32 ()
{
serial_add_interface (&go32_ops);
}
}
}
+#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 */
+}
return sim_load_standard (abfd);
}
\f
+void
_initialize_sh_tdep ()
{
extern int sim_memory_size;
/* Initialization code for this module. */
+void
_initialize_ultra3 ()
{
#ifdef SYM1
help_list (setmemorylist, "set memory ", -1, stdout);
}
+void
_initialize_z8ktdep ()
{
add_prefix_cmd ("memory", no_class, set_memory,