This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Silence a bunch more -Wmissing-prototypes warnings


This fixes most warnings caught when building with -Wmissing-prototypes on
x86_64-linux with --enable-targets=all.

This caught a few funny typos in the _initialize_FOO function names
and declarations...

Checked in.

-- 
Pedro Alves

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.

---
 gdb/alpha-linux-tdep.c   |    5 ++++-
 gdb/alpha-osf1-tdep.c    |    3 +++
 gdb/amd64fbsd-tdep.c     |    2 +-
 gdb/amd64nbsd-tdep.c     |    2 +-
 gdb/arm-linux-tdep.c     |    5 ++++-
 gdb/armbsd-tdep.c        |    2 +-
 gdb/armnbsd-tdep.c       |    3 +++
 gdb/armobsd-tdep.c       |    3 +++
 gdb/avr-tdep.c           |    4 ++--
 gdb/bsd-uthread.c        |   11 +++++++----
 gdb/cris-tdep.c          |    4 ++--
 gdb/frv-tdep.c           |    2 +-
 gdb/h8300-tdep.c         |    4 ++--
 gdb/hppa-tdep.c          |    4 ++--
 gdb/hppa-tdep.h          |    2 --
 gdb/hppabsd-tdep.c       |    3 ++-
 gdb/hppabsd-tdep.h       |   25 +++++++++++++++++++++++++
 gdb/hppanbsd-tdep.c      |    5 ++---
 gdb/hppaobsd-tdep.c      |    5 ++---
 gdb/i386-nto-tdep.c      |    3 +++
 gdb/i386nbsd-tdep.c      |    3 +++
 gdb/ia64-linux-tdep.c    |    3 +++
 gdb/ia64-tdep.c          |    2 +-
 gdb/iq2000-tdep.c        |    3 +++
 gdb/m32c-tdep.c          |    8 +++++---
 gdb/m32r-rom.c           |    3 +++
 gdb/m32r-tdep.c          |    4 ++--
 gdb/m68hc11-tdep.c       |    4 ++--
 gdb/m68klinux-tdep.c     |    3 +++
 gdb/m88k-tdep.c          |    2 +-
 gdb/mep-tdep.c           |    6 ++++--
 gdb/mips-irix-tdep.c     |    3 +++
 gdb/mips-linux-tdep.c    |    7 +++++--
 gdb/mips-tdep.c          |    2 +-
 gdb/mipsnbsd-tdep.c      |    3 +++
 gdb/mn10300-linux-tdep.c |    3 +++
 gdb/mn10300-tdep.c       |    3 +++
 gdb/mt-tdep.c            |    3 +++
 gdb/nbsd-tdep.c          |    1 +
 gdb/nto-tdep.c           |    5 ++++-
 gdb/ppc-linux-tdep.c     |    5 ++++-
 gdb/remote-m32r-sdi.c    |   10 +++++-----
 gdb/rs6000-aix-tdep.c    |    3 +++
 gdb/rs6000-nat.c         |    8 ++++----
 gdb/rs6000-tdep.c        |   16 ++++++++--------
 gdb/s390-tdep.c          |    2 +-
 gdb/sh-tdep.c            |    2 +-
 gdb/shnbsd-tdep.c        |    5 ++++-
 gdb/solib-frv.c          |    5 ++++-
 gdb/solib-irix.c         |    5 ++++-
 gdb/solib-som.c          |    4 +++-
 gdb/sparc-tdep.c         |    2 +-
 gdb/sparcnbsd-tdep.c     |    2 +-
 gdb/spu-tdep.c           |    5 ++++-
 gdb/vax-tdep.c           |    2 +-
 gdb/xcoffread.c          |    6 +++++-
 gdb/xcoffread.h          |   24 ++++++++++++++++++++++++
 gdb/xtensa-linux-tdep.c  |    3 +++
 gdb/xtensa-tdep.c        |    7 +++++--
 59 files changed, 211 insertions(+), 73 deletions(-)

Index: src/gdb/alpha-linux-tdep.c
===================================================================
--- src.orig/gdb/alpha-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/alpha-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -191,7 +191,7 @@ static struct regset alpha_linux_fpregse
 /* 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_inf
     (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)
 {
Index: src/gdb/alpha-osf1-tdep.c
===================================================================
--- src.orig/gdb/alpha-osf1-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/alpha-osf1-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -65,6 +65,9 @@ alpha_osf1_init_abi (struct gdbarch_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)
 {
Index: src/gdb/amd64fbsd-tdep.c
===================================================================
--- src.orig/gdb/amd64fbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/amd64fbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -181,7 +181,7 @@ amd64fbsd_collect_uthread (const struct 
     }
 }
 
-void
+static void
 amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
Index: src/gdb/amd64nbsd-tdep.c
===================================================================
--- src.orig/gdb/amd64nbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/amd64nbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -125,7 +125,7 @@ amd64nbsd_init_abi (struct gdbarch_info 
 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);
Index: src/gdb/arm-linux-tdep.c
===================================================================
--- src.orig/gdb/arm-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/arm-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -572,7 +572,7 @@ arm_linux_regset_from_core_section (stru
 
 /* 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 
   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)
 {
Index: src/gdb/armbsd-tdep.c
===================================================================
--- src.orig/gdb/armbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/armbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
Index: src/gdb/armnbsd-tdep.c
===================================================================
--- src.orig/gdb/armnbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/armnbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/armobsd-tdep.c
===================================================================
--- src.orig/gdb/armobsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/armobsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/avr-tdep.c
===================================================================
--- src.orig/gdb/avr-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/avr-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -833,7 +833,7 @@ avr_extract_return_value (struct type *t
    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 *gdbarc
    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)
 {
Index: src/gdb/bsd-uthread.c
===================================================================
--- src.orig/gdb/bsd-uthread.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/bsd-uthread.c	2009-02-22 00:58:34.000000000 +0000
@@ -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_nam
   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
     }
 }
 
-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_op
   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)
 {
Index: src/gdb/cris-tdep.c
===================================================================
--- src.orig/gdb/cris-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/cris-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -453,7 +453,7 @@ static const struct frame_unwind cris_si
   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)
 {
Index: src/gdb/frv-tdep.c
===================================================================
--- src.orig/gdb/frv-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/frv-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1325,7 +1325,7 @@ frv_store_return_value (struct type *typ
                     _("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)
Index: src/gdb/h8300-tdep.c
===================================================================
--- src.orig/gdb/h8300-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/h8300-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -798,7 +798,7 @@ h8300h_extract_return_value (struct type
     }
 }
 
-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
 	   || 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
Index: src/gdb/hppa-tdep.c
===================================================================
--- src.orig/gdb/hppa-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/hppa-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -73,7 +73,7 @@ const struct objfile_data *hppa_objfile_
 /* 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
 
 /* 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);
Index: src/gdb/hppa-tdep.h
===================================================================
--- src.orig/gdb/hppa-tdep.h	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/hppa-tdep.h	2009-02-22 00:58:34.000000000 +0000
@@ -222,8 +222,6 @@ unsigned hppa_extract_5r_store (unsigned
 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 *
Index: src/gdb/hppabsd-tdep.c
===================================================================
--- src.orig/gdb/hppabsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/hppabsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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);
Index: src/gdb/hppabsd-tdep.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ src/gdb/hppabsd-tdep.h	2009-02-22 00:58:34.000000000 +0000
@@ -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 */
Index: src/gdb/hppanbsd-tdep.c
===================================================================
--- src.orig/gdb/hppanbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/hppanbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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 (struc
   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 i
 
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_hppabsd_tdep (void);
+extern initialize_file_ftype _initialize_hppanbsd_tdep;
 
 void
 _initialize_hppanbsd_tdep (void)
Index: src/gdb/hppaobsd-tdep.c
===================================================================
--- src.orig/gdb/hppaobsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/hppaobsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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 (struc
 }
 
 
-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.  */
Index: src/gdb/i386-nto-tdep.c
===================================================================
--- src.orig/gdb/i386-nto-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/i386-nto-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -302,6 +302,9 @@ i386nto_init_abi (struct gdbarch_info in
   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)
 {
Index: src/gdb/i386nbsd-tdep.c
===================================================================
--- src.orig/gdb/i386nbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/i386nbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -320,6 +320,9 @@ i386nbsdelf_init_abi (struct gdbarch_inf
   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)
 {
Index: src/gdb/ia64-linux-tdep.c
===================================================================
--- src.orig/gdb/ia64-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/ia64-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -139,6 +139,9 @@ ia64_linux_init_abi (struct gdbarch_info
                                              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)
 {
Index: src/gdb/ia64-tdep.c
===================================================================
--- src.orig/gdb/ia64-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/ia64-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -280,7 +280,7 @@ struct ia64_frame_cache
 
 };
 
-int
+static int
 ia64_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 			  struct reggroup *group)
 {
Index: src/gdb/iq2000-tdep.c
===================================================================
--- src.orig/gdb/iq2000-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/iq2000-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -842,6 +842,9 @@ iq2000_gdbarch_init (struct gdbarch_info
    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)
 {
Index: src/gdb/m32c-tdep.c
===================================================================
--- src.orig/gdb/m32c-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m32c-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -261,7 +261,7 @@ m32c_debug_info_reg_to_regnum (struct gd
 }
 
 
-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,
 /* 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 typ
   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 i
   return arch;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_m32c_tdep;
 
 void
 _initialize_m32c_tdep (void)
Index: src/gdb/m32r-rom.c
===================================================================
--- src.orig/gdb/m32r-rom.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m32r-rom.c	2009-02-22 00:58:34.000000000 +0000
@@ -550,6 +550,9 @@ m32r_upload_command (char *args, int fro
   clear_symtab_users ();
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_m32r_rom;
+
 void
 _initialize_m32r_rom (void)
 {
Index: src/gdb/m32r-tdep.c
===================================================================
--- src.orig/gdb/m32r-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m32r-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -449,7 +449,7 @@ decode_prologue (CORE_ADDR start_pc, COR
 
 #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 *
     }
 }
 
-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)
Index: src/gdb/m68hc11-tdep.c
===================================================================
--- src.orig/gdb/m68hc11-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m68hc11-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -771,7 +771,7 @@ m68hc11_unwind_pc (struct gdbarch *gdbar
    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 typ
     }
 }
 
-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)
Index: src/gdb/m68klinux-tdep.c
===================================================================
--- src.orig/gdb/m68klinux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m68klinux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -364,6 +364,9 @@ m68k_linux_init_abi (struct gdbarch_info
                                              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)
 {
Index: src/gdb/m88k-tdep.c
===================================================================
--- src.orig/gdb/m88k-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/m88k-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -644,7 +644,7 @@ m88k_skip_prologue (struct gdbarch *gdba
   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;
Index: src/gdb/mep-tdep.c
===================================================================
--- src.orig/gdb/mep-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mep-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1267,7 +1267,7 @@ mep_pseudo_register_write (struct gdbarc
 
 /* 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 *
            "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 in
   return gdbarch;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mep_tdep;
 
 void
 _initialize_mep_tdep (void)
Index: src/gdb/mips-irix-tdep.c
===================================================================
--- src.orig/gdb/mips-irix-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mips-irix-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -84,6 +84,9 @@ mips_irix_init_abi (struct gdbarch_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)
 {
Index: src/gdb/mips-linux-tdep.c
===================================================================
--- src.orig/gdb/mips-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mips-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -280,7 +280,7 @@ mips64_linux_get_longjmp_target (struct 
 
 /* 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
 /* 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
     }
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mips_linux_tdep;
+
 void
 _initialize_mips_linux_tdep (void)
 {
Index: src/gdb/mips-tdep.c
===================================================================
--- src.orig/gdb/mips-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mips-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/mipsnbsd-tdep.c
===================================================================
--- src.orig/gdb/mipsnbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mipsnbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/mn10300-linux-tdep.c
===================================================================
--- src.orig/gdb/mn10300-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mn10300-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -720,6 +720,9 @@ am33_linux_init_osabi (struct gdbarch_in
   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)
 {
Index: src/gdb/mn10300-tdep.c
===================================================================
--- src.orig/gdb/mn10300-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mn10300-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1217,6 +1217,9 @@ mn10300_dump_tdep (struct gdbarch *gdbar
 		      tdep->am33_mode);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mn10300_tdep;
+
 void
 _initialize_mn10300_tdep (void)
 {
Index: src/gdb/mt-tdep.c
===================================================================
--- src.orig/gdb/mt-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/mt-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1169,6 +1169,9 @@ mt_gdbarch_init (struct gdbarch_info inf
   return gdbarch;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mt_tdep;
+
 void
 _initialize_mt_tdep (void)
 {
Index: src/gdb/nbsd-tdep.c
===================================================================
--- src.orig/gdb/nbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/nbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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.  */
Index: src/gdb/nto-tdep.c
===================================================================
--- src.orig/gdb/nto-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/nto-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/ppc-linux-tdep.c
===================================================================
--- src.orig/gdb/ppc-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/ppc-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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 
     }
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_ppc_linux_tdep;
+
 void
 _initialize_ppc_linux_tdep (void)
 {
Index: src/gdb/remote-m32r-sdi.c
===================================================================
--- src.orig/gdb/remote-m32r-sdi.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/remote-m32r-sdi.c	2009-02-22 00:58:34.000000000 +0000
@@ -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, in
    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, 
   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, 
   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
   return rc;
 }
 
-int
+static int
 m32r_stopped_by_watchpoint (void)
 {
   CORE_ADDR addr;
Index: src/gdb/rs6000-aix-tdep.c
===================================================================
--- src.orig/gdb/rs6000-aix-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/rs6000-aix-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -749,6 +749,9 @@ rs6000_aix_init_osabi (struct gdbarch_in
     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)
 {
Index: src/gdb/rs6000-nat.c
===================================================================
--- src.orig/gdb/rs6000-nat.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/rs6000-nat.c	2009-02-22 00:58:34.000000000 +0000
@@ -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));
Index: src/gdb/rs6000-tdep.c
===================================================================
--- src.orig/gdb/rs6000-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/rs6000-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -216,7 +216,7 @@ ppc_floating_point_unit_p (struct gdbarc
 
 /* 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 gdbarc
 
 /* 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 *gd
    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 *gdba
    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_
    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));
Index: src/gdb/s390-tdep.c
===================================================================
--- src.orig/gdb/s390-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/s390-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/sh-tdep.c
===================================================================
--- src.orig/gdb/sh-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/sh-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -2176,7 +2176,7 @@ sh_default_register_type (struct gdbarch
    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)
 {
Index: src/gdb/shnbsd-tdep.c
===================================================================
--- src.orig/gdb/shnbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/shnbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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)
 {
Index: src/gdb/solib-frv.c
===================================================================
--- src.orig/gdb/solib-frv.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/solib-frv.c	2009-02-22 00:58:34.000000000 +0000
@@ -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 objfi
 
 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)
 {
Index: src/gdb/solib-irix.c
===================================================================
--- src.orig/gdb/solib-irix.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/solib-irix.c	2009-02-22 00:58:34.000000000 +0000
@@ -139,7 +139,7 @@ extract_mips_address (void *addr, int le
    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 p
 
 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)
 {
Index: src/gdb/solib-som.c
===================================================================
--- src.orig/gdb/solib-som.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/solib-som.c	2009-02-22 00:58:34.000000000 +0000
@@ -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);
Index: src/gdb/sparc-tdep.c
===================================================================
--- src.orig/gdb/sparc-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/sparc-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1324,7 +1324,7 @@ sparc_write_pc (struct regcache *regcach
 /* 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)
 {
Index: src/gdb/sparcnbsd-tdep.c
===================================================================
--- src.orig/gdb/sparcnbsd-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/sparcnbsd-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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);
Index: src/gdb/spu-tdep.c
===================================================================
--- src.orig/gdb/spu-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/spu-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -1284,7 +1284,7 @@ spu_breakpoint_from_pc (struct gdbarch *
 
 /* 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 in
   return gdbarch;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_spu_tdep;
+
 void
 _initialize_spu_tdep (void)
 {
Index: src/gdb/vax-tdep.c
===================================================================
--- src.orig/gdb/vax-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/vax-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -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;
Index: src/gdb/xcoffread.c
===================================================================
--- src.orig/gdb/xcoffread.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/xcoffread.c	2009-02-22 00:58:34.000000000 +0000
@@ -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 *objfi
 /* 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)
 {
Index: src/gdb/xcoffread.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ src/gdb/xcoffread.h	2009-02-22 00:58:34.000000000 +0000
@@ -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 */
Index: src/gdb/xtensa-linux-tdep.c
===================================================================
--- src.orig/gdb/xtensa-linux-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/xtensa-linux-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -32,6 +32,9 @@ xtensa_linux_init_abi (struct gdbarch_in
     (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)
 {
Index: src/gdb/xtensa-tdep.c
===================================================================
--- src.orig/gdb/xtensa-tdep.c	2009-02-22 00:57:55.000000000 +0000
+++ src/gdb/xtensa-tdep.c	2009-02-22 00:58:34.000000000 +0000
@@ -2445,7 +2445,7 @@ call0_frame_cache (struct frame_info *th
 
 /* #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 *gd
 
 /* 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 *gdbarc
   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)
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]