summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-03-02 00:06:11 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-03-02 00:06:11 +0000
commitcdea452b9c1e0dde1a8663fd12e09c5f3c160dd0 (patch)
treea421cfcb5ad15b5e02a27442d1f361c8c4897f54
parentc53b1649cbc30746659af45cd4a97426c0ccec23 (diff)
downloadgdb-cdea452b9c1e0dde1a8663fd12e09c5f3c160dd0.tar.gz
gdb/
Fix -Wmissing-prototypes build. * alpha-tdep.c (alpha_deal_with_atomic_sequence): Make it static. * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): New prototype. * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Likewise. * arm-symbian-tdep.c (arm_symbian_skip_trampoline_code): Make it static. (_initialize_arm_symbian_tdep): New prototype. * arm-wince-tdep.c (arm_wince_skip_main_prologue): Make it static. * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): New prototype. * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Make it static. * lm32-tdep.c (_initialize_lm32_tdep): New prototype. * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): New prototype. * microblaze-tdep.c (microblaze_debug, microblaze_fetch_instruction) (microblaze_skip_prologue, microblaze_frame_cache): Make them static. * mips-linux-tdep.c (mips_linux_regset_from_core_section): Make it static. * moxie-tdep.c (moxie_process_record): Likewise. * remote-mips.c (mips_can_use_watchpoint, mips_insert_watchpoint) (mips_remove_watchpoint, mips_stopped_by_watchpoint): Make them static. * rl78-tdep.c (rl78_breakpoint_from_pc): Make it static. (_initialize_rl78_tdep): New prototype. * rx-tdep.c (rx_breakpoint_from_pc): Make it static. (_initialize_rx_tdep): New prototype. * solib-darwin.c (darwin_in_dynsym_resolve_code): Make it static. (_initialize_darwin_solib): New prototype. * solib-spu.c: Include solib-spu.h. (_initialize_spu_solib): New prototype. * spu-multiarch.c (_initialize_spu_multiarch): New prototype. * tic6x-tdep.c (tic6x_analyze_prologue, tic6x_skip_prologue) (tic6x_breakpoint_from_pc, tic6x_frame_unwind_cache) (tic6x_software_single_step): Make it static. (_initialize_tic6x_tdep): New prototype.
-rw-r--r--gdb/ChangeLog36
-rw-r--r--gdb/alpha-tdep.c2
-rw-r--r--gdb/amd64-darwin-tdep.c3
-rw-r--r--gdb/amd64-windows-tdep.c3
-rw-r--r--gdb/arm-symbian-tdep.c5
-rw-r--r--gdb/arm-wince-tdep.c2
-rw-r--r--gdb/i386-darwin-tdep.c3
-rw-r--r--gdb/i386-linux-tdep.c2
-rw-r--r--gdb/lm32-tdep.c3
-rw-r--r--gdb/microblaze-linux-tdep.c3
-rw-r--r--gdb/microblaze-tdep.c8
-rw-r--r--gdb/mips-linux-tdep.c2
-rw-r--r--gdb/moxie-tdep.c2
-rw-r--r--gdb/remote-mips.c8
-rw-r--r--gdb/rl78-tdep.c5
-rw-r--r--gdb/rx-tdep.c6
-rw-r--r--gdb/solib-darwin.c5
-rw-r--r--gdb/solib-spu.c4
-rw-r--r--gdb/spu-multiarch.c3
-rw-r--r--gdb/tic6x-tdep.c13
20 files changed, 96 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f1bee2afc7d..4a446f78a79 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,6 +1,42 @@
2012-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix -Wmissing-prototypes build.
+ * alpha-tdep.c (alpha_deal_with_atomic_sequence): Make it static.
+ * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): New prototype.
+ * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Likewise.
+ * arm-symbian-tdep.c (arm_symbian_skip_trampoline_code): Make it static.
+ (_initialize_arm_symbian_tdep): New prototype.
+ * arm-wince-tdep.c (arm_wince_skip_main_prologue): Make it static.
+ * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): New prototype.
+ * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Make it
+ static.
+ * lm32-tdep.c (_initialize_lm32_tdep): New prototype.
+ * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): New
+ prototype.
+ * microblaze-tdep.c (microblaze_debug, microblaze_fetch_instruction)
+ (microblaze_skip_prologue, microblaze_frame_cache): Make them static.
+ * mips-linux-tdep.c (mips_linux_regset_from_core_section): Make it
+ static.
+ * moxie-tdep.c (moxie_process_record): Likewise.
+ * remote-mips.c (mips_can_use_watchpoint, mips_insert_watchpoint)
+ (mips_remove_watchpoint, mips_stopped_by_watchpoint): Make them static.
+ * rl78-tdep.c (rl78_breakpoint_from_pc): Make it static.
+ (_initialize_rl78_tdep): New prototype.
+ * rx-tdep.c (rx_breakpoint_from_pc): Make it static.
+ (_initialize_rx_tdep): New prototype.
+ * solib-darwin.c (darwin_in_dynsym_resolve_code): Make it static.
+ (_initialize_darwin_solib): New prototype.
+ * solib-spu.c: Include solib-spu.h.
+ (_initialize_spu_solib): New prototype.
+ * spu-multiarch.c (_initialize_spu_multiarch): New prototype.
+ * tic6x-tdep.c (tic6x_analyze_prologue, tic6x_skip_prologue)
+ (tic6x_breakpoint_from_pc, tic6x_frame_unwind_cache)
+ (tic6x_software_single_step): Make it static.
+ (_initialize_tic6x_tdep): New prototype.
+
+2012-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix -Wmissing-prototypes build.
* cris-tdep.c (cris_can_use_hardware_watchpoint)
(cris_region_ok_for_watchpoint, cris_stopped_data_address): Remove.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 80f5098f934..856aa0d17c6 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -771,7 +771,7 @@ static const int stq_c_opcode = 0x2f;
is found, attempt to step through it. A breakpoint is placed at the end of
the sequence. */
-int
+static int
alpha_deal_with_atomic_sequence (struct frame_info *frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index 78b805abfc6..6a5d4a4571a 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -120,6 +120,9 @@ x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_ops (gdbarch, &darwin_so_ops);
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_amd64_darwin_tdep;
+
void
_initialize_amd64_darwin_tdep (void)
{
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 29fd71a5bad..2b94eca9d9f 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -177,6 +177,9 @@ amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_ops (gdbarch, &solib_target_so_ops);
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_amd64_windows_tdep;
+
void
_initialize_amd64_windows_tdep (void)
{
diff --git a/gdb/arm-symbian-tdep.c b/gdb/arm-symbian-tdep.c
index 7994a9cf640..cc4a784f232 100644
--- a/gdb/arm-symbian-tdep.c
+++ b/gdb/arm-symbian-tdep.c
@@ -29,7 +29,7 @@
/* If PC is in a DLL import stub, return the address of the `real'
function belonging to the stub. */
-CORE_ADDR
+static CORE_ADDR
arm_symbian_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch;
@@ -121,6 +121,9 @@ arm_symbian_osabi_sniffer (bfd *abfd)
return GDB_OSABI_SYMBIAN;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_arm_symbian_tdep;
+
void
_initialize_arm_symbian_tdep (void)
{
diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c
index 5463f6a3ea7..5bc6473468a 100644
--- a/gdb/arm-wince-tdep.c
+++ b/gdb/arm-wince-tdep.c
@@ -84,7 +84,7 @@ arm_pe_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
the address of the instruction following that call. Otherwise, it
simply returns PC. */
-CORE_ADDR
+static CORE_ADDR
arm_wince_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
index 2e3fe9eb506..ed2ca124394 100644
--- a/gdb/i386-darwin-tdep.c
+++ b/gdb/i386-darwin-tdep.c
@@ -287,6 +287,9 @@ i386_mach_o_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_i386_darwin_tdep;
+
void
_initialize_i386_darwin_tdep (void)
{
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 4ea596cd7ca..bee4a6d5ddc 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -682,7 +682,7 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
which does not seem worth it. The same effect is achieved by patching that
'nop' instruction there instead. */
-struct displaced_step_closure *
+static struct displaced_step_closure *
i386_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs)
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 06584af5715..4f67542f9f4 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -590,6 +590,9 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_lm32_tdep;
+
void
_initialize_lm32_tdep (void)
{
diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c
index 14c68da7239..6935ba59d4f 100644
--- a/gdb/microblaze-linux-tdep.c
+++ b/gdb/microblaze-linux-tdep.c
@@ -137,6 +137,9 @@ microblaze_linux_init_abi (struct gdbarch_info info,
&microblaze_linux_sighandler_tramp_frame);
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_microblaze_linux_tdep;
+
void
_initialize_microblaze_linux_tdep (void)
{
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 6aea41ed55b..3ce3d1cd6d8 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -81,7 +81,7 @@ static const char *microblaze_register_names[] =
static int microblaze_debug_flag = 0;
-void
+static void
microblaze_debug (const char *fmt, ...)
{
if (microblaze_debug_flag)
@@ -120,7 +120,7 @@ microblaze_register_type (struct gdbarch *gdbarch, int regnum)
/* Fetch the instruction at PC. */
-unsigned long
+static unsigned long
microblaze_fetch_instruction (CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
@@ -426,7 +426,7 @@ microblaze_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
/* Return PC of first real instruction of the function starting at
START_PC. */
-CORE_ADDR
+static CORE_ADDR
microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
struct symtab_and_line sal;
@@ -456,7 +456,7 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
/* Normal frames. */
-struct microblaze_frame_cache *
+static struct microblaze_frame_cache *
microblaze_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct microblaze_frame_cache *cache;
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index dea0bf7b4c6..47af572f245 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -581,7 +581,7 @@ mips64_fill_fpregset_wrapper (const struct regset *regset,
mips64_fill_fpregset (regcache, (mips64_elf_fpregset_t *)gregs, regnum);
}
-const struct regset *
+static const struct regset *
mips_linux_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index d55e89642cf..1f5f33f2428 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -516,7 +516,7 @@ moxie_process_readu (CORE_ADDR addr, char *buf,
memory that will be changed in current instruction to "record_arch_list".
Return -1 if something wrong. */
-int
+static int
moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr)
{
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 5e197df01aa..a20fc2cd5c8 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -2384,7 +2384,7 @@ mips_remove_breakpoint (struct gdbarch *gdbarch,
is the number of hardware breakpoints already installed. This
implements the target_can_use_hardware_watchpoint macro. */
-int
+static int
mips_can_use_watchpoint (int type, int cnt, int othertype)
{
return cnt < MAX_LSI_BREAKPOINTS && strcmp (target_shortname, "lsi") == 0;
@@ -2418,7 +2418,7 @@ calculate_mask (CORE_ADDR addr, int len)
for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write
watchpoint. */
-int
+static int
mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
struct expression *cond)
{
@@ -2430,7 +2430,7 @@ mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
/* Remove a watchpoint. */
-int
+static int
mips_remove_watchpoint (CORE_ADDR addr, int len, int type,
struct expression *cond)
{
@@ -2443,7 +2443,7 @@ mips_remove_watchpoint (CORE_ADDR addr, int len, int type,
/* Test to see if a watchpoint has been hit. Return 1 if so; return 0,
if not. */
-int
+static int
mips_stopped_by_watchpoint (void)
{
return hit_watchpoint;
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 8282225391b..7a847692382 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -556,7 +556,7 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
/* Implement the "breakpoint_from_pc" gdbarch method. */
-const gdb_byte *
+static const gdb_byte *
rl78_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
int *lenptr)
{
@@ -1162,6 +1162,9 @@ rl78_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_rl78_tdep;
+
/* Register the above initialization routine. */
void
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 35ae6f614f5..95d9e3d9145 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -756,7 +756,7 @@ rx_return_value (struct gdbarch *gdbarch,
}
/* Implement the "breakpoint_from_pc" gdbarch method. */
-const gdb_byte *
+static const gdb_byte *
rx_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
{
static gdb_byte breakpoint[] = { 0x00 };
@@ -859,7 +859,11 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_rx_tdep;
+
/* Register the above initialization routine. */
+
void
_initialize_rx_tdep (void)
{
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 93a6aae2f98..4f2cda678a7 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -299,7 +299,7 @@ darwin_current_sos (void)
/* Return 1 if PC lies in the dynamic symbol resolution code of the
run time loader. */
-int
+static int
darwin_in_dynsym_resolve_code (CORE_ADDR pc)
{
return 0;
@@ -487,6 +487,9 @@ darwin_bfd_open (char *pathname)
struct target_so_ops darwin_so_ops;
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_darwin_solib;
+
void
_initialize_darwin_solib (void)
{
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index a4772127d25..150ff0feaec 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "solib-spu.h"
#include "gdbcore.h"
#include "gdb_string.h"
#include "gdb_assert.h"
@@ -541,6 +542,9 @@ spu_solib_loaded (struct so_list *so)
}
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_spu_solib;
+
void
_initialize_spu_solib (void)
{
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index 73a59366009..313fddc8ff4 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -401,6 +401,9 @@ init_spu_ops (void)
spu_ops.to_magic = OPS_MAGIC;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_spu_multiarch;
+
void
_initialize_spu_multiarch (void)
{
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 2661cb28c4c..2dce8da0723 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -146,7 +146,7 @@ static int tic6x_register_number (int reg, int side, int crosspath);
Bail out early if CURRENT_PC is reached. Returns the address of the first
instruction after the prologue. */
-CORE_ADDR
+static CORE_ADDR
tic6x_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc,
const CORE_ADDR current_pc,
struct tic6x_unwind_cache *cache,
@@ -298,7 +298,7 @@ tic6x_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc,
/* This is the implementation of gdbarch method skip_prologue. */
-CORE_ADDR
+static CORE_ADDR
tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
CORE_ADDR limit_pc;
@@ -324,7 +324,7 @@ tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
/* This is the implementation of gdbarch method breakpiont_from_pc. */
-const unsigned char*
+static const unsigned char*
tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
int *bp_size)
{
@@ -398,7 +398,7 @@ tic6x_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
/* Frame base handling. */
-struct tic6x_unwind_cache*
+static struct tic6x_unwind_cache*
tic6x_frame_unwind_cache (struct frame_info *this_frame,
void **this_prologue_cache)
{
@@ -698,7 +698,7 @@ tic6x_get_next_pc (struct frame_info *frame, CORE_ADDR pc)
/* This is the implementation of gdbarch method software_single_step. */
-int
+static int
tic6x_software_single_step (struct frame_info *frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1377,6 +1377,9 @@ tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_tic6x_tdep;
+
void
_initialize_tic6x_tdep (void)
{