daily update
[binutils-gdb.git] / gdb / remote-vx.c
index 39d18e422d942bdebc3cddf6a0926ce53d30a875..76baff564e875bae3396b7e81d915f090332e59c 100644 (file)
@@ -67,7 +67,7 @@
 extern void vx_read_register ();
 extern void vx_write_register ();
 extern void symbol_file_command ();
-extern int stop_soon_quietly;  /* for wait_for_inferior */
+extern enum stop_kind stop_soon;       /* for wait_for_inferior */
 
 static int net_step ();
 static int net_ptrace_clnt_call ();    /* Forward decl */
@@ -202,7 +202,7 @@ vx_remove_breakpoint (int addr)
    On VxWorks, we ignore exec_file.  */
 
 static void
-vx_create_inferior (char *exec_file, char *args, char **env)
+vx_create_inferior (char *exec_file, char *args, char **env, int from_tty)
 {
   enum clnt_stat status;
   arg_array passArgs;
@@ -243,9 +243,9 @@ vx_create_inferior (char *exec_file, char *args, char **env)
   /* Install inferior's terminal modes.  */
   target_terminal_inferior ();
 
-  stop_soon_quietly = 1;
+  stop_soon = STOP_QUIETLY;
   wait_for_inferior ();                /* Get the task spawn event */
-  stop_soon_quietly = 0;
+  stop_soon = NO_STOP_QUIETLY;
 
   /* insert_step_breakpoint ();  FIXME, do we need this?  */
   proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
@@ -255,11 +255,11 @@ vx_create_inferior (char *exec_file, char *args, char **env)
    argument string ARGSTRING.  */
 
 static void
-parse_args (register char *arg_string, arg_array *arg_struct)
+parse_args (char *arg_string, arg_array *arg_struct)
 {
-  register int arg_count = 0;  /* number of arguments */
-  register int arg_index = 0;
-  register char *p0;
+  int arg_count = 0;   /* number of arguments */
+  int arg_index = 0;
+  char *p0;
 
   memset ((char *) arg_struct, '\0', sizeof (arg_array));
 
@@ -295,7 +295,7 @@ parse_args (register char *arg_string, arg_array *arg_struct)
    to the first non-white character.  */
 
 static char *
-skip_white_space (register char *p)
+skip_white_space (char *p)
 {
   while (*p == ' ' || *p == '\t')
     p++;
@@ -307,9 +307,9 @@ skip_white_space (register char *p)
    if no whitespace is found.  */
 
 static char *
-find_white_space (register char *p)
+find_white_space (char *p)
 {
-  register int c;
+  int c;
 
   while ((c = *p) != ' ' && c != '\t' && c)
     {
@@ -466,7 +466,7 @@ static void
 vx_prepare_to_store (void)
 {
   /* Fetch all registers, if any of them are not yet fetched.  */
-  deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
+  deprecated_read_register_bytes (0, NULL, deprecated_register_bytes ());
 }
 
 /* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
@@ -566,7 +566,7 @@ vx_run_files_info (void)
 {
   printf_unfiltered ("\tRunning %s VxWorks process %s",
                     vx_running ? "child" : "attached",
-                    local_hex_string (PIDGET (inferior_ptid)));
+                    hex_string (PIDGET (inferior_ptid)));
   if (vx_running)
     printf_unfiltered (", function `%s'", vx_running);
   printf_unfiltered (".\n");
@@ -638,7 +638,7 @@ struct find_sect_args
 static void find_sect (bfd *, asection *, void *);
 
 static void
-find_sect (bfd *abfd, asection *sect, PTR obj)
+find_sect (bfd *abfd, asection *sect, void *obj)
 {
   struct find_sect_args *args = (struct find_sect_args *) obj;
 
@@ -675,8 +675,11 @@ vx_add_symbols (char *name, int from_tty, CORE_ADDR text_addr,
      free_objfile it.  */
   objfile_to_front (objfile);
 
-  offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
-  memcpy (offs, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+  offs =
+    (struct section_offsets *)
+    alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+  memcpy (offs, objfile->section_offsets,
+          SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
 
   ss.text_start = 0;
   ss.data_start = 0;
@@ -744,17 +747,8 @@ net_step (void)
   SOURCE_STEP source_step;
 
   source_step.taskId = PIDGET (inferior_ptid);
-
-  if (step_range_end)
-    {
-      source_step.startAddr = step_range_start;
-      source_step.endAddr = step_range_end;
-    }
-  else
-    {
-      source_step.startAddr = 0;
-      source_step.endAddr = 0;
-    }
+  source_step.startAddr = 0;
+  source_step.endAddr = 0;
 
   status = net_clnt_call (VX_SOURCE_STEP, xdr_SOURCE_STEP, &source_step,
                          xdr_int, &step_status);
@@ -931,7 +925,7 @@ sleep_ms (long ms)
 static ptid_t
 vx_wait (ptid_t ptid_to_wait_for, struct target_waitstatus *status)
 {
-  register int pid;
+  int pid;
   RDB_EVENT rdbEvent;
   int quit_failed;
 
@@ -978,7 +972,7 @@ vx_wait (ptid_t ptid_to_wait_for, struct target_waitstatus *status)
       else if (pid != PIDGET (inferior_ptid))
        internal_error (__FILE__, __LINE__,
                        "Bad pid for debugged task: %s\n",
-                       local_hex_string ((unsigned long) pid));
+                       hex_string ((unsigned long) pid));
     }
   while (pid == 0);
 
@@ -1136,7 +1130,7 @@ vx_open (char *args, int from_tty)
       pLoadFile = &loadTable.tbl_ent[i];
 #ifdef WRS_ORIG
       {
-       register int desc;
+       int desc;
        struct cleanup *old_chain;
        char *fullname = NULL;
 
@@ -1189,7 +1183,7 @@ vx_attach (char *args, int from_tty)
 
   if (from_tty)
     printf_unfiltered ("Attaching pid %s.\n",
-                      local_hex_string ((unsigned long) pid));
+                      hex_string ((unsigned long) pid));
 
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
@@ -1236,7 +1230,7 @@ vx_detach (char *args, int from_tty)
 
   if (from_tty)
     printf_unfiltered ("Detaching pid %s.\n",
-                      local_hex_string (
+                      hex_string (
                         (unsigned long) PIDGET (inferior_ptid)));
 
   if (args)                    /* FIXME, should be possible to leave suspended */
@@ -1268,7 +1262,8 @@ vx_kill (void)
   Ptrace_return ptrace_out;
   int status;
 
-  printf_unfiltered ("Killing pid %s.\n", local_hex_string ((unsigned long) PIDGET (inferior_ptid)));
+  printf_unfiltered ("Killing pid %s.\n", 
+                    hex_string ((unsigned long) PIDGET (inferior_ptid)));
 
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
@@ -1332,7 +1327,6 @@ vx_close (int quitting)
 }
 
 /* A vxprocess target should be started via "run" not "target".  */
-/*ARGSUSED */
 static void
 vx_proc_open (char *name, int from_tty)
 {
@@ -1349,7 +1343,7 @@ Specify the name of the machine to connect to.";
   vx_ops.to_open = vx_open;
   vx_ops.to_close = vx_close;
   vx_ops.to_attach = vx_attach;
-  vx_ops.to_xfer_memory = vx_xfer_memory;
+  vx_ops.deprecated_xfer_memory = vx_xfer_memory;
   vx_ops.to_files_info = vx_files_info;
   vx_ops.to_load = vx_load_command;
   vx_ops.to_lookup_symbol = vx_lookup_symbol;
@@ -1374,7 +1368,7 @@ init_vx_run_ops (void)
   vx_run_ops.to_fetch_registers = vx_read_register;
   vx_run_ops.to_store_registers = vx_write_register;
   vx_run_ops.to_prepare_to_store = vx_prepare_to_store;
-  vx_run_ops.to_xfer_memory = vx_xfer_memory;
+  vx_run_ops.deprecated_xfer_memory = vx_xfer_memory;
   vx_run_ops.to_files_info = vx_run_files_info;
   vx_run_ops.to_insert_breakpoint = vx_insert_breakpoint;
   vx_run_ops.to_remove_breakpoint = vx_remove_breakpoint;
@@ -1398,7 +1392,7 @@ _initialize_vx (void)
   init_vx_run_ops ();
   add_target (&vx_run_ops);
 
-  add_show_from_set
+  deprecated_add_show_from_set
     (add_set_cmd ("vxworks-timeout", class_support, var_uinteger,
                  (char *) &rpcTimeout.tv_sec,
                  "Set seconds to wait for rpc calls to return.\n\