]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbserver: fix various warnings
authorMike Frysinger <vapier@gentoo.org>
Mon, 11 Jan 2016 19:05:11 +0000 (14:05 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 12 Jan 2016 15:34:17 +0000 (10:34 -0500)
Delete unused funcs, update old prototypes, and mark local funcs
as static.  This doesn't cover all missing prototype warnings.

gdb/gdbserver/ChangeLog
gdb/gdbserver/ax.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/regcache.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c

index e2773488dd95d118b440451395b2e91d48fb7d03..cbb7d28af2cb6ae86623f30ccbcb9ca1f3495845 100644 (file)
@@ -1,3 +1,16 @@
+2016-01-12  Mike Frysinger  <vapier@gentoo.org>
+
+       * ax.c (is_goto_target): Mark static.
+       * linux-low.c (register_addr): Likewise.
+       (linux_fetch_registers, linux_store_registers): Likewise.
+       * mem-break.c (any_persistent_commands): Fix old prototype.
+       (add_commands_to_breakpoint): Mark static.
+       * regcache.c (find_register_by_name): Delete unused func.
+       * remote-utils.c (hex_or_minus_one): Mark static.
+       * server.c (monitor_show_help): Mark static.
+       (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
+       handle_v_requests): Likewise.
+
 2016-01-12  Pedro Alves  <palves@redhat.com>
 
        Remove use of the registered trademark symbol throughout.
index 91894c265b73fb256f61a6f8e2277422e4fe5ced..d5144c24b1c94f5ee448599ba7ab659d237fc3fa 100644 (file)
@@ -375,7 +375,7 @@ emit_le_goto (int *offset_p, int *size_p)
 /* Scan an agent expression for any evidence that the given PC is the
    target of a jump bytecode in the expression.  */
 
-int
+static int
 is_goto_target (struct agent_expr *aexpr, int pc)
 {
   int i;
index fe3ba85fe53e4f74bf8fa405944c79467b9354fa..47f0f9d71f6a7742561ab664258bb3bd285fa9b6 100644 (file)
@@ -5227,7 +5227,7 @@ linux_register_in_regsets (const struct regs_info *regs_info, int regno)
 
 #ifdef HAVE_LINUX_USRREGS
 
-int
+static int
 register_addr (const struct usrregs_info *usrregs, int regnum)
 {
   int addr;
@@ -5389,7 +5389,7 @@ usr_store_inferior_registers (const struct regs_info *regs_info,
 #endif
 
 
-void
+static void
 linux_fetch_registers (struct regcache *regcache, int regno)
 {
   int use_regsets;
@@ -5422,7 +5422,7 @@ linux_fetch_registers (struct regcache *regcache, int regno)
     }
 }
 
-void
+static void
 linux_store_registers (struct regcache *regcache, int regno)
 {
   int use_regsets;
index 2e220b868e8f859bd5925b5813c0b476067f1368..b06f8e96ecc02efb120afdded79d45f6726ea4f6 100644 (file)
@@ -267,7 +267,7 @@ Z_packet_to_raw_bkpt_type (char z_type)
 }
 
 int
-any_persistent_commands ()
+any_persistent_commands (void)
 {
   struct process_info *proc = current_process ();
   struct breakpoint *bp;
@@ -1269,7 +1269,7 @@ gdb_condition_true_at_breakpoint (CORE_ADDR where)
 
 /* Add commands COMMANDS to GDBserver's breakpoint BP.  */
 
-void
+static void
 add_commands_to_breakpoint (struct breakpoint *bp,
                            struct agent_expr *commands, int persist)
 {
index cd8d9db9631cc890f126579e4319d2bf16268e8d..6a737ea37ec032ad20cebb20e7624c30cbd72df9 100644 (file)
@@ -253,18 +253,6 @@ registers_from_string (struct regcache *regcache, char *buf)
   hex2bin (buf, registers, len / 2);
 }
 
-struct reg *
-find_register_by_name (const struct target_desc *tdesc, const char *name)
-{
-  int i;
-
-  for (i = 0; i < tdesc->num_registers; i++)
-    if (strcmp (name, tdesc->reg_defs[i].name) == 0)
-      return &tdesc->reg_defs[i];
-  internal_error (__FILE__, __LINE__, "Unknown register %s requested",
-                 name);
-}
-
 int
 find_regno (const struct target_desc *tdesc, const char *name)
 {
index c5f4647052c06ad49a8dda3f4715674d96825054..40bd373aae1e1f6afd8a5f2af25495e8cd252005 100644 (file)
@@ -526,7 +526,7 @@ write_ptid (char *buf, ptid_t ptid)
   return buf;
 }
 
-ULONGEST
+static ULONGEST
 hex_or_minus_one (char *buf, char **obuf)
 {
   ULONGEST ret;
index 61b164b4d98fb68733a298a88b166db257709559..440c076ca172ab21236a5a8876daa6f260f03b1a 100644 (file)
@@ -805,7 +805,7 @@ get_features_xml (const char *annex)
   return NULL;
 }
 
-void
+static void
 monitor_show_help (void)
 {
   monitor_output ("The following monitor commands are supported:\n");
@@ -1966,7 +1966,7 @@ supported_btrace_packets (char *buf)
 
 /* Handle all of the extended 'q' packets.  */
 
-void
+static void
 handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
 {
   static struct inferior_list_entry *thread_ptr;
@@ -2568,7 +2568,7 @@ handle_pending_status (const struct thread_resume *resumption,
 }
 
 /* Parse vCont packets.  */
-void
+static void
 handle_v_cont (char *own_buf)
 {
   char *p, *q;
@@ -2735,7 +2735,7 @@ resume (struct thread_resume *actions, size_t num_actions)
 }
 
 /* Attach to a new program.  Return 1 if successful, 0 if failure.  */
-int
+static int
 handle_v_attach (char *own_buf)
 {
   int pid;
@@ -2858,7 +2858,7 @@ handle_v_run (char *own_buf)
 }
 
 /* Kill process.  Return 1 if successful, 0 if failure.  */
-int
+static int
 handle_v_kill (char *own_buf)
 {
   int pid;
@@ -2884,7 +2884,7 @@ handle_v_kill (char *own_buf)
 }
 
 /* Handle all of the extended 'v' packets.  */
-void
+static void
 handle_v_requests (char *own_buf, int packet_len, int *new_packet_len)
 {
   if (!disable_packet_vCont)