Silence a few -Wmissing-prototypes warnings.
authorPedro Alves <palves@redhat.com>
Sun, 22 Feb 2009 01:02:20 +0000 (01:02 +0000)
committerPedro Alves <palves@redhat.com>
Sun, 22 Feb 2009 01:02:20 +0000 (01:02 +0000)
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.

60 files changed:
gdb/ChangeLog
gdb/alpha-linux-tdep.c
gdb/alpha-osf1-tdep.c
gdb/amd64fbsd-tdep.c
gdb/amd64nbsd-tdep.c
gdb/arm-linux-tdep.c
gdb/armbsd-tdep.c
gdb/armnbsd-tdep.c
gdb/armobsd-tdep.c
gdb/avr-tdep.c
gdb/bsd-uthread.c
gdb/cris-tdep.c
gdb/frv-tdep.c
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/hppa-tdep.h
gdb/hppabsd-tdep.c
gdb/hppabsd-tdep.h [new file with mode: 0644]
gdb/hppanbsd-tdep.c
gdb/hppaobsd-tdep.c
gdb/i386-nto-tdep.c
gdb/i386nbsd-tdep.c
gdb/ia64-linux-tdep.c
gdb/ia64-tdep.c
gdb/iq2000-tdep.c
gdb/m32c-tdep.c
gdb/m32r-rom.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68klinux-tdep.c
gdb/m88k-tdep.c
gdb/mep-tdep.c
gdb/mips-irix-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-tdep.c
gdb/mipsnbsd-tdep.c
gdb/mn10300-linux-tdep.c
gdb/mn10300-tdep.c
gdb/mt-tdep.c
gdb/nbsd-tdep.c
gdb/nto-tdep.c
gdb/ppc-linux-tdep.c
gdb/remote-m32r-sdi.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-nat.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/shnbsd-tdep.c
gdb/solib-frv.c
gdb/solib-irix.c
gdb/solib-som.c
gdb/sparc-tdep.c
gdb/sparcnbsd-tdep.c
gdb/spu-tdep.c
gdb/vax-tdep.c
gdb/xcoffread.c
gdb/xcoffread.h [new file with mode: 0644]
gdb/xtensa-linux-tdep.c
gdb/xtensa-tdep.c

index b79ba28fefc0ffa1a208183576cff3c296fdf436..15f79045756be51da3a8047a6af3d236aab2504d 100644 (file)
@@ -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.
index 9ef9d936696b3ff2bece8cc344cfd94bc64cd8bf..25b6b2d0fa3cde5c19ba8df7de2d0d0f7b8bad23 100644 (file)
@@ -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)
 {
index d171cd6389a102f9041bd9004164b0f8ab6782e8..5fde0e600dfc1d1cacf5737ad6d7dd67049ce661 100644 (file)
@@ -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)
 {
index 625af88419e26d525f3e4d873e645387ab0b7dc8..2400061a282c1c0482bfdb97b594e8748d2717e1 100644 (file)
@@ -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);
index 33967c15e18e450ffebcf54e79e92b41d902a5e0..5b11001c0e2152de1506c848db588c0613b2bcda 100644 (file)
@@ -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);
index fbe80eef257b2354ed9efb3ed7cb60014b6d7eb8..b63d9ae1a34496bf4527e8e70d768262743990aa 100644 (file)
@@ -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)
 {
index 7baf69fa9239506e8c28fa25f9ded90f0c0baceb..b2e12baac365fc781980d5d578352cba408d2479 100644 (file)
@@ -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 c64a521fc60efda15144f358c33524d46883ffe3..2215a8446fb6735fbcea5b43f3b98bf277f27a36 100644 (file)
@@ -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 eddb82a42bb1d1044e013e7ba3c24e179b636673..37bbf811ec2d539c72ad4968efa2f54b965b08df 100644 (file)
@@ -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 dcc4f78da0310909cc0c151451edc5c136b01595..01d04e2962676488bf4451c567783e419aa2bfcf 100644 (file)
@@ -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)
 {
index ecbad76782c205019f4fcdd6557d038566b8b6c7..0d90380c5a74e0dda2cb920dd00efe1ea5d3fd1f 100644 (file)
@@ -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)
 {
index ed66d74583c99466d67894aa0f353210b3f57fa8..63f4ae4fef92c850b6abd27891f7a35cfd024ae8 100644 (file)
@@ -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)
 {
index 9f751d47f9ba4c44db9168beeea16225e896233b..ff387db1bbeddb628285ba6565248b0b45358b60 100644 (file)
@@ -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)
index d68c5ed42c513f83b8529e394da16439e9aa6024..9d679ac94f08ef204b00bce1e48e57c7e6646436 100644 (file)
@@ -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
index 38e38cee0641f4e69e8eb2af486879fc983c4afe..fe29a86a2e4af7ea95c868e2bf2b1f9e9f1f277f 100644 (file)
@@ -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);
index 659ded91976dea442ede9bffec169a0be7fc26f3..4c7b9f7b6f4a728db19bdf62df7082d8d0018f06 100644 (file)
@@ -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 *
index 2954a68e588e5d6ea69c2d10108020b4973e413a..a11243365491e45c3e883f0c46758929e4912c97 100644 (file)
 #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 (file)
index 0000000..0335332
--- /dev/null
@@ -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 2330ac7af2176fed0b46da4f3df53d2689b8a99c..528fa540b6c6d4430a6fbb6514aca392f4909102 100644 (file)
@@ -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;
 }
 \f
-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)
 \f
 
 /* 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 e0ce8821251da6bdb362c29e2a68ef6612bf297d..69655e2650cd01a87aeb8c6bcfc5905e27a6a1c8 100644 (file)
@@ -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,
 }
 \f
 
-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 ede9bf13f10445804b227222f72ef11cb4fe75a2..c99fdc0da45c0836efd4ea74b9d70d6d860dc8a9 100644 (file)
@@ -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)
 {
index 2da669dda3ab196311ac47bae909a550dc9df914..bb6aaf0559e51e18ac7337080c4374a2f8264628 100644 (file)
@@ -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)
 {
index 49d5b721ad59f0ceab16c82d3277bf9f3e041748..3a86c96f74430768630b62959a5874b61ffe0b58 100644 (file)
@@ -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)
 {
index f0201dec71835245b606dea33047671b9610a1a9..6adfae2efe13b260ce63ca30c11fc5e5ff2a235e 100644 (file)
@@ -280,7 +280,7 @@ struct ia64_frame_cache
 
 };
 
-int
+static int
 ia64_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
                          struct reggroup *group)
 {
index 7e699f8f55fcb047ef07d704b32db268ebad8e59..8dfe6b228f6801e3336a18d9869ca832437faabb 100644 (file)
@@ -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)
 {
index 72d438a3bb73a3f6d35ff405fecce892b2bf371d..9fa672bffa4a825a4514d931ff798e82f1404011 100644 (file)
@@ -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)
index 1e10fbdf7f28953b361871ce0f7667db762550e1..a078be6a587856603da8573bca5076c01adc809b 100644 (file)
@@ -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)
 {
index 9f34a6f638033e19d55a1a6e90e93a3a07951a76..5f4b9a648a986254cbb9f348c83e65ce2cd88431 100644 (file)
@@ -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)
index de698126cd03bfacb1ee5a1476ca8e28ed664561..4bde070829fe3487903bd81cc2e5e9e69be4dc3b 100644 (file)
@@ -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)
index b5feab687e8aac8eb4c48fc70d087a3ff76e19c1..5813ee583da738ad112d2505a39e3afc44f5db6f 100644 (file)
@@ -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)
 {
index 79945d6699f1a0e288f542ea20cf8691da38b4c4..9b1084f3cd31086f14829108e28a36c45530c53e 100644 (file)
@@ -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;
index 4905b178d422c78ee937c677abf266fe89fbd4ef..7bc6ccd1a24c84b4c5d603f92d014646b325320c 100644 (file)
@@ -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)
index 6d376cd4ddb2b1e64c07aa0ea36996bedcafdf5d..5ea183cba22b18e2ff2f50535507c2e06e6fc8ef 100644 (file)
@@ -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)
 {
index 6e7a5b23e02bd456e0b3ffa46a9932117be18a89..242196ac790b4ddec2db307d7c9fc44401b8cfb6 100644 (file)
@@ -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)
 {
index fd893486730820b7c908a9efb55add0139ed2638..6c8c4c0c04b72d7f7add3cdf1e0d9c0dc6bc653c 100644 (file)
@@ -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 e9845a8d9e23ac6e73fd59254da91119d44af04b..b9e05473186f8b2b10993519100b257f05269f22 100644 (file)
@@ -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 46912ae369062c8acc270e12b3fc07bbfbcff0ee..98a82e6f339d37627ff6253ed2d4fcf71915ac1b 100644 (file)
@@ -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)
 {
index 7d8c97b6a3a85c73dd1c67f0682bfd4d981bdb22..f0cea27ee3d8ad33452da3d8e4d62814e371bb26 100644 (file)
@@ -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)
 {
index a75227c31a0fc5cc63b6356173c55b24c2e9d78e..28f8b46fa1d3abc48f90de8e8d45d382cd9d955d 100644 (file)
@@ -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)
 {
index 20910f2aedecc20e3b3e427aa2ffb0f5dbf6f7ed..72f5a9b092c9321f527dcdc3e5461ed1aa10aa66 100644 (file)
@@ -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 226ebcee0c7ec302faeb5452a4355f97ddeef2ad..193f83ca438d88205f0f1d42d83f02df79c881fd 100644 (file)
@@ -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 7f1318856f1ff33c475281471ae47cc941d639b6..d08d4fc2e233c5bedd53bbf46ef2553a10e17b25 100644 (file)
    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)
 {
index 357b330a68a7a64faa980d9473fe9c46d358efe0..d0b52ea9951f7467e0b22e396bbe22f97ebfac0a 100644 (file)
@@ -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;
index 60f4c525b80ffe0e6e7efc10c12a93eda28d2afe..108f2a0ba236d3d7fed11817279b7467c291abbf 100644 (file)
@@ -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)
 {
index 6aaeba929889fbffc86260b423faa8675ef41a5a..710b5e3d5c091e4d973ea84a4a9e3b23333fd1c2 100644 (file)
@@ -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 9ca9f441f4abe44b31390dfb2c66a11dc4573ca1..926d0b6784718dac1334806ffb4ff3af17e52446 100644 (file)
@@ -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));
index 58abb3fbc861c831917ff635d26bb72c34b5d8fe..f17be9b5418a92df224dccfd5f8587d0867954ec 100644 (file)
@@ -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 c926489a633c3b5d2dc8bf5f0a2f7b7d0415daeb..b86be746f7a8deacbc7c1e2fd70204f8c22b83f1 100644 (file)
@@ -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)
 {
index b1ad3ed59576ca5996756860cd21fe9a02c572cb..a0cddc5b6a9117d3ab4ce5ee84fbf68b60d15e87 100644 (file)
@@ -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 c770b3e75bf3d9eb22a3df5ef2e1e12ea948d774..f48c709af1e33205f0c45cfc2137586dd49c3d78 100644 (file)
@@ -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)
 {
index 9140dafac19f0c96565a1ce250717bea5c9def25..003f5221565275b3e24f175c5399847e6c0800fa 100644 (file)
@@ -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)
 {
index 01bda28a08139f25cd33ff2666eecde52ea7be1b..8e43c8502e6bf0caaff8d9bab1b8a85267d6faa5 100644 (file)
@@ -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 d9d8183a1ef0b44b816d0478ac897ff3cd8d5777..8fab945056813f82127ff06a73da9280b2fa162a 100644 (file)
@@ -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)
 {
index c6b0517fb0ed5f0314da5b665651e7bdc142e962..3af3102c411b795770a4865fcba2c4f24fbf7986 100644 (file)
@@ -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 cbcf1b58e7e5cc716124a66222b41948dd7c3df4..7b35c0ef63beb57f5010cf264f04ba8706a15f23 100644 (file)
@@ -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)
 {
index 8c2e368ac96e76fa855972f3fb7beb98cd299e49..a68f6cdfa54ad84b6f9e5e2350f650bf5f531b95 100644 (file)
@@ -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 825028e398d86f6f7503eca6d49489cabab874e0..aab3e48236a13bd3f2ba1c625957c26f7c68a57a 100644 (file)
@@ -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 (file)
index 0000000..f059610
--- /dev/null
@@ -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 240a33b088dd1297ca26d02b3210e47dae677734..39a8f9c0c739b24dad9aae557d2219234f141f51 100644 (file)
@@ -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)
 {
index 0ca54e403ff2cd8fbd8c642ad1e883767d336ac0..393b60b08da3ea59fc2269608b29cd840375a7ee 100644 (file)
@@ -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)
 {
This page took 0.051474 seconds and 4 git commands to generate.