2003-06-08 Andrew Cagney <cagney@redhat.com>

* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
	from GCC's acinclude.m4.
	* configure.in: Check for getopt's delcaration.
	* aclocal.m4, config.in, configure: Re-generate.
	* main.c (error_init): Delete declaration.
	* defs.h (error_init): Declare.
	* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
	(rs6000_convert_from_func_ptr_addr): Make static.
	(_initialize_rs6000_tdep): Add declaration.
	* cli/cli-cmds.c (dont_repeat): Delete declaration.
	(show_commands, set_verbose, show_history): Delete declaration.
	* top.h (set_verbose): Add declaration.
	(show_history, set_history, show_commands): Add declaration.
	(do_restore_instream_cleanup): Add declaration.
	* objc-lang.c (specialcmp): Make static.
	(print_object_command): Make static.
	(find_objc_msgsend): Make static.
	(find_objc_msgcall_submethod_helper): Make static.
	(find_objc_msgcall_submethod): Make static.
	(_initialize_objc_language): Add declaration.
	(find_implementation_from_class): Make static.
	(find_implementation): Make static.
	* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
	* objc-lang.h (lookup_struct_typedef): Add declaration.
	* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
	* cli/cli-script.c (clear_hook_in_cleanup): Make static.
	(do_restore_user_call_depth): Make static.
	(do_restore_instream_cleanup): Delete declaration.
	(dont_repeat): Delete declaration.
	* cli/cli-decode.c (add_abbrev_cmd): Delete function.
	* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
	* reggroups.c (_initialize_reggroup): Add declaration.
	* cp-support.c (_initialize_cp_support): Add declaration.
	* cp-abi.c (_initialize_cp_abi): Add declaration.
	* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
	* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
	(_initialize_gnu_v3_abi): Add declaration.
	* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
	(_initialize_gnu_v2_abi): Add declaration.
	* frame-base.c (_initialize_frame_base): Add declaration.
	* doublest.c (floatformat_from_length): Make static.
	* frame-unwind.c (_initialize_frame_unwind): Add declaration.
	* frame.c (create_sentinel_frame): Make static.
	(_initialize_frame): Add declaration.
	* top.c (do_catch_errors): Make static.
	(gdb_rl_operate_and_get_next_completion): Make static.
	* typeprint.c: Include "typeprint.h".
	* sentinel-frame.c (sentinel_frame_prev_register): Make static.
	(sentinel_frame_this_id): Make static.
	* p-valprint.c (_initialize_pascal_valprint): Add declaration.
	* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
	* dwarf2-frame.c (dwarf2_frame_cache): Make static.
	* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
	* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
	* maint.c (maintenance_print_architecture): Make static.
	* signals/signals.c (_initialize_signals): Add declaration.
	* std-regs.c (_initialize_frame_reg): Add declaration.
	* jv-exp.y (push_variable): ISO C definition.
	(push_qualified_expression_name): Ditto.
	* memattr.c (_initialize_mem): Add declaration.
	* remote.c (remote_check_watch_resources): Make static.
	(remote_stopped_by_watchpoint): Make static.
	(remote_stopped_data_address): Make static.
	* d10v-tdep.c (nr_dmap_regs): Make static.
	(a0_regnum): Make static.
	(d10v_frame_unwind_cache): Make static.
	(d10v_frame_p): Make static.
	* osabi.c (show_osabi): Make static.
	(_initialize_gdb_osabi): Add extern declaration.
	* gdbtypes.c (make_qualified_type): Make static.
	(safe_parse_type): Make static.
	* macrocmd.c (_initialize_macrocmd): Add extern declaration.
	* macrotab.c (macro_bcache_free): Make static.
	* interps.c (interp_set_quiet): Make static.
	(interpreter_exec_cmd): Make static.
	* stack.h (select_frame_command): New file.
	* stack.c: Include "stack.h".
	(select_frame_command_wrapper): Delete function.
	(select_frame_command): Make global.
	* infcall.c: Include "infcall.h".
	* linespec.c: Include "linespec.h".
	* symfile.c (sections_overlap): Make static.
	* cp-support.h (cp_initialize_namespace): ISO C declaration.
	* charset.c (_initialize_charset): Add missing prototype.
	* regcache.c (init_legacy_regcache_descr): Make static.
	(do_regcache_xfree): Make static.
	(regcache_xfer_part): Make static.
	(_initialize_regcache): Add missing prototype.
	* breakpoint.c (parse_breakpoint_sals): Make static.
	(breakpoint_sals_to_pc): Make static.
	* interps.h (clear_interpreter_hooks): ISO C declaration.
	* Makefile.in (stack_h): Define.
	(stack.o, typeprint.o, mi-main.o): Update dependencies.
	(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.

Index: mi/ChangeLog
2003-06-08  Andrew Cagney  <cagney@redhat.com>

	* mi-parse.c (_initialize_mi_parse): Delete function.
	* mi-main.c: Include "mi-main.h".
	* mi-interp.c (_initialize_mi_interp): Add declaration.
	* mi-cmd-stack.c: Include "stack.h".
	(select_frame_command_wrapper): Delete extern declaration.
	(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
	with select_frame_command.
This commit is contained in:
Andrew Cagney 2003-06-08 18:27:14 +00:00
parent a0f267c701
commit b9362cc7a8
64 changed files with 693 additions and 390 deletions

View file

@ -1,3 +1,100 @@
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
2003-06-08 Andrew Cagney <cagney@redhat.com> 2003-06-08 Andrew Cagney <cagney@redhat.com>
* Makefile.in (d10v-tdep.o): Update dependencies. * Makefile.in (d10v-tdep.o): Update dependencies.

View file

@ -726,6 +726,7 @@ source_h = source.h
sparcnbsd_tdep_h = sparcnbsd-tdep.h sparcnbsd_tdep_h = sparcnbsd-tdep.h
srec_h = srec.h srec_h = srec.h
stabsread_h = stabsread.h stabsread_h = stabsread.h
stack_h = stack.h
symfile_h = symfile.h symfile_h = symfile.h
symtab_h = symtab.h symtab_h = symtab.h
target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
@ -1900,8 +1901,8 @@ language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
$(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \ $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
$(cp_abi_h) $(source_h) $(parser_defs_h) $(block_h) $(objc_lang_h) $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(objc_lang_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \ linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
$(cli_decode_h) $(gdb_string_h) $(cli_decode_h) $(gdb_string_h)
@ -2263,8 +2264,8 @@ stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
$(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h) $(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h)
stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
$(gdbcore_h) $(target_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
$(annotate_h) $(ui_out_h) $(source_h) $(block_h) $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h)
standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
$(inferior_h) $(gdb_wait_h) $(inferior_h) $(gdb_wait_h)
std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \ std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
@ -2316,7 +2317,8 @@ tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h) trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h)
typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
$(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h) $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
$(gdb_string_h)
ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(ui_out_h) $(gdb_assert_h) $(ui_out_h) $(gdb_assert_h)
@ -2592,7 +2594,7 @@ mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(stack_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)

View file

@ -943,3 +943,56 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
]) ])
dnl See whether we need a declaration for a function.
dnl The result is highly dependent on the INCLUDES passed in, so make sure
dnl to use a different cache variable name in this macro if it is invoked
dnl in a different context somewhere else.
dnl gcc_AC_CHECK_DECL(SYMBOL,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
AC_DEFUN(gcc_AC_CHECK_DECL,
[AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(gcc_cv_have_decl_$1,
[AC_TRY_COMPILE([$4],
[#ifndef $1
char *(*pfn) = (char *(*)) $1 ;
#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
fi
])dnl
dnl Check multiple functions to see whether each needs a declaration.
dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
dnl gcc_AC_CHECK_DECLS(SYMBOLS,
dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
AC_DEFUN(gcc_AC_CHECK_DECLS,
[for ac_func in $1
do
changequote(, )dnl
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
gcc_AC_CHECK_DECL($ac_func,
[AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
[AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
dnl It is possible that the include files passed in here are local headers
dnl which supply a backup declaration for the relevant prototype based on
dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
dnl will always return success. E.g. see libiberty.h's handling of
dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
dnl 1 so that any local headers used do not provide their own prototype
dnl during this test.
#undef $ac_tr_decl
#define $ac_tr_decl 1
$4
)
done
dnl Automatically generate config.h entries via autoheader.
if test x = y ; then
patsubst(translit([$1], [a-z], [A-Z]), [\w+],
[AC_DEFINE([HAVE_DECL_\&], 1,
[Define to 1 if we found this declaration otherwise define to 0.])])dnl
fi
])

53
gdb/aclocal.m4 vendored
View file

@ -951,6 +951,59 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
]) ])
dnl See whether we need a declaration for a function.
dnl The result is highly dependent on the INCLUDES passed in, so make sure
dnl to use a different cache variable name in this macro if it is invoked
dnl in a different context somewhere else.
dnl gcc_AC_CHECK_DECL(SYMBOL,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
AC_DEFUN(gcc_AC_CHECK_DECL,
[AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(gcc_cv_have_decl_$1,
[AC_TRY_COMPILE([$4],
[#ifndef $1
char *(*pfn) = (char *(*)) $1 ;
#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
fi
])dnl
dnl Check multiple functions to see whether each needs a declaration.
dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
dnl gcc_AC_CHECK_DECLS(SYMBOLS,
dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
AC_DEFUN(gcc_AC_CHECK_DECLS,
[for ac_func in $1
do
changequote(, )dnl
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
gcc_AC_CHECK_DECL($ac_func,
[AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
[AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
dnl It is possible that the include files passed in here are local headers
dnl which supply a backup declaration for the relevant prototype based on
dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
dnl will always return success. E.g. see libiberty.h's handling of
dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
dnl 1 so that any local headers used do not provide their own prototype
dnl during this test.
#undef $ac_tr_decl
#define $ac_tr_decl 1
$4
)
done
dnl Automatically generate config.h entries via autoheader.
if test x = y ; then
patsubst(translit([$1], [a-z], [A-Z]), [\w+],
[AC_DEFINE([HAVE_DECL_\&], 1,
[Define to 1 if we found this declaration otherwise define to 0.])])dnl
fi
])
# Add --enable-maintainer-mode option to configure. # Add --enable-maintainer-mode option to configure.
# From Jim Meyering # From Jim Meyering

View file

@ -4607,7 +4607,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
addresses found. ADDR_STRING contains a vector of (canonical) addresses found. ADDR_STRING contains a vector of (canonical)
address strings. ARG points to the end of the SAL. */ address strings. ARG points to the end of the SAL. */
void static void
parse_breakpoint_sals (char **address, parse_breakpoint_sals (char **address,
struct symtabs_and_lines *sals, struct symtabs_and_lines *sals,
char ***addr_string) char ***addr_string)
@ -4674,7 +4674,7 @@ parse_breakpoint_sals (char **address,
/* Convert each SAL into a real PC. Verify that the PC can be /* Convert each SAL into a real PC. Verify that the PC can be
inserted as a breakpoint. If it can't throw an error. */ inserted as a breakpoint. If it can't throw an error. */
void static void
breakpoint_sals_to_pc (struct symtabs_and_lines *sals, breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
char *address) char *address)
{ {

View file

@ -1163,6 +1163,7 @@ target_char_to_host (int target_char, int *host_char)
/* The charset.c module initialization function. */ /* The charset.c module initialization function. */
extern initialize_file_ftype _initialize_charset; /* -Wmissing-prototype */
void void
_initialize_charset (void) _initialize_charset (void)

View file

@ -48,18 +48,6 @@
#define GDBINIT_FILENAME ".gdbinit" #define GDBINIT_FILENAME ".gdbinit"
#endif #endif
/* From gdb/top.c */
extern void dont_repeat (void);
extern void set_verbose (char *, int, struct cmd_list_element *);
extern void show_history (char *, int);
extern void set_history (char *, int);
extern void show_commands (char *, int);
/* Prototypes for local command functions */ /* Prototypes for local command functions */
static void complete_command (char *, int); static void complete_command (char *, int);

View file

@ -183,20 +183,6 @@ add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
return c; return c;
} }
/* Same as above, except that the abbrev_flag is set. */
/* Note: Doesn't seem to be used anywhere currently. */
struct cmd_list_element *
add_abbrev_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
register struct cmd_list_element *c
= add_cmd (name, class, fun, doc, list);
c->abbrev_flag = 1;
return c;
}
/* Deprecates a command CMD. /* Deprecates a command CMD.
REPLACEMENT is the name of the command which should be used in place REPLACEMENT is the name of the command which should be used in place
of this command, or NULL if no such command exists. of this command, or NULL if no such command exists.

View file

@ -698,6 +698,8 @@ binary_append_command (char *cmd, int from_tty)
help_list (binary_append_cmdlist, "append binary ", -1, gdb_stdout); help_list (binary_append_cmdlist, "append binary ", -1, gdb_stdout);
} }
extern initialize_file_ftype _initialize_cli_dump; /* -Wmissing-prototypes */
void void
_initialize_cli_dump (void) _initialize_cli_dump (void)
{ {

View file

@ -118,6 +118,8 @@ safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
/* standard gdb initialization hook */ /* standard gdb initialization hook */
extern initialize_file_ftype _initialize_cli_interp; /* -Wmissing-prototypes */
void void
_initialize_cli_interp (void) _initialize_cli_interp (void)
{ {

View file

@ -34,12 +34,6 @@
#include "cli/cli-decode.h" #include "cli/cli-decode.h"
#include "cli/cli-script.h" #include "cli/cli-script.h"
/* From gdb/top.c */
extern void dont_repeat (void);
extern void do_restore_instream_cleanup (void *stream);
/* Prototypes for local functions */ /* Prototypes for local functions */
static struct cleanup * static struct cleanup *
@ -216,7 +210,7 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
/* Handle pre-post hooks. */ /* Handle pre-post hooks. */
void static void
clear_hook_in_cleanup (void *data) clear_hook_in_cleanup (void *data)
{ {
struct cmd_list_element *c = data; struct cmd_list_element *c = data;
@ -248,7 +242,7 @@ execute_cmd_post_hook (struct cmd_list_element *c)
} }
/* Execute the command in CMD. */ /* Execute the command in CMD. */
void static void
do_restore_user_call_depth (void * call_depth) do_restore_user_call_depth (void * call_depth)
{ {
int * depth = call_depth; int * depth = call_depth;

View file

@ -441,6 +441,9 @@
Solaris 2.[78] when using GCC. */ Solaris 2.[78] when using GCC. */
#undef _MSE_INT_H #undef _MSE_INT_H
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETOPT
/* Define if sigsetjmp is available. */ /* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP #undef HAVE_SIGSETJMP

583
gdb/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -357,6 +357,12 @@ AC_CHECK_HEADERS(curses.h ncurses.h term.h)
# unconditionally, so what's the point in checking these? # unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h) AC_CHECK_HEADERS(ctype.h time.h)
# ------------------------- #
# Checks for declarations. #
# ------------------------- #
gcc_AC_CHECK_DECLS(getopt)
# ------------------ # # ------------------ #
# Checks for types. # # Checks for types. #
# ------------------ # # ------------------ #

View file

@ -234,6 +234,8 @@ show_cp_abi_cmd (char *args, int from_tty)
ui_out_text (uiout, ").\n"); ui_out_text (uiout, ").\n");
} }
extern initialize_file_ftype _initialize_cp_abi; /* -Wmissing-prototypes */
void void
_initialize_cp_abi (void) _initialize_cp_abi (void)
{ {

View file

@ -349,6 +349,8 @@ first_component_command (char *arg, int from_tty)
printf_unfiltered ("%s\n", prefix); printf_unfiltered ("%s\n", prefix);
} }
extern initialize_file_ftype _initialize_cp_support; /* -Wmissing-prototypes */
void void
_initialize_cp_support (void) _initialize_cp_support (void)
{ {

View file

@ -71,7 +71,7 @@ extern void cp_add_using_directive (const char *name,
unsigned int outer_length, unsigned int outer_length,
unsigned int inner_length); unsigned int inner_length);
extern void cp_initialize_namespace (); extern void cp_initialize_namespace (void);
extern void cp_finalize_namespace (struct block *static_block, extern void cp_finalize_namespace (struct block *static_block,
struct obstack *obstack); struct obstack *obstack);

View file

@ -86,13 +86,13 @@ enum
RET1_REGNUM = R0_REGNUM, RET1_REGNUM = R0_REGNUM,
}; };
int static int
nr_dmap_regs (struct gdbarch *gdbarch) nr_dmap_regs (struct gdbarch *gdbarch)
{ {
return gdbarch_tdep (gdbarch)->nr_dmap_regs; return gdbarch_tdep (gdbarch)->nr_dmap_regs;
} }
int static int
a0_regnum (struct gdbarch *gdbarch) a0_regnum (struct gdbarch *gdbarch)
{ {
return gdbarch_tdep (gdbarch)->a0_regnum; return gdbarch_tdep (gdbarch)->a0_regnum;
@ -661,7 +661,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
in the stack frame. sp is even more special: the address we return in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */ for it IS the sp for the next frame. */
struct d10v_unwind_cache * static struct d10v_unwind_cache *
d10v_frame_unwind_cache (struct frame_info *next_frame, d10v_frame_unwind_cache (struct frame_info *next_frame,
void **this_prologue_cache) void **this_prologue_cache)
{ {
@ -1448,7 +1448,7 @@ static const struct frame_unwind d10v_frame_unwind = {
d10v_frame_prev_register d10v_frame_prev_register
}; };
const struct frame_unwind * static const struct frame_unwind *
d10v_frame_p (CORE_ADDR pc) d10v_frame_p (CORE_ADDR pc)
{ {
return &d10v_frame_unwind; return &d10v_frame_unwind;

View file

@ -881,6 +881,9 @@ extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (pri
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN; extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
/* Initialize the error buffer. */
extern void error_init (void);
/* Returns a freshly allocate buffer containing the last error /* Returns a freshly allocate buffer containing the last error
message. */ message. */
extern char *error_last_message (void); extern char *error_last_message (void);

View file

@ -625,7 +625,7 @@ floatformat_from_doublest (const struct floatformat *fmt,
target-dependent code, the format of floating-point types is known, target-dependent code, the format of floating-point types is known,
but not passed on by GDB. This should be fixed. */ but not passed on by GDB. This should be fixed. */
const struct floatformat * static const struct floatformat *
floatformat_from_length (int len) floatformat_from_length (int len)
{ {
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT) if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)

View file

@ -455,7 +455,7 @@ struct dwarf2_frame_cache
struct dwarf2_frame_state_reg *reg; struct dwarf2_frame_state_reg *reg;
}; };
struct dwarf2_frame_cache * static struct dwarf2_frame_cache *
dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
{ {
struct cleanup *old_chain; struct cleanup *old_chain;

View file

@ -76,7 +76,7 @@ struct dwarf_expr_context
int in_reg; int in_reg;
}; };
struct dwarf_expr_context *new_dwarf_expr_context (); struct dwarf_expr_context *new_dwarf_expr_context (void);
void free_dwarf_expr_context (struct dwarf_expr_context *ctx); void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value); void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value);

View file

@ -146,6 +146,8 @@ frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return table->default_base; return table->default_base;
} }
extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-protypes */
void void
_initialize_frame_base (void) _initialize_frame_base (void)
{ {

View file

@ -98,6 +98,8 @@ frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return legacy_saved_regs_unwind; return legacy_saved_regs_unwind;
} }
extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
void void
_initialize_frame_unwind (void) _initialize_frame_unwind (void)
{ {

View file

@ -778,7 +778,7 @@ frame_map_regnum_to_name (int regnum)
/* Create a sentinel frame. */ /* Create a sentinel frame. */
struct frame_info * static struct frame_info *
create_sentinel_frame (struct regcache *regcache) create_sentinel_frame (struct regcache *regcache)
{ {
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info); struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
@ -2261,6 +2261,8 @@ legacy_frame_p (struct gdbarch *current_gdbarch)
|| !SAVE_DUMMY_FRAME_TOS_P ()); || !SAVE_DUMMY_FRAME_TOS_P ());
} }
extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
void void
_initialize_frame (void) _initialize_frame (void)
{ {

View file

@ -434,7 +434,7 @@ address_space_int_to_name (int space_flag)
/* Create a new type with instance flags NEW_FLAGS, based on TYPE. /* Create a new type with instance flags NEW_FLAGS, based on TYPE.
If STORAGE is non-NULL, create the new type instance there. */ If STORAGE is non-NULL, create the new type instance there. */
struct type * static struct type *
make_qualified_type (struct type *type, int new_flags, make_qualified_type (struct type *type, int new_flags,
struct type *storage) struct type *storage)
{ {
@ -1668,7 +1668,7 @@ check_typedef (struct type *type)
/* Parse a type expression in the string [P..P+LENGTH). If an error occurs, /* Parse a type expression in the string [P..P+LENGTH). If an error occurs,
silently return builtin_type_void. */ silently return builtin_type_void. */
struct type * static struct type *
safe_parse_type (char *p, int length) safe_parse_type (char *p, int length)
{ {
struct ui_file *saved_gdb_stderr; struct ui_file *saved_gdb_stderr;

View file

@ -184,7 +184,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
} }
struct type * static struct type *
gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
{ {
struct type *known_type; struct type *known_type;
@ -401,6 +401,8 @@ init_gnuv2_ops (void)
gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset; gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
} }
extern initialize_file_ftype _initialize_gnu_v2_abi; /* -Wmissing-prototypes */
void void
_initialize_gnu_v2_abi (void) _initialize_gnu_v2_abi (void)
{ {

View file

@ -372,7 +372,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
to (the address of)(ARG) + OFFSET. to (the address of)(ARG) + OFFSET.
-1 is returned on error. */ -1 is returned on error. */
int static int
gnuv3_baseclass_offset (struct type *type, int index, char *valaddr, gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
CORE_ADDR address) CORE_ADDR address)
{ {
@ -447,6 +447,7 @@ init_gnuv3_ops (void)
gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset; gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset;
} }
extern initialize_file_ftype _initialize_gnu_v3_abi; /* -Wmissing-prototypes */
void void
_initialize_gnu_v3_abi (void) _initialize_gnu_v3_abi (void)

View file

@ -309,6 +309,7 @@ init_hpacc_ops (void)
hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset; hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
} }
extern initialize_file_ftype _initialize_hpacc_abi; /* -Wmissing-prototypes */
void void
_initialize_hpacc_abi (void) _initialize_hpacc_abi (void)

View file

@ -34,6 +34,7 @@
#include "gdbcmd.h" #include "gdbcmd.h"
#include "command.h" #include "command.h"
#include "gdb_string.h" #include "gdb_string.h"
#include "infcall.h"
/* NOTE: cagney/2003-04-16: What's the future of this code? /* NOTE: cagney/2003-04-16: What's the future of this code?

View file

@ -290,7 +290,7 @@ interp_quiet_p (struct interp *interp)
return current_interpreter->quiet_p; return current_interpreter->quiet_p;
} }
int static int
interp_set_quiet (struct interp *interp, int quiet) interp_set_quiet (struct interp *interp, int quiet)
{ {
int old_val = interp->quiet_p; int old_val = interp->quiet_p;
@ -357,7 +357,7 @@ initialize_interps (void)
/* Don't know if anything needs to be done here... */ /* Don't know if anything needs to be done here... */
} }
void static void
interpreter_exec_cmd (char *args, int from_tty) interpreter_exec_cmd (char *args, int from_tty)
{ {
struct interp *old_interp, *interp_to_use; struct interp *old_interp, *interp_to_use;

View file

@ -63,7 +63,7 @@ extern int current_interp_named_p (const char *name);
extern int current_interp_display_prompt_p (void); extern int current_interp_display_prompt_p (void);
extern void current_interp_command_loop (void); extern void current_interp_command_loop (void);
extern void clear_interpreter_hooks (); extern void clear_interpreter_hooks (void);
/* well-known interpreters */ /* well-known interpreters */
#define INTERP_CONSOLE "console" #define INTERP_CONSOLE "console"

View file

@ -1228,9 +1228,7 @@ java_type_from_name (name)
Otherwise, return 0. */ Otherwise, return 0. */
static int static int
push_variable (name) push_variable (struct stoken name)
struct stoken name;
{ {
char *tmp = copy_name (name); char *tmp = copy_name (name);
int is_a_field_of_this = 0; int is_a_field_of_this = 0;
@ -1302,9 +1300,7 @@ push_fieldnames (name)
Handle a qualified name, where DOT_INDEX is the index of the first '.' */ Handle a qualified name, where DOT_INDEX is the index of the first '.' */
static void static void
push_qualified_expression_name (name, dot_index) push_qualified_expression_name (struct stoken name, int dot_index)
struct stoken name;
int dot_index;
{ {
struct stoken token; struct stoken token;
char *tmp; char *tmp;

View file

@ -34,6 +34,7 @@
#include "parser-defs.h" #include "parser-defs.h"
#include "block.h" #include "block.h"
#include "objc-lang.h" #include "objc-lang.h"
#include "linespec.h"
/* We share this one with symtab.c, but it is not exported widely. */ /* We share this one with symtab.c, but it is not exported widely. */

View file

@ -222,6 +222,8 @@ macro_list_command (char *exp, int from_tty)
/* Initializing the `macrocmd' module. */ /* Initializing the `macrocmd' module. */
extern initialize_file_ftype _initialize_macrocmd;
void void
_initialize_macrocmd (void) _initialize_macrocmd (void)
{ {

View file

@ -123,7 +123,7 @@ macro_bcache_str (struct macro_table *t, const char *s)
/* Free a possibly bcached object OBJ. That is, if the macro table T /* Free a possibly bcached object OBJ. That is, if the macro table T
has a bcache, it's an error; otherwise, xfree OBJ. */ has a bcache, it's an error; otherwise, xfree OBJ. */
void static void
macro_bcache_free (struct macro_table *t, void *obj) macro_bcache_free (struct macro_table *t, void *obj)
{ {
gdb_assert (! t->bcache); gdb_assert (! t->bcache);

View file

@ -74,10 +74,6 @@ struct ui_file *gdb_stderr;
struct ui_file *gdb_stdlog; struct ui_file *gdb_stdlog;
struct ui_file *gdb_stdtarg; struct ui_file *gdb_stdtarg;
/* Used to initialize error() - defined in utils.c */
extern void error_init (void);
/* Whether to enable writing into executable and core files */ /* Whether to enable writing into executable and core files */
extern int write_files; extern int write_files;

View file

@ -407,7 +407,7 @@ maintenance_print_statistics (char *args, int from_tty)
print_symbol_bcache_statistics (); print_symbol_bcache_statistics ();
} }
void static void
maintenance_print_architecture (char *args, int from_tty) maintenance_print_architecture (char *args, int from_tty)
{ {
if (args == NULL) if (args == NULL)

View file

@ -514,6 +514,8 @@ mem_delete_command (char *args, int from_tty)
dont_repeat (); dont_repeat ();
} }
extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
void void
_initialize_mem (void) _initialize_mem (void)
{ {

View file

@ -1,3 +1,13 @@
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
2003-05-16 Andrew Cagney <cagney@redhat.com> 2003-05-16 Andrew Cagney <cagney@redhat.com>
* mi-main.c (mi_setup_architecture_data): * mi-main.c (mi_setup_architecture_data):

View file

@ -27,11 +27,7 @@
#include "ui-out.h" #include "ui-out.h"
#include "symtab.h" #include "symtab.h"
#include "block.h" #include "block.h"
#include "stack.h"
/* FIXME: these should go in some .h file but stack.c doesn't have a
corresponding .h file. These wrappers will be obsolete anyway, once
we pull the plug on the sanitization. */
extern void select_frame_command_wrapper (char *, int);
static void list_args_or_locals (int locals, int values, struct frame_info *fi); static void list_args_or_locals (int locals, int values, struct frame_info *fi);
@ -311,8 +307,8 @@ mi_cmd_stack_select_frame (char *command, char **argv, int argc)
/* with no args, don't change frame */ /* with no args, don't change frame */
if (argc == 0) if (argc == 0)
select_frame_command_wrapper (0, 1 /* not used */ ); select_frame_command (0, 1 /* not used */ );
else else
select_frame_command_wrapper (argv[0], 1 /* not used */ ); select_frame_command (argv[0], 1 /* not used */ );
return MI_CMD_DONE; return MI_CMD_DONE;
} }

View file

@ -393,6 +393,8 @@ mi_input (char *buf)
return gdb_readline (NULL); return gdb_readline (NULL);
} }
extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
void void
_initialize_mi_interp (void) _initialize_mi_interp (void)
{ {

View file

@ -41,6 +41,7 @@
#include "regcache.h" #include "regcache.h"
#include "gdb.h" #include "gdb.h"
#include "frame.h" #include "frame.h"
#include "mi-main.h"
#include <ctype.h> #include <ctype.h>
#include <sys/time.h> #include <sys/time.h>

View file

@ -231,8 +231,3 @@ mi_parse (char *cmd)
parse->op = MI_COMMAND; parse->op = MI_COMMAND;
return parse; return parse;
} }
void
_initialize_mi_parse (void)
{
}

View file

@ -1775,7 +1775,6 @@ yylex ()
CORE_ADDR Class = lookup_objc_class(tmp); CORE_ADDR Class = lookup_objc_class(tmp);
if (Class) if (Class)
{ {
extern struct symbol *lookup_struct_typedef();
yylval.class.class = Class; yylval.class.class = Class;
if ((sym = lookup_struct_typedef (tmp, if ((sym = lookup_struct_typedef (tmp,
expression_context_block, expression_context_block,

View file

@ -775,7 +775,8 @@ end_msglist(void)
* Used for qsorting lists of objc methods (either by class or selector). * Used for qsorting lists of objc methods (either by class or selector).
*/ */
int specialcmp(char *a, char *b) static int
specialcmp (char *a, char *b)
{ {
while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']') while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']')
{ {
@ -1518,7 +1519,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
return method + (tmp - buf); return method + (tmp - buf);
} }
void static void
print_object_command (char *args, int from_tty) print_object_command (char *args, int from_tty)
{ {
struct value *object, *function, *description; struct value *object, *function, *description;
@ -1606,7 +1607,7 @@ static struct objc_methcall methcalls[] = {
* case the functions have moved for some reason. * case the functions have moved for some reason.
*/ */
void static void
find_objc_msgsend (void) find_objc_msgsend (void)
{ {
unsigned int i; unsigned int i;
@ -1653,7 +1654,7 @@ struct objc_submethod_helper_data {
CORE_ADDR *new_pc; CORE_ADDR *new_pc;
}; };
int static int
find_objc_msgcall_submethod_helper (void * arg) find_objc_msgcall_submethod_helper (void * arg)
{ {
struct objc_submethod_helper_data *s = struct objc_submethod_helper_data *s =
@ -1665,7 +1666,7 @@ find_objc_msgcall_submethod_helper (void * arg)
return 0; return 0;
} }
int static int
find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *), find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *),
CORE_ADDR pc, CORE_ADDR pc,
CORE_ADDR *new_pc) CORE_ADDR *new_pc)
@ -1709,6 +1710,8 @@ find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc)
return 0; return 0;
} }
extern initialize_file_ftype _initialize_objc_language;
void void
_initialize_objc_language (void) _initialize_objc_language (void)
{ {
@ -1772,7 +1775,7 @@ read_objc_class (CORE_ADDR addr, struct objc_class *class)
class->protocols = read_memory_unsigned_integer (addr + 36, 4); class->protocols = read_memory_unsigned_integer (addr + 36, 4);
} }
CORE_ADDR static CORE_ADDR
find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel) find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
{ {
CORE_ADDR subclass = class; CORE_ADDR subclass = class;
@ -1822,7 +1825,7 @@ find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
return 0; return 0;
} }
CORE_ADDR static CORE_ADDR
find_implementation (CORE_ADDR object, CORE_ADDR sel) find_implementation (CORE_ADDR object, CORE_ADDR sel)
{ {
struct objc_object ostr; struct objc_object ostr;

View file

@ -62,4 +62,7 @@ extern void start_msglist (void);
extern void add_msglist (struct stoken *str, int addcolon); extern void add_msglist (struct stoken *str, int addcolon);
extern int end_msglist (void); extern int end_msglist (void);
struct symbol *lookup_struct_typedef (char *name, struct block *block,
int noerr);
#endif #endif

View file

@ -531,7 +531,7 @@ set_osabi (char *args, int from_tty, struct cmd_list_element *c)
internal_error (__FILE__, __LINE__, "Updating OS ABI failed."); internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
} }
void static void
show_osabi (char *args, int from_tty) show_osabi (char *args, int from_tty)
{ {
if (user_osabi_state == osabi_auto) if (user_osabi_state == osabi_auto)
@ -546,6 +546,8 @@ show_osabi (char *args, int from_tty)
gdbarch_osabi_name (GDB_OSABI_DEFAULT)); gdbarch_osabi_name (GDB_OSABI_DEFAULT));
} }
extern initialize_file_ftype _initialize_gdb_osabi; /* -Wmissing-prototype */
void void
_initialize_gdb_osabi (void) _initialize_gdb_osabi (void)
{ {

View file

@ -158,8 +158,8 @@ parse_number (char *, int, int, YYSTYPE *);
static struct type *current_type; static struct type *current_type;
static void push_current_type (); static void push_current_type (void);
static void pop_current_type (); static void pop_current_type (void);
static int search_field; static int search_field;
%} %}
@ -992,7 +992,8 @@ struct type_push
static struct type_push *tp_top = NULL; static struct type_push *tp_top = NULL;
static void push_current_type () static void
push_current_type (void)
{ {
struct type_push *tpnew; struct type_push *tpnew;
tpnew = (struct type_push *) malloc (sizeof (struct type_push)); tpnew = (struct type_push *) malloc (sizeof (struct type_push));
@ -1002,7 +1003,8 @@ static void push_current_type ()
tp_top = tpnew; tp_top = tpnew;
} }
static void pop_current_type () static void
pop_current_type (void)
{ {
struct type_push *tp = tp_top; struct type_push *tp = tp_top;
if (tp) if (tp)

View file

@ -1097,6 +1097,7 @@ pascal_object_print_class_member (char *valaddr, struct type *domain,
fprintf_filtered (stream, "%ld", (long int) (val >> 3)); fprintf_filtered (stream, "%ld", (long int) (val >> 3));
} }
extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototypes */
void void
_initialize_pascal_valprint (void) _initialize_pascal_valprint (void)

View file

@ -82,7 +82,7 @@ struct regcache_descr
struct type **register_type; struct type **register_type;
}; };
void static void
init_legacy_regcache_descr (struct gdbarch *gdbarch, init_legacy_regcache_descr (struct gdbarch *gdbarch,
struct regcache_descr *descr) struct regcache_descr *descr)
{ {
@ -340,7 +340,7 @@ regcache_xfree (struct regcache *regcache)
xfree (regcache); xfree (regcache);
} }
void static void
do_regcache_xfree (void *data) do_regcache_xfree (void *data)
{ {
regcache_xfree (data); regcache_xfree (data);
@ -1064,7 +1064,7 @@ typedef void (regcache_read_ftype) (struct regcache *regcache, int regnum,
typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum, typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum,
const void *buf); const void *buf);
void static void
regcache_xfer_part (struct regcache *regcache, int regnum, regcache_xfer_part (struct regcache *regcache, int regnum,
int offset, int len, void *in, const void *out, int offset, int len, void *in, const void *out,
regcache_read_ftype *read, regcache_write_ftype *write) regcache_read_ftype *read, regcache_write_ftype *write)
@ -1664,6 +1664,8 @@ maintenance_print_register_groups (char *args, int from_tty)
regcache_print (args, regcache_dump_groups); regcache_print (args, regcache_dump_groups);
} }
extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
void void
_initialize_regcache (void) _initialize_regcache (void)
{ {

View file

@ -245,6 +245,8 @@ struct reggroup *const all_reggroup = &all_group;
struct reggroup *const save_reggroup = &save_group; struct reggroup *const save_reggroup = &save_group;
struct reggroup *const restore_reggroup = &restore_group; struct reggroup *const restore_reggroup = &restore_group;
extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
void void
_initialize_reggroup (void) _initialize_reggroup (void)
{ {

View file

@ -4854,7 +4854,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
int remote_hw_watchpoint_limit = -1; int remote_hw_watchpoint_limit = -1;
int remote_hw_breakpoint_limit = -1; int remote_hw_breakpoint_limit = -1;
int static int
remote_check_watch_resources (int type, int cnt, int ot) remote_check_watch_resources (int type, int cnt, int ot)
{ {
if (type == bp_hardware_breakpoint) if (type == bp_hardware_breakpoint)
@ -4880,13 +4880,13 @@ remote_check_watch_resources (int type, int cnt, int ot)
return -1; return -1;
} }
int static int
remote_stopped_by_watchpoint (void) remote_stopped_by_watchpoint (void)
{ {
return remote_stopped_by_watchpoint_p; return remote_stopped_by_watchpoint_p;
} }
CORE_ADDR static CORE_ADDR
remote_stopped_data_address (void) remote_stopped_data_address (void)
{ {
if (remote_stopped_by_watchpoint ()) if (remote_stopped_by_watchpoint ())

View file

@ -231,7 +231,7 @@ rs6000_saved_pc_after_call (struct frame_info *fi)
} }
/* Get the ith function argument for the current function. */ /* Get the ith function argument for the current function. */
CORE_ADDR static CORE_ADDR
rs6000_fetch_pointer_argument (struct frame_info *frame, int argi, rs6000_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type) struct type *type)
{ {
@ -2164,7 +2164,7 @@ rs6000_create_inferior (int pid)
/* Return real function address if ADDR (a function pointer) is in the data /* Return real function address if ADDR (a function pointer) is in the data
space and is therefore a special function pointer. */ space and is therefore a special function pointer. */
CORE_ADDR static CORE_ADDR
rs6000_convert_from_func_ptr_addr (CORE_ADDR addr) rs6000_convert_from_func_ptr_addr (CORE_ADDR addr)
{ {
struct obj_section *s; struct obj_section *s;
@ -3033,6 +3033,8 @@ rs6000_info_powerpc_command (char *args, int from_tty)
/* Initialization code. */ /* Initialization code. */
extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-protypes */
void void
_initialize_rs6000_tdep (void) _initialize_rs6000_tdep (void)
{ {

View file

@ -44,7 +44,7 @@ sentinel_frame_cache (struct regcache *regcache)
/* Here the register value is taken direct from the register cache. */ /* Here the register value is taken direct from the register cache. */
void static void
sentinel_frame_prev_register (struct frame_info *next_frame, sentinel_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache, void **this_prologue_cache,
int regnum, int *optimized, int regnum, int *optimized,
@ -70,7 +70,7 @@ sentinel_frame_prev_register (struct frame_info *next_frame,
} }
} }
void static void
sentinel_frame_this_id (struct frame_info *next_frame, sentinel_frame_this_id (struct frame_info *next_frame,
void **this_prologue_cache, void **this_prologue_cache,
struct frame_id *this_id) struct frame_id *this_id)

View file

@ -819,6 +819,8 @@ Use \"info signals\" for a list of symbolic signals.");
} }
#ifndef GDBSERVER #ifndef GDBSERVER
extern initialize_file_ftype _initialize_signals; /* -Wmissing-prototype */
void void
_initialize_signals (void) _initialize_signals (void)
{ {

View file

@ -40,6 +40,7 @@
#include "annotate.h" #include "annotate.h"
#include "ui-out.h" #include "ui-out.h"
#include "block.h" #include "block.h"
#include "stack.h"
/* Prototypes for exported functions. */ /* Prototypes for exported functions. */
@ -71,8 +72,6 @@ void frame_command (char *, int);
static void current_frame_command (char *, int); static void current_frame_command (char *, int);
static void select_frame_command (char *, int);
static void print_frame_arg_vars (struct frame_info *, struct ui_file *); static void print_frame_arg_vars (struct frame_info *, struct ui_file *);
static void catch_info (char *, int); static void catch_info (char *, int);
@ -1460,14 +1459,7 @@ find_relative_frame (register struct frame_info *frame,
and select it. See parse_frame_specification for more info on proper and select it. See parse_frame_specification for more info on proper
frame expressions. */ frame expressions. */
/* ARGSUSED */
void void
select_frame_command_wrapper (char *level_exp, int from_tty)
{
select_frame_command (level_exp, from_tty);
}
static void
select_frame_command (char *level_exp, int from_tty) select_frame_command (char *level_exp, int from_tty)
{ {
struct frame_info *frame; struct frame_info *frame;

27
gdb/stack.h Normal file
View file

@ -0,0 +1,27 @@
/* Stack manipulation commands, for GDB the GNU Debugger.
Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef STACK_H
#define STACK_H
void select_frame_command (char *level_exp, int from_tty);
#endif /* #ifndef STACK_H */

View file

@ -133,6 +133,8 @@ value_of_builtin_frame_ps_reg (struct frame_info *frame)
error ("Standard register ``$ps'' is not available for this target"); error ("Standard register ``$ps'' is not available for this target");
} }
extern initialize_file_ftype _initialize_frame_reg; /* -Wmissing-prototypes */
void void
_initialize_frame_reg (void) _initialize_frame_reg (void)
{ {

View file

@ -3010,7 +3010,7 @@ pc_in_mapped_range (CORE_ADDR pc, asection *section)
/* Return true if the mapped ranges of sections A and B overlap, false /* Return true if the mapped ranges of sections A and B overlap, false
otherwise. */ otherwise. */
int static int
sections_overlap (asection *a, asection *b) sections_overlap (asection *a, asection *b)
{ {
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */ /* FIXME: need bfd *, so we can use bfd_section_vma methods. */

View file

@ -490,7 +490,7 @@ struct catch_errors_args
void *func_args; void *func_args;
}; };
int static int
do_catch_errors (struct ui_out *uiout, void *data) do_catch_errors (struct ui_out *uiout, void *data)
{ {
struct catch_errors_args *args = data; struct catch_errors_args *args = data;
@ -1061,7 +1061,7 @@ static int operate_saved_history = -1;
/* This is put on the appropriate hook and helps operate-and-get-next /* This is put on the appropriate hook and helps operate-and-get-next
do its work. */ do its work. */
void static void
gdb_rl_operate_and_get_next_completion (void) gdb_rl_operate_and_get_next_completion (void)
{ {
int delta = where_history () - operate_saved_history; int delta = where_history () - operate_saved_history;

View file

@ -72,4 +72,14 @@ extern int history_expansion_p;
extern int server_command; extern int server_command;
extern char *lim_at_start; extern char *lim_at_start;
extern void show_commands (char *args, int from_tty);
extern void set_history (char *, int);
extern void show_history (char *, int);
extern void set_verbose (char *, int, struct cmd_list_element *);
extern void do_restore_instream_cleanup (void *stream);
#endif #endif

View file

@ -33,7 +33,7 @@
#include "target.h" #include "target.h"
#include "language.h" #include "language.h"
#include "cp-abi.h" #include "cp-abi.h"
#include "typeprint.h"
#include "gdb_string.h" #include "gdb_string.h"
#include <errno.h> #include <errno.h>

View file

@ -436,15 +436,6 @@ make_cleanup_ui_out_end (struct ui_out *uiout,
return make_cleanup (do_cleanup_end, end_cleanup_data); return make_cleanup (do_cleanup_end, end_cleanup_data);
} }
struct cleanup *
make_cleanup_ui_out_begin_end (struct ui_out *uiout,
enum ui_out_type type,
const char *id)
{
ui_out_begin (uiout, type, id);
return make_cleanup_ui_out_end (uiout, type);
}
struct cleanup * struct cleanup *
make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout, make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id) const char *id)