aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-02-22 01:02:20 +0000
committerPedro Alves <palves@redhat.com>2009-02-22 01:02:20 +0000
commit63807e1d0d57fe810b93dfef77291de153f02db4 (patch)
treef5533b30ed92ef91b34a00bc89641efd0c55c450 /gdb
parent7b4eadbd2731b31a8622b838535edf876c9a893c (diff)
downloadgdb-63807e1d0d57fe810b93dfef77291de153f02db4.zip
gdb-63807e1d0d57fe810b93dfef77291de153f02db4.tar.gz
gdb-63807e1d0d57fe810b93dfef77291de153f02db4.tar.bz2
Silence a few -Wmissing-prototypes warnings.
PR build/9877: * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make it static. * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare. * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static. * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ... (_initialize_amd64nbsd_tdep): ... this. * arm-linux-tdep.c (arm_linux_software_single_step): Make it static. (_initialize_arm_linux_tdep): Declare. * armbsd-tdep.c (armbsd_fpreg_offset): Make it static. * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare. * armobsd-tdep.c (_initialize_armobsd_tdep): Declare. * avr-tdep.c (avr_return_value): Make it static. (avr_frame_unwind_cache): Ditto. * bsd-uthread.c (bsd_uthread_inferior_created): Ditto. (bsd_uthread_solib_loaded): Ditto. (bsd_uthread_solib_unloaded): Ditto. (bsd_uthread_target): Ditto. (_initialize_bsd_uthread): Declare. * cris-tdep.c (crisv32_single_step_through_delay): Make it static. (cris_frame_unwind_cache): Ditto. * frv-tdep.c (frv_return_value): Ditto. * h8300-tdep.c (h8300_use_struct_convention): Ditto. (h8300h_use_struct_convention): Ditto. * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend): Ditto. * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete declarations. * hppabsd-tdep.c: Include hppabsd-tdep.h. (hppabsd_find_global_pointer): Make it static. * hppabsd-tdep.h: New. * hppanbsd-tdep.c: Include hppabsd-tdep.h. (hppabsd_init_abi): Remove declaration. (_initialize_hppabsd_tdep): Remove declaration. (_initialize_hppanbsd_tdep): Declare. * hppaobsd-tdep.c: Include hppabsd-tdep.h. (hppabsd_init_abi): Delete declaration. (hppaobsd_init_abi): Make it static. * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare. * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare. * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare. * ia64-tdep.c (ia64_register_reggroup_p): Make it static. * iq2000-tdep.c (_initialize_iq2000_tdep): Declare. * m32c-tdep.c (m32c_register_reggroup_p): Make it static. (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto. (_initialize_m32c_tdep): Declare. * m32r-rom.c (_initialize_m32r_rom): Declare. * m32r-tdep.c (m32r_skip_prologue): Make it static. (m32r_return_value): Ditto. * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static. (m68hc11_return_value): Ditto. * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare. * m88k-tdep.c (m88k_frame_cache): Make it static. * mep-tdep.c (mep_gdb_print_insn): Ditto. (mep_return_value): Ditto. (_initialize_mep_tdep): Declare. * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare. * mips-linux-tdep.c (supply_64bit_reg): Make it static. (mips_linux_syscall_next_pc): Ditto. (_initialize_mips_linux_tdep): Declare. * mips-tdep.c (mips_single_step_through_delay): Make it static. * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare. * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare. * mn10300-tdep.c (_initialize_mn10300_tdep): Declare. * mt-tdep.c (_initialize_mt_tdep): Declare. * nbsd-tdep.c: Include nbsd-tdep.h. * nto-tdep.c (find_load_phdr): Make it static. (_initialize_nto_tdep): Declare. * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it static. (_initialize_ppc_linux_tdep): Declare. * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint) (m32r_insert_watchpoint, m32r_remove_watchpoint) (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make static. * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare. * rs6000-nat.c: Include xcoffread.h. (find_toc_address): Don't extern declare get_toc_offset. Adjust to call xcoff_get_to_offset. * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup) (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline) (rs6000_skip_trampoline_code): Make static. * s390-tdep.c (s390_regset_from_core_section): Ditto. * sh-tdep.c (sh_register_reggroup_p): Ditto. * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto. (_initialize_shnbsd_tdep): Declare. * solib-frv.c (displacement_from_map): Make static. (_initialize_frv_solib): Declare. * solib-irix.c (fetch_lm_info): Make static. (_initialize_irix_solib): Declare. * solib-som.c: Include solib-som.h. (som_solib_select): Line break. * sparc-tdep.c (sparc_regset_from_core_section): Make static. * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ... (_initialize_sparcnbsd_tdep): ... this. * spu-tdep.c (spu_software_single_step): Make it static. (_initialize_spu_tdep): Declare. * vax-tdep.c (vax_frame_cache): Make it static. * xcoffread.c: Include xcoffread.h. (get_toc_offset): Rename to ... (xcoff_get_toc_offset): ... this. (_initialize_xcoffread): Declare. * xcoffread.h: New. * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare. * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make static. (_initialize_xtensa_tdep): Declare.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog112
-rw-r--r--gdb/alpha-linux-tdep.c5
-rw-r--r--gdb/alpha-osf1-tdep.c3
-rw-r--r--gdb/amd64fbsd-tdep.c2
-rw-r--r--gdb/amd64nbsd-tdep.c2
-rw-r--r--gdb/arm-linux-tdep.c5
-rw-r--r--gdb/armbsd-tdep.c2
-rw-r--r--gdb/armnbsd-tdep.c3
-rw-r--r--gdb/armobsd-tdep.c3
-rw-r--r--gdb/avr-tdep.c4
-rw-r--r--gdb/bsd-uthread.c11
-rw-r--r--gdb/cris-tdep.c4
-rw-r--r--gdb/frv-tdep.c2
-rw-r--r--gdb/h8300-tdep.c4
-rw-r--r--gdb/hppa-tdep.c4
-rw-r--r--gdb/hppa-tdep.h2
-rw-r--r--gdb/hppabsd-tdep.c3
-rw-r--r--gdb/hppabsd-tdep.h25
-rw-r--r--gdb/hppanbsd-tdep.c5
-rw-r--r--gdb/hppaobsd-tdep.c5
-rw-r--r--gdb/i386-nto-tdep.c3
-rw-r--r--gdb/i386nbsd-tdep.c3
-rw-r--r--gdb/ia64-linux-tdep.c3
-rw-r--r--gdb/ia64-tdep.c2
-rw-r--r--gdb/iq2000-tdep.c3
-rw-r--r--gdb/m32c-tdep.c8
-rw-r--r--gdb/m32r-rom.c3
-rw-r--r--gdb/m32r-tdep.c4
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68klinux-tdep.c3
-rw-r--r--gdb/m88k-tdep.c2
-rw-r--r--gdb/mep-tdep.c6
-rw-r--r--gdb/mips-irix-tdep.c3
-rw-r--r--gdb/mips-linux-tdep.c7
-rw-r--r--gdb/mips-tdep.c2
-rw-r--r--gdb/mipsnbsd-tdep.c3
-rw-r--r--gdb/mn10300-linux-tdep.c3
-rw-r--r--gdb/mn10300-tdep.c3
-rw-r--r--gdb/mt-tdep.c3
-rw-r--r--gdb/nbsd-tdep.c1
-rw-r--r--gdb/nto-tdep.c5
-rw-r--r--gdb/ppc-linux-tdep.c5
-rw-r--r--gdb/remote-m32r-sdi.c10
-rw-r--r--gdb/rs6000-aix-tdep.c3
-rw-r--r--gdb/rs6000-nat.c8
-rw-r--r--gdb/rs6000-tdep.c16
-rw-r--r--gdb/s390-tdep.c2
-rw-r--r--gdb/sh-tdep.c2
-rw-r--r--gdb/shnbsd-tdep.c5
-rw-r--r--gdb/solib-frv.c5
-rw-r--r--gdb/solib-irix.c5
-rw-r--r--gdb/solib-som.c4
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/sparcnbsd-tdep.c2
-rw-r--r--gdb/spu-tdep.c5
-rw-r--r--gdb/vax-tdep.c2
-rw-r--r--gdb/xcoffread.c6
-rw-r--r--gdb/xcoffread.h24
-rw-r--r--gdb/xtensa-linux-tdep.c3
-rw-r--r--gdb/xtensa-tdep.c7
60 files changed, 323 insertions, 73 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b79ba28..15f7904 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,115 @@
+2009-02-22 Pedro Alves <pedro@codesourcery.com>
+
+ Silence a few -Wmissing-prototypes warnings.
+
+ PR build/9877:
+ * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
+ it static.
+ * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
+ * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
+ * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
+ (_initialize_amd64nbsd_tdep): ... this.
+ * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
+ (_initialize_arm_linux_tdep): Declare.
+ * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
+ * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
+ * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
+ * avr-tdep.c (avr_return_value): Make it static.
+ (avr_frame_unwind_cache): Ditto.
+ * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
+ (bsd_uthread_solib_loaded): Ditto.
+ (bsd_uthread_solib_unloaded): Ditto.
+ (bsd_uthread_target): Ditto.
+ (_initialize_bsd_uthread): Declare.
+ * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
+ (cris_frame_unwind_cache): Ditto.
+ * frv-tdep.c (frv_return_value): Ditto.
+ * h8300-tdep.c (h8300_use_struct_convention): Ditto.
+ (h8300h_use_struct_convention): Ditto.
+ * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
+ Ditto.
+ * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
+ declarations.
+ * hppabsd-tdep.c: Include hppabsd-tdep.h.
+ (hppabsd_find_global_pointer): Make it static.
+ * hppabsd-tdep.h: New.
+ * hppanbsd-tdep.c: Include hppabsd-tdep.h.
+ (hppabsd_init_abi): Remove declaration.
+ (_initialize_hppabsd_tdep): Remove declaration.
+ (_initialize_hppanbsd_tdep): Declare.
+ * hppaobsd-tdep.c: Include hppabsd-tdep.h.
+ (hppabsd_init_abi): Delete declaration.
+ (hppaobsd_init_abi): Make it static.
+ * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
+ * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
+ * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
+ * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
+ * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
+ * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
+ (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
+ (_initialize_m32c_tdep): Declare.
+ * m32r-rom.c (_initialize_m32r_rom): Declare.
+ * m32r-tdep.c (m32r_skip_prologue): Make it static.
+ (m32r_return_value): Ditto.
+ * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
+ (m68hc11_return_value): Ditto.
+ * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
+ * m88k-tdep.c (m88k_frame_cache): Make it static.
+ * mep-tdep.c (mep_gdb_print_insn): Ditto.
+ (mep_return_value): Ditto.
+ (_initialize_mep_tdep): Declare.
+ * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
+ * mips-linux-tdep.c (supply_64bit_reg): Make it static.
+ (mips_linux_syscall_next_pc): Ditto.
+ (_initialize_mips_linux_tdep): Declare.
+ * mips-tdep.c (mips_single_step_through_delay): Make it static.
+ * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
+ * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
+ * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
+ * mt-tdep.c (_initialize_mt_tdep): Declare.
+ * nbsd-tdep.c: Include nbsd-tdep.h.
+ * nto-tdep.c (find_load_phdr): Make it static.
+ (_initialize_nto_tdep): Declare.
+ * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
+ static.
+ (_initialize_ppc_linux_tdep): Declare.
+ * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
+ (m32r_insert_watchpoint, m32r_remove_watchpoint)
+ (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
+ static.
+ * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
+ * rs6000-nat.c: Include xcoffread.h.
+ (find_toc_address): Don't extern declare get_toc_offset. Adjust
+ to call xcoff_get_to_offset.
+ * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
+ (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
+ (rs6000_skip_trampoline_code): Make static.
+ * s390-tdep.c (s390_regset_from_core_section): Ditto.
+ * sh-tdep.c (sh_register_reggroup_p): Ditto.
+ * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
+ (_initialize_shnbsd_tdep): Declare.
+ * solib-frv.c (displacement_from_map): Make static.
+ (_initialize_frv_solib): Declare.
+ * solib-irix.c (fetch_lm_info): Make static.
+ (_initialize_irix_solib): Declare.
+ * solib-som.c: Include solib-som.h.
+ (som_solib_select): Line break.
+ * sparc-tdep.c (sparc_regset_from_core_section): Make static.
+ * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
+ (_initialize_sparcnbsd_tdep): ... this.
+ * spu-tdep.c (spu_software_single_step): Make it static.
+ (_initialize_spu_tdep): Declare.
+ * vax-tdep.c (vax_frame_cache): Make it static.
+ * xcoffread.c: Include xcoffread.h.
+ (get_toc_offset): Rename to ...
+ (xcoff_get_toc_offset): ... this.
+ (_initialize_xcoffread): Declare.
+ * xcoffread.h: New.
+ * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
+ * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
+ static.
+ (_initialize_xtensa_tdep): Declare.
+
2008-02-21 Pedro Alves <pedro@codesorcery.com>
Silence a few -Wmissing-prototypes warnings.
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 9ef9d93..25b6b2d 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -191,7 +191,7 @@ static struct regset alpha_linux_fpregset =
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
-const struct regset *
+static const struct regset *
alpha_linux_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
@@ -235,6 +235,9 @@ alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
(gdbarch, alpha_linux_regset_from_core_section);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_alpha_linux_tdep;
+
void
_initialize_alpha_linux_tdep (void)
{
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index d171cd6..5fde0e6 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -65,6 +65,9 @@ alpha_osf1_init_abi (struct gdbarch_info info,
tdep->jb_elt_size = 8;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_alpha_osf1_tdep;
+
void
_initialize_alpha_osf1_tdep (void)
{
diff --git a/gdb/amd64fbsd-tdep.c b/gdb/amd64fbsd-tdep.c
index 625af88..2400061 100644
--- a/gdb/amd64fbsd-tdep.c
+++ b/gdb/amd64fbsd-tdep.c
@@ -181,7 +181,7 @@ amd64fbsd_collect_uthread (const struct regcache *regcache,
}
}
-void
+static void
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
diff --git a/gdb/amd64nbsd-tdep.c b/gdb/amd64nbsd-tdep.c
index 33967c1..5b11001 100644
--- a/gdb/amd64nbsd-tdep.c
+++ b/gdb/amd64nbsd-tdep.c
@@ -125,7 +125,7 @@ amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void _initialize_amd64nbsd_tdep (void);
void
-_initialize_amd64nbsd_ndep (void)
+_initialize_amd64nbsd_tdep (void)
{
/* The NetBSD/amd64 native dependent code makes this assumption. */
gdb_assert (ARRAY_SIZE (amd64nbsd_r_reg_offset) == AMD64_NUM_GREGS);
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index fbe80ee..b63d9ae 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -572,7 +572,7 @@ arm_linux_regset_from_core_section (struct gdbarch *gdbarch,
/* Insert a single step breakpoint at the next executed instruction. */
-int
+static int
arm_linux_software_single_step (struct frame_info *frame)
{
CORE_ADDR next_pc = arm_get_next_pc (frame, get_frame_pc (frame));
@@ -652,6 +652,9 @@ arm_linux_init_abi (struct gdbarch_info info,
set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_arm_linux_tdep;
+
void
_initialize_arm_linux_tdep (void)
{
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index 7baf69f..b2e12ba 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -35,7 +35,7 @@
/* Sizeof `struct fpreg' in <machine/reg.h. */
#define ARMBSD_SIZEOF_FPREGS ((1 + (8 * 3)) * 4)
-int
+static int
armbsd_fpreg_offset (int regnum)
{
if (regnum == ARM_FPS_REGNUM)
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index c64a521..2215a84 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -107,6 +107,9 @@ arm_netbsd_aout_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_arm_netbsd_tdep;
+
void
_initialize_arm_netbsd_tdep (void)
{
diff --git a/gdb/armobsd-tdep.c b/gdb/armobsd-tdep.c
index eddb82a..37bbf81 100644
--- a/gdb/armobsd-tdep.c
+++ b/gdb/armobsd-tdep.c
@@ -127,6 +127,9 @@ armobsd_core_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_armobsd_tdep;
+
void
_initialize_armobsd_tdep (void)
{
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index dcc4f78..01d04e2 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -833,7 +833,7 @@ avr_extract_return_value (struct type *type, struct regcache *regcache,
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
-enum return_value_convention
+static enum return_value_convention
avr_return_value (struct gdbarch *gdbarch, struct type *func_type,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
@@ -871,7 +871,7 @@ avr_return_value (struct gdbarch *gdbarch, struct type *func_type,
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct avr_unwind_cache *
+static struct avr_unwind_cache *
avr_frame_unwind_cache (struct frame_info *this_frame,
void **this_prologue_cache)
{
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index ecbad76..0d90380 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -225,7 +225,7 @@ bsd_uthread_deactivate (void)
unpush_target (bsd_uthread_ops_hack);
}
-void
+static void
bsd_uthread_inferior_created (struct target_ops *ops, int from_tty)
{
bsd_uthread_activate (NULL);
@@ -239,7 +239,7 @@ static const char *bsd_uthread_solib_names[] =
NULL
};
-void
+static void
bsd_uthread_solib_loaded (struct so_list *so)
{
const char **names = bsd_uthread_solib_names;
@@ -259,7 +259,7 @@ bsd_uthread_solib_loaded (struct so_list *so)
}
}
-void
+static void
bsd_uthread_solib_unloaded (struct so_list *so)
{
if (!bsd_uthread_solib_name)
@@ -503,7 +503,7 @@ bsd_uthread_pid_to_str (struct target_ops *ops, ptid_t ptid)
return normal_pid_to_str (ptid);
}
-struct target_ops *
+static struct target_ops *
bsd_uthread_target (void)
{
struct target_ops *t = XZALLOC (struct target_ops);
@@ -529,6 +529,9 @@ bsd_uthread_target (void)
return t;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_bsd_uthread;
+
void
_initialize_bsd_uthread (void)
{
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index ed66d74..63f4ae4 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -453,7 +453,7 @@ static const struct frame_unwind cris_sigtramp_frame_unwind =
cris_sigtramp_frame_sniffer
};
-int
+static int
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *this_frame)
{
@@ -745,7 +745,7 @@ pop_stack_item (struct stack_item *si)
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct cris_unwind_cache *
+static struct cris_unwind_cache *
cris_frame_unwind_cache (struct frame_info *this_frame,
void **this_prologue_cache)
{
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 9f751d4..ff387db 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1325,7 +1325,7 @@ frv_store_return_value (struct type *type, struct regcache *regcache,
_("Don't know how to return a %d-byte value."), len);
}
-enum return_value_convention
+static enum return_value_convention
frv_return_value (struct gdbarch *gdbarch, struct type *func_type,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index d68c5ed..9d679ac 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -798,7 +798,7 @@ h8300h_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-int
+static int
h8300_use_struct_convention (struct type *value_type)
{
/* Types of 1, 2 or 4 bytes are returned in R0/R1, everything else on the
@@ -812,7 +812,7 @@ h8300_use_struct_convention (struct type *value_type)
|| TYPE_LENGTH (value_type) == 4);
}
-int
+static int
h8300h_use_struct_convention (struct type *value_type)
{
/* Types of 1, 2 or 4 bytes are returned in R0, INT types of 8 bytes are
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 38e38ce..fe29a86 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -73,7 +73,7 @@ const struct objfile_data *hppa_objfile_priv_data = NULL;
/* This assumes that no garbage lies outside of the lower bits of
value. */
-int
+static int
hppa_sign_extend (unsigned val, unsigned bits)
{
return (int) (val >> (bits - 1) ? (-1 << bits) | val : val);
@@ -81,7 +81,7 @@ hppa_sign_extend (unsigned val, unsigned bits)
/* For many immediate values the sign bit is the low bit! */
-int
+static int
hppa_low_hppa_sign_extend (unsigned val, unsigned bits)
{
return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h
index 659ded9..4c7b9f7 100644
--- a/gdb/hppa-tdep.h
+++ b/gdb/hppa-tdep.h
@@ -222,8 +222,6 @@ unsigned hppa_extract_5r_store (unsigned int);
int hppa_extract_17 (unsigned int);
int hppa_extract_21 (unsigned);
int hppa_extract_14 (unsigned);
-int hppa_low_sign_extend (unsigned int, unsigned int);
-int hppa_sign_extend (unsigned int, unsigned int);
CORE_ADDR hppa_symbol_address(const char *sym);
extern struct value *
diff --git a/gdb/hppabsd-tdep.c b/gdb/hppabsd-tdep.c
index 2954a68..a112433 100644
--- a/gdb/hppabsd-tdep.c
+++ b/gdb/hppabsd-tdep.c
@@ -26,9 +26,10 @@
#include "elf/common.h"
#include "hppa-tdep.h"
+#include "hppabsd-tdep.h"
#include "solib-svr4.h"
-CORE_ADDR
+static CORE_ADDR
hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
{
CORE_ADDR faddr = value_as_address (function);
diff --git a/gdb/hppabsd-tdep.h b/gdb/hppabsd-tdep.h
new file mode 100644
index 0000000..0335332
--- /dev/null
+++ b/gdb/hppabsd-tdep.h
@@ -0,0 +1,25 @@
+/* Target-dependent code for HP PA-RISC BSD's.
+
+ Copyright (C) 2009 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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef HPPABSD_TDEP_H
+#define HPPABSD_TDEP_H
+
+extern void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
+
+#endif /* hppabsd-tdep.h */
diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c
index 2330ac7..528fa54 100644
--- a/gdb/hppanbsd-tdep.c
+++ b/gdb/hppanbsd-tdep.c
@@ -31,6 +31,7 @@
#include "gdb_string.h"
#include "hppa-tdep.h"
+#include "hppabsd-tdep.h"
/* From <machine/mcontext.h>. */
static int hppanbsd_mc_reg_offset[] =
@@ -201,8 +202,6 @@ hppanbsd_regset_from_core_section (struct gdbarch *gdbarch,
return NULL;
}
-void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
-
static void
hppanbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -218,7 +217,7 @@ hppanbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Provide a prototype to silence -Wmissing-prototypes. */
-void _initialize_hppabsd_tdep (void);
+extern initialize_file_ftype _initialize_hppanbsd_tdep;
void
_initialize_hppanbsd_tdep (void)
diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c
index e0ce882..69655e2 100644
--- a/gdb/hppaobsd-tdep.c
+++ b/gdb/hppaobsd-tdep.c
@@ -28,6 +28,7 @@
#include "gdb_string.h"
#include "hppa-tdep.h"
+#include "hppabsd-tdep.h"
/* Core file support. */
@@ -84,9 +85,7 @@ hppaobsd_regset_from_core_section (struct gdbarch *gdbarch,
}
-void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
-
-void
+static void
hppaobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
/* Obviously OpenBSD is BSD-based. */
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index ede9bf1..c99fdc0 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -302,6 +302,9 @@ i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
nto_set_target (&i386_nto_target);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_i386nto_tdep;
+
void
_initialize_i386nto_tdep (void)
{
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 2da669d..bb6aaf0 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -320,6 +320,9 @@ i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->struct_return = pcc_struct_return;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_i386nbsd_tdep;
+
void
_initialize_i386nbsd_tdep (void)
{
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index 49d5b72..3a86c96 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -139,6 +139,9 @@ ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
svr4_fetch_objfile_link_map);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_ia64_linux_tdep;
+
void
_initialize_ia64_linux_tdep (void)
{
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index f0201de..6adfae2 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -280,7 +280,7 @@ struct ia64_frame_cache
};
-int
+static int
ia64_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 7e699f8..8dfe6b2 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -842,6 +842,9 @@ iq2000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
Initializer function for the iq2000 module.
Called by gdb at start-up. */
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_iq2000_tdep;
+
void
_initialize_iq2000_tdep (void)
{
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 72d438a..9fa672b 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -261,7 +261,7 @@ m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
}
-int
+static int
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
@@ -1519,7 +1519,7 @@ check_for_saved (void *prologue_untyped, pv_t addr, CORE_ADDR size, pv_t value)
/* Analyze the function prologue for ARCH at START, going no further
than LIMIT, and place a description of what we found in
PROLOGUE. */
-void
+static void
m32c_analyze_prologue (struct gdbarch *arch,
CORE_ADDR start, CORE_ADDR limit,
struct m32c_prologue *prologue)
@@ -2499,7 +2499,7 @@ m32c_m16c_pointer_to_address (struct type *type, const gdb_byte *buf)
return ptr;
}
-void
+static void
m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
int *frame_regnum,
LONGEST *frame_offset)
@@ -2613,6 +2613,8 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return arch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m32c_tdep;
void
_initialize_m32c_tdep (void)
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index 1e10fbd..a078be6 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -550,6 +550,9 @@ m32r_upload_command (char *args, int from_tty)
clear_symtab_users ();
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m32r_rom;
+
void
_initialize_m32r_rom (void)
{
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 9f34a6f..5f4b9a6 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -449,7 +449,7 @@ decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit,
#define DEFAULT_SEARCH_LIMIT 128
-CORE_ADDR
+static CORE_ADDR
m32r_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
@@ -785,7 +785,7 @@ m32r_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-enum return_value_convention
+static enum return_value_convention
m32r_return_value (struct gdbarch *gdbarch, struct type *func_type,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index de69812..4bde070 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -771,7 +771,7 @@ m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct m68hc11_unwind_cache *
+static struct m68hc11_unwind_cache *
m68hc11_frame_unwind_cache (struct frame_info *this_frame,
void **this_prologue_cache)
{
@@ -1309,7 +1309,7 @@ m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-enum return_value_convention
+static enum return_value_convention
m68hc11_return_value (struct gdbarch *gdbarch, struct type *func_type,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index b5feab6..5813ee5 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -364,6 +364,9 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
svr4_fetch_objfile_link_map);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m68k_linux_tdep;
+
void
_initialize_m68k_linux_tdep (void)
{
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 79945d6..9b1084f 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -644,7 +644,7 @@ m88k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
return m88k_analyze_prologue (pc, pc + m88k_max_prologue_size, NULL);
}
-struct m88k_frame_cache *
+static struct m88k_frame_cache *
m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct m88k_frame_cache *cache;
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 4905b17..7bc6ccd 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1267,7 +1267,7 @@ mep_pseudo_register_write (struct gdbarch *gdbarch,
/* The mep disassembler needs to know about the section in order to
work correctly. */
-int
+static int
mep_gdb_print_insn (bfd_vma pc, disassemble_info * info)
{
struct obj_section * s = find_pc_section (pc);
@@ -2184,7 +2184,7 @@ mep_store_return_value (struct gdbarch *arch,
"Try using the 'return' command with no argument.");
}
-enum return_value_convention
+static enum return_value_convention
mep_return_value (struct gdbarch *gdbarch, struct type *func_type,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
@@ -2507,6 +2507,8 @@ mep_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mep_tdep;
void
_initialize_mep_tdep (void)
diff --git a/gdb/mips-irix-tdep.c b/gdb/mips-irix-tdep.c
index 6d376cd..5ea183c 100644
--- a/gdb/mips-irix-tdep.c
+++ b/gdb/mips-irix-tdep.c
@@ -84,6 +84,9 @@ mips_irix_init_abi (struct gdbarch_info info,
set_solib_ops (gdbarch, &irix_so_ops);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mips_irix_tdep;
+
void
_initialize_mips_irix_tdep (void)
{
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 6e7a5b2..242196a 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -280,7 +280,7 @@ mips64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
/* Supply a 64-bit register. */
-void
+static void
supply_64bit_reg (struct regcache *regcache, int regnum,
const gdb_byte *buf)
{
@@ -1105,7 +1105,7 @@ mips_linux_restart_reg_p (struct gdbarch *gdbarch)
/* When FRAME is at a syscall instruction, return the PC of the next
instruction to be executed. */
-CORE_ADDR
+static CORE_ADDR
mips_linux_syscall_next_pc (struct frame_info *frame)
{
CORE_ADDR pc = get_frame_pc (frame);
@@ -1216,6 +1216,9 @@ mips_linux_init_abi (struct gdbarch_info info,
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mips_linux_tdep;
+
void
_initialize_mips_linux_tdep (void)
{
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index fd89348..6c8c4c0 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -4645,7 +4645,7 @@ is_delayed (unsigned long insn)
| INSN_COND_BRANCH_LIKELY)));
}
-int
+static int
mips_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *frame)
{
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index e9845a8..b9e0547 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -417,6 +417,9 @@ mipsnbsd_core_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mipsnbsd_tdep;
+
void
_initialize_mipsnbsd_tdep (void)
{
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 46912ae..98a82e6 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -720,6 +720,9 @@ am33_linux_init_osabi (struct gdbarch_info gdbinfo, struct gdbarch *gdbarch)
tramp_frame_prepend_unwinder (gdbarch, &am33_linux_rt_sigframe);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mn10300_linux_tdep;
+
void
_initialize_mn10300_linux_tdep (void)
{
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 7d8c97b..f0cea27 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1217,6 +1217,9 @@ mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
tdep->am33_mode);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mn10300_tdep;
+
void
_initialize_mn10300_tdep (void)
{
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index a75227c..28f8b46 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -1169,6 +1169,9 @@ mt_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mt_tdep;
+
void
_initialize_mt_tdep (void)
{
diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c
index 20910f2..72f5a9b 100644
--- a/gdb/nbsd-tdep.c
+++ b/gdb/nbsd-tdep.c
@@ -22,6 +22,7 @@
#include "defs.h"
#include "gdb_string.h"
#include "solib-svr4.h"
+#include "nbsd-tdep.h"
/* FIXME: kettenis/20060115: We should really eliminate the next two
functions completely. */
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 226ebce..193f83c 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -299,7 +299,7 @@ nto_truncate_ptr (CORE_ADDR addr)
return addr & (((CORE_ADDR) 1 << gdbarch_ptr_bit (target_gdbarch)) - 1);
}
-Elf_Internal_Phdr *
+static Elf_Internal_Phdr *
find_load_phdr (bfd *abfd)
{
Elf_Internal_Phdr *phdr;
@@ -398,6 +398,9 @@ nto_initialize_signals (void)
#endif
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_nto_tdep;
+
void
_initialize_nto_tdep (void)
{
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 7f13188..d08d4fc 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -178,7 +178,7 @@
else in the event that some other platform has similar needs with
regard to removing breakpoints in some potentially self modifying
code. */
-int
+static int
ppc_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
@@ -1160,6 +1160,9 @@ ppc_linux_init_abi (struct gdbarch_info info,
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_ppc_linux_tdep;
+
void
_initialize_ppc_linux_tdep (void)
{
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 357b330..d0b52ea 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -1418,7 +1418,7 @@ m32r_stop (ptid_t ptid)
is the number of hardware breakpoints already installed. This
implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */
-int
+static int
m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)
{
return sdi_desc != NULL && cnt < max_access_breaks;
@@ -1428,7 +1428,7 @@ m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)
for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write
watchpoint. */
-int
+static int
m32r_insert_watchpoint (CORE_ADDR addr, int len, int type)
{
int i;
@@ -1452,7 +1452,7 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type)
return 1;
}
-int
+static int
m32r_remove_watchpoint (CORE_ADDR addr, int len, int type)
{
int i;
@@ -1473,7 +1473,7 @@ m32r_remove_watchpoint (CORE_ADDR addr, int len, int type)
return 0;
}
-int
+static int
m32r_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
{
int rc = 0;
@@ -1485,7 +1485,7 @@ m32r_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
return rc;
}
-int
+static int
m32r_stopped_by_watchpoint (void)
{
CORE_ADDR addr;
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 60f4c52..108f2a0 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -749,6 +749,9 @@ rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_frame_red_zone_size (gdbarch, 0);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_rs6000_aix_tdep;
+
void
_initialize_rs6000_aix_tdep (void)
{
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 6aaeba9..710b5e3 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -37,6 +37,7 @@
#include "rs6000-tdep.h"
#include "exec.h"
#include "observer.h"
+#include "xcoffread.h"
#include <sys/ptrace.h>
#include <sys/reg.h>
@@ -1191,16 +1192,15 @@ static CORE_ADDR
find_toc_address (CORE_ADDR pc)
{
struct vmap *vp;
- extern CORE_ADDR get_toc_offset (struct objfile *); /* xcoffread.c */
for (vp = vmap; vp; vp = vp->nxt)
{
if (pc >= vp->tstart && pc < vp->tend)
{
/* vp->objfile is only NULL for the exec file. */
- return vp->dstart + get_toc_offset (vp->objfile == NULL
- ? symfile_objfile
- : vp->objfile);
+ return vp->dstart + xcoff_get_toc_offset (vp->objfile == NULL
+ ? symfile_objfile
+ : vp->objfile);
}
}
error (_("Unable to find TOC entry for pc %s."), hex_string (pc));
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 9ca9f44..926d0b6 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -216,7 +216,7 @@ ppc_floating_point_unit_p (struct gdbarch *gdbarch)
/* Return non-zero if the architecture described by GDBARCH has
VSX registers (vsr0 --- vsr63). */
-int
+static int
ppc_vsx_support_p (struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -965,11 +965,11 @@ rs6000_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
/* Fix up the state of registers and memory after having single-stepped
a displaced instruction. */
-void
+static void
ppc_displaced_step_fixup (struct gdbarch *gdbarch,
- struct displaced_step_closure *closure,
- CORE_ADDR from, CORE_ADDR to,
- struct regcache *regs)
+ struct displaced_step_closure *closure,
+ CORE_ADDR from, CORE_ADDR to,
+ struct regcache *regs)
{
/* Since we use simple_displaced_step_copy_insn, our closure is a
copy of the instruction. */
@@ -2107,7 +2107,7 @@ rs6000_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
address of the instruction following that call. Otherwise, it simply
returns PC. */
-CORE_ADDR
+static CORE_ADDR
rs6000_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte buf[4];
@@ -2165,7 +2165,7 @@ rs6000_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
gdbarch_skip_trampoline_code hooks in handle_inferior_event() to skip past
@FIX code. */
-int
+static int
rs6000_in_solib_return_trampoline (CORE_ADDR pc, char *name)
{
return name && !strncmp (name, "@FIX", 4);
@@ -2185,7 +2185,7 @@ rs6000_in_solib_return_trampoline (CORE_ADDR pc, char *name)
Result is desired PC to step until, or NULL if we are not in
code that should be skipped. */
-CORE_ADDR
+static CORE_ADDR
rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 58abb3f..f17be9b 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -419,7 +419,7 @@ static const struct regset s390_fpregset = {
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
-const struct regset *
+static const struct regset *
s390_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index c926489..b86be74 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -2176,7 +2176,7 @@ sh_default_register_type (struct gdbarch *gdbarch, int reg_nr)
The default code in reggroup.c doesn't identify system registers, some
float registers or any of the vector registers.
TODO: sh2a and dsp registers. */
-int
+static int
sh_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *reggroup)
{
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index b1ad3ed..a0cddc5 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -148,7 +148,7 @@ static struct regset shnbsd_gregset =
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
-const struct regset *
+static const struct regset *
shnbsd_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
@@ -198,6 +198,9 @@ shnbsd_core_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_shnbsd_tdep;
+
void
_initialize_shnbsd_tdep (void)
{
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index c770b3e..f48c709 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -556,7 +556,7 @@ frv_in_dynsym_resolve_code (CORE_ADDR pc)
/* Given a loadmap and an address, return the displacement needed
to relocate the address. */
-CORE_ADDR
+static CORE_ADDR
displacement_from_map (struct int_elf32_fdpic_loadmap *map,
CORE_ADDR addr)
{
@@ -1269,6 +1269,9 @@ frv_fetch_objfile_link_map (struct objfile *objfile)
struct target_so_ops frv_so_ops;
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_frv_solib;
+
void
_initialize_frv_solib (void)
{
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
index 9140daf..003f522 100644
--- a/gdb/solib-irix.c
+++ b/gdb/solib-irix.c
@@ -139,7 +139,7 @@ extract_mips_address (void *addr, int len)
this routine automatically determines which (of three) link map
formats is in use by the target. */
-struct lm_info
+static struct lm_info
fetch_lm_info (CORE_ADDR addr)
{
struct lm_info li;
@@ -719,6 +719,9 @@ irix_in_dynsym_resolve_code (CORE_ADDR pc)
struct target_so_ops irix_so_ops;
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_irix_solib;
+
void
_initialize_irix_solib (void)
{
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index 01bda28..8e43c85 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -29,6 +29,7 @@
#include "hppa-tdep.h"
#include "solist.h"
#include "solib.h"
+#include "solib-som.h"
#include <sys/utsname.h>
#include <string.h>
@@ -806,7 +807,8 @@ _initialize_som_solib (void)
som_so_ops.in_dynsym_resolve_code = som_in_dynsym_resolve_code;
}
-void som_solib_select (struct gdbarch *gdbarch)
+void
+som_solib_select (struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
set_solib_ops (gdbarch, &som_so_ops);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index d9d8183..8fab945 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1324,7 +1324,7 @@ sparc_write_pc (struct regcache *regcache, CORE_ADDR pc)
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
-const struct regset *
+static const struct regset *
sparc_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index c6b0517..3af3102 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -353,7 +353,7 @@ sparcnbsd_core_osabi_sniffer (bfd *abfd)
void _initialize_sparcnbsd_tdep (void);
void
-_initialize_sparnbsd_tdep (void)
+_initialize_sparcnbsd_tdep (void)
{
gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_aout_flavour,
sparcnbsd_aout_osabi_sniffer);
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index cbcf1b5..7b35c0e 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1284,7 +1284,7 @@ spu_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr)
/* Software single-stepping support. */
-int
+static int
spu_software_single_step (struct frame_info *frame)
{
CORE_ADDR pc, next_pc;
@@ -2154,6 +2154,9 @@ spu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_spu_tdep;
+
void
_initialize_spu_tdep (void)
{
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 8c2e368..a68f6cd 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -310,7 +310,7 @@ struct vax_frame_cache
struct trad_frame_saved_reg *saved_regs;
};
-struct vax_frame_cache *
+static struct vax_frame_cache *
vax_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct vax_frame_cache *cache;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 825028e..aab3e48 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -39,6 +39,7 @@
#include "coff/xcoff.h"
#include "libxcoff.h"
#include "coff/rs6000.h"
+#include "xcoffread.h"
#include "symtab.h"
#include "gdbtypes.h"
@@ -2836,7 +2837,7 @@ scan_xcoff_symtab (struct objfile *objfile)
/* Return the toc offset value for a given objfile. */
CORE_ADDR
-get_toc_offset (struct objfile *objfile)
+xcoff_get_toc_offset (struct objfile *objfile)
{
if (objfile)
return ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset;
@@ -3028,6 +3029,9 @@ static struct sym_fns xcoff_sym_fns =
NULL /* next: pointer to next struct sym_fns */
};
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_xcoffread;
+
void
_initialize_xcoffread (void)
{
diff --git a/gdb/xcoffread.h b/gdb/xcoffread.h
new file mode 100644
index 0000000..f059610
--- /dev/null
+++ b/gdb/xcoffread.h
@@ -0,0 +1,24 @@
+/* Read AIX xcoff symbol tables and convert to internal format, for GDB.
+ Copyright (C) 2009 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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XCOFF_READ_H
+#define XCOFF_READ_H
+
+extern CORE_ADDR xcoff_get_toc_offset (struct objfile *);
+
+#endif /* xcoffread.h */
diff --git a/gdb/xtensa-linux-tdep.c b/gdb/xtensa-linux-tdep.c
index 240a33b..39a8f9c 100644
--- a/gdb/xtensa-linux-tdep.c
+++ b/gdb/xtensa-linux-tdep.c
@@ -32,6 +32,9 @@ xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_xtensa_linux_tdep;
+
void
_initialize_xtensa_linux_tdep (void)
{
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 0ca54e4..393b60b0 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -2445,7 +2445,7 @@ call0_frame_cache (struct frame_info *this_frame,
/* #define DONT_SKIP_PROLOGUE */
-CORE_ADDR
+static CORE_ADDR
xtensa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct symtab_and_line prologue_sal;
@@ -2534,7 +2534,7 @@ xtensa_verify_config (struct gdbarch *gdbarch)
/* Derive specific register numbers from the array of registers. */
-void
+static void
xtensa_derive_tdep (struct gdbarch_tdep *tdep)
{
xtensa_register_t* rmap;
@@ -2706,6 +2706,9 @@ xtensa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
error (_("xtensa_dump_tdep(): not implemented"));
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_xtensa_tdep;
+
void
_initialize_xtensa_tdep (void)
{