aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-03-01 21:14:00 +0000
committerPedro Alves <palves@redhat.com>2012-03-01 21:14:00 +0000
commit70221824e31ba9c4e8cc710f11c986c37c947310 (patch)
treecd263f2e29ae032c32defaac193a3f38629b8a90
parent33fbcbee30e6565db27a4c5076ff61c9fc8e0744 (diff)
downloadgdb-70221824e31ba9c4e8cc710f11c986c37c947310.zip
gdb-70221824e31ba9c4e8cc710f11c986c37c947310.tar.gz
gdb-70221824e31ba9c4e8cc710f11c986c37c947310.tar.bz2
2012-03-01 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c (amd64_linux_record_signal): Make static. * breakpoint.c (create_exception_master_breakpoint, trace_command) (ftrace_command, strace_command): Make static. * d-lang.c (_initialize_d_language): Declare. * dwarf2expr.c (_initialize_dwarf2expr): Declare. * dwarf2loc.c (_initialize_dwarf2loc): * dwarf2read.c (process_psymtab_comp_unit): Make static. * exec.c (exec_get_section_table): Make static. * i386-linux-tdep.c (i386_linux_record_signal): Make static. * infcmd.c (ensure_valid_thread, ensure_not_tfind_mode): Make static. * inferior.c (remove_inferior_command, add_inferior_command) (clone_inferior_command): Make static. * linux-nat.c (linux_nat_thread_address_space) (linux_nat_core_of_thread): Make static. * linux-tdep.c (_initialize_linux_tdep): Declare. * objc-lang.c (_initialize_objc_lang): Declare. * opencl-lang.c (builtin_opencl_type, opencl_language_arch_info): Make static. (_initialize_opencl_language): Declare. * record.c (_initialize_record): Declare. * remote.c (demand_private_info, remote_get_tib_address) (remote_supports_cond_tracepoints) (remote_supports_fast_tracepoints, remote_get_tracepoint_status): Make static. * skip.c (_initialize_step_skip): Declare. * symtab.c (skip_prologue_using_lineinfo): Make static. * tracepoint.c (delete_trace_state_variable) (trace_variable_command, delete_trace_variable_command) (get_uploaded_tsv, find_matching_tracepoint_location) (find_matching_tsv, create_tsv_from_upload, get_traceframe_info): Make static. * value.c (pack_unsigned_long): Make static. * varobj.c (varobj_ensure_python_env): Make static. * windows-tdep.c (_initialize_windows_tdep): Declare. * xml-syscall.c (make_cleanup_free_syscalls_info): Make static.
-rw-r--r--gdb/ChangeLog38
-rw-r--r--gdb/amd64-linux-tdep.c2
-rw-r--r--gdb/breakpoint.c8
-rw-r--r--gdb/d-lang.c3
-rw-r--r--gdb/dwarf2expr.c3
-rw-r--r--gdb/dwarf2loc.c3
-rw-r--r--gdb/dwarf2read.c2
-rw-r--r--gdb/exec.c2
-rw-r--r--gdb/i386-linux-tdep.c2
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/inferior.c6
-rw-r--r--gdb/linux-nat.c4
-rw-r--r--gdb/linux-tdep.c3
-rw-r--r--gdb/objc-lang.c3
-rw-r--r--gdb/opencl-lang.c7
-rw-r--r--gdb/record.c3
-rw-r--r--gdb/remote.c10
-rw-r--r--gdb/skip.c3
-rw-r--r--gdb/symtab.c2
-rw-r--r--gdb/tracepoint.c16
-rw-r--r--gdb/value.c2
-rw-r--r--gdb/varobj.c2
-rw-r--r--gdb/windows-tdep.c3
-rw-r--r--gdb/xml-syscall.c2
24 files changed, 99 insertions, 34 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6750fb3..81c5c9a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,43 @@
2012-03-01 Pedro Alves <palves@redhat.com>
+ * amd64-linux-tdep.c (amd64_linux_record_signal): Make static.
+ * breakpoint.c (create_exception_master_breakpoint, trace_command)
+ (ftrace_command, strace_command): Make static.
+ * d-lang.c (_initialize_d_language): Declare.
+ * dwarf2expr.c (_initialize_dwarf2expr): Declare.
+ * dwarf2loc.c (_initialize_dwarf2loc):
+ * dwarf2read.c (process_psymtab_comp_unit): Make static.
+ * exec.c (exec_get_section_table): Make static.
+ * i386-linux-tdep.c (i386_linux_record_signal): Make static.
+ * infcmd.c (ensure_valid_thread, ensure_not_tfind_mode): Make static.
+ * inferior.c (remove_inferior_command, add_inferior_command)
+ (clone_inferior_command): Make static.
+ * linux-nat.c (linux_nat_thread_address_space)
+ (linux_nat_core_of_thread): Make static.
+ * linux-tdep.c (_initialize_linux_tdep): Declare.
+ * objc-lang.c (_initialize_objc_lang): Declare.
+ * opencl-lang.c (builtin_opencl_type, opencl_language_arch_info):
+ Make static.
+ (_initialize_opencl_language): Declare.
+ * record.c (_initialize_record): Declare.
+ * remote.c (demand_private_info, remote_get_tib_address)
+ (remote_supports_cond_tracepoints)
+ (remote_supports_fast_tracepoints, remote_get_tracepoint_status):
+ Make static.
+ * skip.c (_initialize_step_skip): Declare.
+ * symtab.c (skip_prologue_using_lineinfo): Make static.
+ * tracepoint.c (delete_trace_state_variable)
+ (trace_variable_command, delete_trace_variable_command)
+ (get_uploaded_tsv, find_matching_tracepoint_location)
+ (find_matching_tsv, create_tsv_from_upload, get_traceframe_info):
+ Make static.
+ * value.c (pack_unsigned_long): Make static.
+ * varobj.c (varobj_ensure_python_env): Make static.
+ * windows-tdep.c (_initialize_windows_tdep): Declare.
+ * xml-syscall.c (make_cleanup_free_syscalls_info): Make static.
+
+2012-03-01 Pedro Alves <palves@redhat.com>
+
* linux-tdep.c (linux_has_shared_address_space): Make static. Add
gdbarch parameter.
(linux_init_abi): Install it as has_shared_address_space gdbarch
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 5032371..da22c1c 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1225,7 +1225,7 @@ amd64_linux_syscall_record (struct regcache *regcache)
#define AMD64_LINUX_xstate 512
#define AMD64_LINUX_frame_size 560
-int
+static int
amd64_linux_record_signal (struct gdbarch *gdbarch,
struct regcache *regcache,
enum target_signal signal)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 311c451..ce35da2 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2922,7 +2922,7 @@ create_std_terminate_master_breakpoint (void)
/* Install a master breakpoint on the unwinder's debug hook. */
-void
+static void
create_exception_master_breakpoint (void)
{
struct objfile *objfile;
@@ -14096,7 +14096,7 @@ set_tracepoint_count (int num)
set_internalvar_integer (lookup_internalvar ("tpnum"), num);
}
-void
+static void
trace_command (char *arg, int from_tty)
{
if (create_breakpoint (get_current_arch (),
@@ -14113,7 +14113,7 @@ trace_command (char *arg, int from_tty)
set_tracepoint_count (breakpoint_count);
}
-void
+static void
ftrace_command (char *arg, int from_tty)
{
if (create_breakpoint (get_current_arch (),
@@ -14132,7 +14132,7 @@ ftrace_command (char *arg, int from_tty)
/* strace command implementation. Creates a static tracepoint. */
-void
+static void
strace_command (char *arg, int from_tty)
{
struct breakpoint_ops *ops;
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 80504b4..202820e 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -277,6 +277,9 @@ static const struct language_defn d_language_defn =
LANG_MAGIC
};
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_d_language;
+
void
_initialize_d_language (void)
{
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 222fcc3..6757204 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -1531,6 +1531,9 @@ ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
_("Support for DW_OP_GNU_entry_value is unimplemented"));
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_dwarf2expr;
+
void
_initialize_dwarf2expr (void)
{
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 313df7b..ebd3452 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -3906,6 +3906,9 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = {
loclist_tracepoint_var_ref
};
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_dwarf2loc;
+
void
_initialize_dwarf2loc (void)
{
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 5810c31..7296a4e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3387,7 +3387,7 @@ dwarf2_find_base_address (struct die_info *die, struct dwarf2_cu *cu)
SECTION is the section the CU/TU comes from,
either .debug_info or .debug_types. */
-void
+static void
process_psymtab_comp_unit (struct dwarf2_per_cu_data *this_cu,
struct dwarf2_section_info *section,
int is_debug_types_section)
diff --git a/gdb/exec.c b/gdb/exec.c
index 8a3e797..58fb55e 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -667,7 +667,7 @@ section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
return 0; /* We can't help. */
}
-struct target_section_table *
+static struct target_section_table *
exec_get_section_table (struct target_ops *ops)
{
return current_target_sections;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index bfb0e1c..4ea596c 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -459,7 +459,7 @@ i386_linux_intx80_sysenter_syscall_record (struct regcache *regcache)
#define I386_LINUX_xstate 270
#define I386_LINUX_frame_size 732
-int
+static int
i386_linux_record_signal (struct gdbarch *gdbarch,
struct regcache *regcache,
enum target_signal signal)
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 06def78..1c092dd 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -664,7 +664,7 @@ proceed_thread_callback (struct thread_info *thread, void *arg)
return 0;
}
-void
+static void
ensure_valid_thread (void)
{
if (ptid_equal (inferior_ptid, null_ptid)
@@ -676,7 +676,7 @@ ensure_valid_thread (void)
is likely to mix up recorded and live target data. So simply
disallow those commands. */
-void
+static void
ensure_not_tfind_mode (void)
{
if (get_traceframe_number () >= 0)
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 327385a..00f6fa3 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -741,7 +741,7 @@ info_inferiors_command (char *args, int from_tty)
/* remove-inferior ID */
-void
+static void
remove_inferior_command (char *args, int from_tty)
{
int num;
@@ -800,7 +800,7 @@ add_inferior_with_spaces (void)
/* add-inferior [-copies N] [-exec FILENAME] */
-void
+static void
add_inferior_command (char *args, int from_tty)
{
int i, copies = 1;
@@ -863,7 +863,7 @@ add_inferior_command (char *args, int from_tty)
/* clone-inferior [-copies N] [ID] */
-void
+static void
clone_inferior_command (char *args, int from_tty)
{
int i, copies = 1;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index e426387..dd6b689 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -5091,7 +5091,7 @@ linux_nat_close (int quitting)
lwpid is a "main" process id or not (it assumes so). We reverse
look up the "main" process id from the lwp here. */
-struct address_space *
+static struct address_space *
linux_nat_thread_address_space (struct target_ops *t, ptid_t ptid)
{
struct lwp_info *lwp;
@@ -5184,7 +5184,7 @@ linux_nat_core_of_thread_1 (ptid_t ptid)
/* Return the cached value of the processor core for thread PTID. */
-int
+static int
linux_nat_core_of_thread (struct target_ops *ops, ptid_t ptid)
{
struct lwp_info *info = find_lwp_pid (ptid);
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 1aee071..d94cf6e 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -864,6 +864,9 @@ linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
linux_has_shared_address_space);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_linux_tdep;
+
void
_initialize_linux_tdep (void)
{
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 76b97ef..74528c8 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1766,6 +1766,9 @@ resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
return 0;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_objc_lang;
+
void
_initialize_objc_lang (void)
{
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 80f978c..3554d18 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -68,7 +68,7 @@ enum opencl_primitive_types {
static struct gdbarch_data *opencl_type_data;
-struct type **
+static struct type **
builtin_opencl_type (struct gdbarch *gdbarch)
{
return gdbarch_data (gdbarch, opencl_type_data);
@@ -961,7 +961,7 @@ Cannot perform conditional operation on vectors with different sizes"));
return evaluate_subexp_c (expect_type, exp, pos, noside);
}
-void
+static void
opencl_language_arch_info (struct gdbarch *gdbarch,
struct language_arch_info *lai)
{
@@ -1116,6 +1116,9 @@ build_opencl_types (struct gdbarch *gdbarch)
return types;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_opencl_language;
+
void
_initialize_opencl_language (void)
{
diff --git a/gdb/record.c b/gdb/record.c
index 3a6598c..9b7ee2f 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -2924,6 +2924,9 @@ cmd_record_goto (char *arg, int from_tty)
print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_record;
+
void
_initialize_record (void)
{
diff --git a/gdb/remote.c b/gdb/remote.c
index baa3dda..09bf18e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1583,7 +1583,7 @@ remote_notice_new_inferior (ptid_t currthread, int running)
/* Return the private thread data, creating it if necessary. */
-struct private_thread_info *
+static struct private_thread_info *
demand_private_info (ptid_t ptid)
{
struct thread_info *info = find_thread_ptid (ptid);
@@ -8989,7 +8989,7 @@ remote_get_thread_local_address (struct target_ops *ops,
/* Provide thread local base, i.e. Thread Information Block address.
Returns 1 if ptid is found and thread_local_base is non zero. */
-int
+static int
remote_get_tib_address (ptid_t ptid, CORE_ADDR *addr)
{
if (remote_protocol_packets[PACKET_qGetTIBAddr].support != PACKET_DISABLE)
@@ -9914,7 +9914,7 @@ remote_supports_multi_process (void)
return rs->extended && remote_multi_process_p (rs);
}
-int
+static int
remote_supports_cond_tracepoints (void)
{
struct remote_state *rs = get_remote_state ();
@@ -9930,7 +9930,7 @@ remote_supports_cond_breakpoints (void)
return rs->cond_breakpoints;
}
-int
+static int
remote_supports_fast_tracepoints (void)
{
struct remote_state *rs = get_remote_state ();
@@ -10388,7 +10388,7 @@ remote_get_trace_status (struct trace_status *ts)
return ts->running;
}
-void
+static void
remote_get_tracepoint_status (struct breakpoint *bp,
struct uploaded_tp *utp)
{
diff --git a/gdb/skip.c b/gdb/skip.c
index d983a80..da748e7 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -542,6 +542,9 @@ skip_re_set (void)
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_step_skip;
+
void
_initialize_step_skip (void)
{
diff --git a/gdb/symtab.c b/gdb/symtab.c
index f746551..c2580a1 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2600,7 +2600,7 @@ find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr)
table. If such an entry cannot be found, return FUNC_ADDR
unaltered. */
-CORE_ADDR
+static CORE_ADDR
skip_prologue_using_lineinfo (CORE_ADDR func_addr, struct symtab *symtab)
{
CORE_ADDR func_start, func_end;
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 824d572..0442a60 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -347,7 +347,7 @@ find_trace_state_variable (const char *name)
return NULL;
}
-void
+static void
delete_trace_state_variable (const char *name)
{
struct trace_state_variable *tsv;
@@ -367,7 +367,7 @@ delete_trace_state_variable (const char *name)
/* The 'tvariable' command collects a name and optional expression to
evaluate into an initial value. */
-void
+static void
trace_variable_command (char *args, int from_tty)
{
struct expression *expr;
@@ -429,7 +429,7 @@ trace_variable_command (char *args, int from_tty)
do_cleanups (old_chain);
}
-void
+static void
delete_trace_variable_command (char *args, int from_tty)
{
int ix;
@@ -3344,7 +3344,7 @@ free_uploaded_tps (struct uploaded_tp **utpp)
/* Given a number and address, return an uploaded tracepoint with that
number, creating if necessary. */
-struct uploaded_tsv *
+static struct uploaded_tsv *
get_uploaded_tsv (int num, struct uploaded_tsv **utsvp)
{
struct uploaded_tsv *utsv;
@@ -3391,7 +3391,7 @@ cond_string_is_same (char *str1, char *str2)
toggle that freely, and may have done so in anticipation of the
next trace run. Return the location of matched tracepoint. */
-struct bp_location *
+static struct bp_location *
find_matching_tracepoint_location (struct uploaded_tp *utp)
{
VEC(breakpoint_p) *tp_vec = all_tracepoints ();
@@ -3474,7 +3474,7 @@ merge_uploaded_tracepoints (struct uploaded_tp **uploaded_tps)
/* Trace state variables don't have much to identify them beyond their
name, so just use that to detect matches. */
-struct trace_state_variable *
+static struct trace_state_variable *
find_matching_tsv (struct uploaded_tsv *utsv)
{
if (!utsv->name)
@@ -3483,7 +3483,7 @@ find_matching_tsv (struct uploaded_tsv *utsv)
return find_trace_state_variable (utsv->name);
}
-struct trace_state_variable *
+static struct trace_state_variable *
create_tsv_from_upload (struct uploaded_tsv *utsv)
{
const char *namebase;
@@ -5052,7 +5052,7 @@ parse_traceframe_info (const char *tframe_info)
This is where we avoid re-fetching the object from the target if we
already have it cached. */
-struct traceframe_info *
+static struct traceframe_info *
get_traceframe_info (void)
{
if (traceframe_info == NULL)
diff --git a/gdb/value.c b/gdb/value.c
index 68e5f02..bee6907 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2936,7 +2936,7 @@ pack_long (gdb_byte *buf, struct type *type, LONGEST num)
/* Pack NUM into BUF using a target format of TYPE. */
-void
+static void
pack_unsigned_long (gdb_byte *buf, struct type *type, ULONGEST num)
{
int len;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 6186db0..b6e67c6 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -515,7 +515,7 @@ is_root_p (struct varobj *var)
#ifdef HAVE_PYTHON
/* Helper function to install a Python environment suitable for
use during operations on VAR. */
-struct cleanup *
+static struct cleanup *
varobj_ensure_python_env (struct varobj *var)
{
return ensure_python_env (var->root->exp->gdbarch,
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index e111d41..6b84eff 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -425,6 +425,9 @@ init_w32_command_list (void)
}
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_windows_tdep;
+
void
_initialize_windows_tdep (void)
{
diff --git a/gdb/xml-syscall.c b/gdb/xml-syscall.c
index 105b265..f4b16f4 100644
--- a/gdb/xml-syscall.c
+++ b/gdb/xml-syscall.c
@@ -151,7 +151,7 @@ free_syscalls_info (void *arg)
xfree (sysinfo);
}
-struct cleanup *
+static struct cleanup *
make_cleanup_free_syscalls_info (struct syscalls_info *sysinfo)
{
return make_cleanup (free_syscalls_info, sysinfo);