2004-07-28 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / remote-sds.c
index a07827c119222bd48307cb86b3c0ffb1826b759f..967ad3ef3f9b167049d5b9302c65d49f844b16aa 100644 (file)
@@ -1,6 +1,6 @@
 /* Remote target communications for serial-line targets using SDS' protocol.
 
-   Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -76,8 +76,6 @@ static void sds_store_registers (int);
 
 static void sds_mourn (void);
 
-static void sds_create_inferior (char *, char *, char **);
-
 static void sds_load (char *, int);
 
 static int getmessage (unsigned char *, int);
@@ -92,8 +90,6 @@ static ptid_t sds_wait (ptid_t, struct target_waitstatus *);
 
 static void sds_kill (void);
 
-static int tohex (int);
-
 static int fromhex (int);
 
 static void sds_detach (char *, int);
@@ -148,7 +144,6 @@ static int message_pending;
 
 /* Clean up connection to a remote debugger.  */
 
-/* ARGSUSED */
 static void
 sds_close (int quitting)
 {
@@ -279,17 +274,6 @@ fromhex (int a)
     error ("Reply contains invalid hex digit %d", a);
 }
 
-/* Convert number NIB to a hex digit.  */
-
-static int
-tohex (int nib)
-{
-  if (nib < 10)
-    return '0' + nib;
-  else
-    return 'a' + nib - 10;
-}
-
 static int
 tob64 (unsigned char *inbuf, char *outbuf, int len)
 {
@@ -467,7 +451,6 @@ static unsigned char sprs[16];
 /* Read the remote registers into the block REGS.  */
 /* Currently we just read all the registers, so we don't use regno.  */
 
-/* ARGSUSED */
 static void
 sds_fetch_registers (int regno)
 {
@@ -499,7 +482,8 @@ sds_fetch_registers (int regno)
   /* (should warn about reply too short) */
 
   for (i = 0; i < NUM_REGS; i++)
-    supply_register (i, &regs[DEPRECATED_REGISTER_BYTE (i)]);
+    regcache_raw_supply (current_regcache, i,
+                        &regs[DEPRECATED_REGISTER_BYTE (i)]);
 }
 
 /* Prepare to store registers.  Since we may send them all, we have to
@@ -657,7 +641,6 @@ sds_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
    if SHOULD_WRITE is nonzero.  Returns length of data written or
    read; 0 for error.  TARGET is unused.  */
 
-/* ARGSUSED */
 static int
 sds_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
                 struct mem_attrib *attrib, struct target_ops *target)
@@ -1001,7 +984,7 @@ sds_mourn (void)
 }
 
 static void
-sds_create_inferior (char *exec_file, char *args, char **env)
+sds_create_inferior (char *exec_file, char *args, char **env, int from_tty)
 {
   inferior_ptid = pid_to_ptid (42000);
 
@@ -1136,10 +1119,11 @@ _initialize_remote_sds (void)
   init_sds_ops ();
   add_target (&sds_ops);
 
-  add_show_from_set (add_set_cmd ("sdstimeout", no_class,
-                                 var_integer, (char *) &sds_timeout,
-                            "Set timeout value for sds read.\n", &setlist),
-                    &showlist);
+  deprecated_add_show_from_set
+    (add_set_cmd ("sdstimeout", no_class,
+                 var_integer, (char *) &sds_timeout,
+                 "Set timeout value for sds read.\n", &setlist),
+     &showlist);
 
   add_com ("sds", class_obscure, sds_command,
           "Send a command to the SDS monitor.");
This page took 0.024124 seconds and 4 git commands to generate.