Fix formatting
[deliverable/binutils-gdb.git] / gdb / target.c
index 7bb4886072ad2bca78f982a633f5f3e8ee5f5892..b99055dd5138d0afd862a0dcb2b7817f70be730b 100644 (file)
 
 extern int errno;
 
-static void
-target_info PARAMS ((char *, int));
+static void target_info (char *, int);
 
-static void
-cleanup_target PARAMS ((struct target_ops *));
+static void cleanup_target (struct target_ops *);
 
-static void
-maybe_kill_then_create_inferior PARAMS ((char *, char *, char **));
+static void maybe_kill_then_create_inferior (char *, char *, char **);
 
-static void
-default_clone_and_follow_inferior PARAMS ((int, int *));
+static void default_clone_and_follow_inferior (int, int *);
 
-static void
-maybe_kill_then_attach PARAMS ((char *, int));
+static void maybe_kill_then_attach (char *, int);
 
-static void
-kill_or_be_killed PARAMS ((int));
+static void kill_or_be_killed (int);
 
-static void
-default_terminal_info PARAMS ((char *, int));
+static void default_terminal_info (char *, int);
 
-static int
-nosymbol PARAMS ((char *, CORE_ADDR *));
+static int nosymbol (char *, CORE_ADDR *);
 
-static void
-tcomplain PARAMS ((void));
+static void tcomplain (void);
 
-static int
-nomemory PARAMS ((CORE_ADDR, char *, int, int, struct target_ops *));
+static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
 
-static int
-return_zero PARAMS ((void));
+static int return_zero (void);
 
-static int
-return_one PARAMS ((void));
+static int return_one (void);
 
-void
-target_ignore PARAMS ((void));
+void target_ignore (void);
 
-static void
-target_command PARAMS ((char *, int));
+static void target_command (char *, int);
 
-static struct target_ops *
-find_default_run_target PARAMS ((char *));
+static struct target_ops *find_default_run_target (char *);
 
-static void
-update_current_target PARAMS ((void));
+static void update_current_target (void);
 
-static void nosupport_runtime PARAMS ((void));
+static void nosupport_runtime (void);
 
-static void normal_target_post_startup_inferior PARAMS ((int pid));
+static void normal_target_post_startup_inferior (int pid);
 
 /* Transfer LEN bytes between target address MEMADDR and GDB address
    MYADDR.  Returns 0 for success, errno code for failure (which
@@ -94,93 +78,66 @@ static void normal_target_post_startup_inferior PARAMS ((int pid));
    target_write_memory_partial).  */
 
 static int
-target_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr, int len,
-                           int write, asection * bfd_section));
+target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write);
 
-static void init_dummy_target PARAMS ((void));
+static void init_dummy_target (void);
 
-static void
-debug_to_open PARAMS ((char *, int));
+static void debug_to_open (char *, int);
 
-static void
-debug_to_close PARAMS ((int));
+static void debug_to_close (int);
 
-static void
-debug_to_attach PARAMS ((char *, int));
+static void debug_to_attach (char *, int);
 
-static void
-debug_to_detach PARAMS ((char *, int));
+static void debug_to_detach (char *, int);
 
-static void
-debug_to_resume PARAMS ((int, int, enum target_signal));
+static void debug_to_resume (int, int, enum target_signal);
 
-static int
-debug_to_wait PARAMS ((int, struct target_waitstatus *));
+static int debug_to_wait (int, struct target_waitstatus *);
 
-static void
-debug_to_fetch_registers PARAMS ((int));
+static void debug_to_fetch_registers (int);
 
-static void
-debug_to_store_registers PARAMS ((int));
+static void debug_to_store_registers (int);
 
-static void
-debug_to_prepare_to_store PARAMS ((void));
+static void debug_to_prepare_to_store (void);
 
 static int
-debug_to_xfer_memory PARAMS ((CORE_ADDR, char *, int, int, struct target_ops *));
+debug_to_xfer_memory (CORE_ADDR, char *, int, int, struct target_ops *);
 
-static void
-debug_to_files_info PARAMS ((struct target_ops *));
+static void debug_to_files_info (struct target_ops *);
 
-static int
-debug_to_insert_breakpoint PARAMS ((CORE_ADDR, char *));
+static int debug_to_insert_breakpoint (CORE_ADDR, char *);
 
-static int
-debug_to_remove_breakpoint PARAMS ((CORE_ADDR, char *));
+static int debug_to_remove_breakpoint (CORE_ADDR, char *);
 
-static void
-debug_to_terminal_init PARAMS ((void));
+static void debug_to_terminal_init (void);
 
-static void
-debug_to_terminal_inferior PARAMS ((void));
+static void debug_to_terminal_inferior (void);
 
-static void
-debug_to_terminal_ours_for_output PARAMS ((void));
+static void debug_to_terminal_ours_for_output (void);
 
-static void
-debug_to_terminal_ours PARAMS ((void));
+static void debug_to_terminal_ours (void);
 
-static void
-debug_to_terminal_info PARAMS ((char *, int));
+static void debug_to_terminal_info (char *, int);
 
-static void
-debug_to_kill PARAMS ((void));
+static void debug_to_kill (void);
 
-static void
-debug_to_load PARAMS ((char *, int));
+static void debug_to_load (char *, int);
 
-static int
-debug_to_lookup_symbol PARAMS ((char *, CORE_ADDR *));
+static int debug_to_lookup_symbol (char *, CORE_ADDR *);
 
-static void
-debug_to_create_inferior PARAMS ((char *, char *, char **));
+static void debug_to_create_inferior (char *, char *, char **);
 
-static void
-debug_to_mourn_inferior PARAMS ((void));
+static void debug_to_mourn_inferior (void);
 
-static int
-debug_to_can_run PARAMS ((void));
+static int debug_to_can_run (void);
 
-static void
-debug_to_notice_signals PARAMS ((int));
+static void debug_to_notice_signals (int);
 
-static int
-debug_to_thread_alive PARAMS ((int));
+static int debug_to_thread_alive (int);
 
-static void
-debug_to_stop PARAMS ((void));
+static void debug_to_stop (void);
 
-static int debug_to_query PARAMS ((int /*char */ , char *, char *, int *));
+static int debug_to_query (int /*char */ , char *, char *, int *);
 
 /* Pointer to array of target architecture structures; the size of the
    array; the current index into the array; the allocated size of the 
@@ -218,7 +175,7 @@ int attach_flag;
 
 static int targetdebug = 0;
 
-static void setup_target_debug PARAMS ((void));
+static void setup_target_debug (void);
 
 /* The user just typed 'target' without the name of a target.  */
 
@@ -836,7 +793,7 @@ target_read_string (memaddr, string, len, errnop)
       tlen = MIN (len, 4 - (memaddr & 3));
       offset = memaddr & 3;
 
-      errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0, NULL);
+      errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0);
       if (errcode != 0)
        {
          /* The transfer request might have crossed the boundary to an
@@ -844,7 +801,7 @@ target_read_string (memaddr, string, len, errnop)
             a single byte.  */
          tlen = 1;
          offset = 0;
-         errcode = target_xfer_memory (memaddr, buf, 1, 0, NULL);
+         errcode = target_xfer_memory (memaddr, buf, 1, 0);
          if (errcode != 0)
            goto done;
        }
@@ -896,17 +853,7 @@ target_read_memory (memaddr, myaddr, len)
      char *myaddr;
      int len;
 {
-  return target_xfer_memory (memaddr, myaddr, len, 0, NULL);
-}
-
-int
-target_read_memory_section (memaddr, myaddr, len, bfd_section)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     asection *bfd_section;
-{
-  return target_xfer_memory (memaddr, myaddr, len, 0, bfd_section);
+  return target_xfer_memory (memaddr, myaddr, len, 0);
 }
 
 int
@@ -915,15 +862,9 @@ target_write_memory (memaddr, myaddr, len)
      char *myaddr;
      int len;
 {
-  return target_xfer_memory (memaddr, myaddr, len, 1, NULL);
+  return target_xfer_memory (memaddr, myaddr, len, 1);
 }
 
-/* This variable is used to pass section information down to targets.  This
-   *should* be done by adding an argument to the target_xfer_memory function
-   of all the targets, but I didn't feel like changing 50+ files.  */
-
-asection *target_memory_bfd_section = NULL;
-
 /* Move memory to or from the targets.  Iterate until all of it has
    been moved, if necessary.  The top target gets priority; anything
    it doesn't want, is offered to the next one down, etc.  Note the
@@ -935,12 +876,11 @@ asection *target_memory_bfd_section = NULL;
    Result is 0 or errno value.  */
 
 static int
-target_xfer_memory (memaddr, myaddr, len, write, bfd_section)
+target_xfer_memory (memaddr, myaddr, len, write)
      CORE_ADDR memaddr;
      char *myaddr;
      int len;
      int write;
-     asection *bfd_section;
 {
   int curlen;
   int res;
@@ -951,8 +891,6 @@ target_xfer_memory (memaddr, myaddr, len, write, bfd_section)
   if (len == 0)
     return 0;
 
-  target_memory_bfd_section = bfd_section;
-
   /* to_xfer_memory is not guaranteed to set errno, even when it returns
      0.  */
   errno = 0;
@@ -2188,7 +2126,7 @@ Use \"info signals\" for a list of symbolic signals.");
 }
 \f
 /* Returns zero to leave the inferior alone, one to interrupt it.  */
-int (*target_activity_function) PARAMS ((void));
+int (*target_activity_function) (void);
 int target_activity_fd;
 \f
 /* Convert a normal process ID to a string.  Returns the string in a static
@@ -3063,9 +3001,11 @@ static void
 do_monitor_command (char *cmd,
                 int from_tty)
 {
-  if ((current_target.to_rcmd == (void*) tcomplain)
+  if ((current_target.to_rcmd
+       == (void (*) (char *, struct ui_file *)) tcomplain)
       || (current_target.to_rcmd == debug_to_rcmd
-         && (debug_target.to_rcmd == (void*) tcomplain)))
+         && (debug_target.to_rcmd
+             == (void (*) (char *, struct ui_file *)) tcomplain)))
     {
       error ("\"monitor\" command not supported by this target.\n");
     }
@@ -3082,11 +3022,11 @@ initialize_targets ()
   add_info ("files", target_info, targ_desc);
 
   add_show_from_set (
-               add_set_cmd ("targetdebug", class_maintenance, var_zinteger,
+               add_set_cmd ("target", class_maintenance, var_zinteger,
                             (char *) &targetdebug,
                             "Set target debugging.\n\
-When non-zero, target debugging is enabled.", &setlist),
-                     &showlist);
+When non-zero, target debugging is enabled.", &setdebuglist),
+                     &showdebuglist);
 
 
   add_com ("monitor", class_obscure, do_monitor_command,
This page took 0.027886 seconds and 4 git commands to generate.