+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.
/* 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)
{
(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)
{
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)
{
}
}
-void
+static void
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (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);
/* 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));
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)
{
/* 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)
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)
{
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_armobsd_tdep;
+
void
_initialize_armobsd_tdep (void)
{
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)
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)
{
unpush_target (bsd_uthread_ops_hack);
}
-void
+static void
bsd_uthread_inferior_created (struct target_ops *ops, int from_tty)
{
bsd_uthread_activate (NULL);
NULL
};
-void
+static void
bsd_uthread_solib_loaded (struct so_list *so)
{
const char **names = bsd_uthread_solib_names;
}
}
-void
+static void
bsd_uthread_solib_unloaded (struct so_list *so)
{
if (!bsd_uthread_solib_name)
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);
return t;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_bsd_uthread;
+
void
_initialize_bsd_uthread (void)
{
cris_sigtramp_frame_sniffer
};
-int
+static int
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *this_frame)
{
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)
{
_("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)
}
}
-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
|| 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
/* 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);
/* 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);
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 *
#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);
--- /dev/null
+/* 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 */
#include "gdb_string.h"
#include "hppa-tdep.h"
+#include "hppabsd-tdep.h"
/* From <machine/mcontext.h>. */
static int hppanbsd_mc_reg_offset[] =
return NULL;
}
\f
-void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
-
static void
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)
#include "gdb_string.h"
#include "hppa-tdep.h"
+#include "hppabsd-tdep.h"
/* Core file support. */
}
\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. */
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)
{
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)
{
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)
{
};
-int
+static int
ia64_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
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)
{
}
-int
+static int
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
/* 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)
return ptr;
}
-void
+static void
m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
int *frame_regnum,
LONGEST *frame_offset)
return arch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m32c_tdep;
void
_initialize_m32c_tdep (void)
clear_symtab_users ();
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m32r_rom;
+
void
_initialize_m32r_rom (void)
{
#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;
}
}
-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)
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)
{
}
}
-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)
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)
{
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;
/* 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);
"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)
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mep_tdep;
void
_initialize_mep_tdep (void)
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)
{
/* Supply a 64-bit register. */
-void
+static void
supply_64bit_reg (struct regcache *regcache, int regnum,
const gdb_byte *buf)
{
/* 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);
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mips_linux_tdep;
+
void
_initialize_mips_linux_tdep (void)
{
| INSN_COND_BRANCH_LIKELY)));
}
-int
+static int
mips_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *frame)
{
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mipsnbsd_tdep;
+
void
_initialize_mipsnbsd_tdep (void)
{
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)
{
tdep->am33_mode);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mn10300_tdep;
+
void
_initialize_mn10300_tdep (void)
{
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_mt_tdep;
+
void
_initialize_mt_tdep (void)
{
#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. */
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;
#endif
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_nto_tdep;
+
void
_initialize_nto_tdep (void)
{
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)
{
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_ppc_linux_tdep;
+
void
_initialize_ppc_linux_tdep (void)
{
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;
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;
return 1;
}
-int
+static int
m32r_remove_watchpoint (CORE_ADDR addr, int len, int type)
{
int i;
return 0;
}
-int
+static int
m32r_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
{
int rc = 0;
return rc;
}
-int
+static int
m32r_stopped_by_watchpoint (void)
{
CORE_ADDR addr;
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)
{
#include "rs6000-tdep.h"
#include "exec.h"
#include "observer.h"
+#include "xcoffread.h"
#include <sys/ptrace.h>
#include <sys/reg.h>
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));
/* 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);
/* 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. */
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];
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);
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));
/* 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)
{
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)
{
/* 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)
{
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_shnbsd_tdep;
+
void
_initialize_shnbsd_tdep (void)
{
/* 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)
{
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)
{
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;
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)
{
#include "hppa-tdep.h"
#include "solist.h"
#include "solib.h"
+#include "solib-som.h"
#include <sys/utsname.h>
#include <string.h>
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);
/* 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)
{
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);
/* Software single-stepping support. */
-int
+static int
spu_software_single_step (struct frame_info *frame)
{
CORE_ADDR pc, next_pc;
return gdbarch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_spu_tdep;
+
void
_initialize_spu_tdep (void)
{
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;
#include "coff/xcoff.h"
#include "libxcoff.h"
#include "coff/rs6000.h"
+#include "xcoffread.h"
#include "symtab.h"
#include "gdbtypes.h"
/* 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;
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)
{
--- /dev/null
+/* 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 */
(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)
{
/* #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;
/* Derive specific register numbers from the array of registers. */
-void
+static void
xtensa_derive_tdep (struct gdbarch_tdep *tdep)
{
xtensa_register_t* rmap;
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)
{