2004-09-02 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / remote-rdp.c
index 3f956e7811b2d0c497246eb3c68dbda6de99725a..20683110232a7236ebca7ccc0fa9b8fb585d293a 100644 (file)
@@ -1,7 +1,7 @@
 /* Remote debugging for the ARM RDP interface.
 
-   Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
+   Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -352,11 +352,29 @@ rdp_init (int cold, int tty)
                  case SERIAL_TIMEOUT:
                    break;
                  case RDP_RES_VALUE_LITTLE_ENDIAN:
+#if 0
+                   /* FIXME: cagney/2003-11-22: Ever since the ARM
+                       was multi-arched (in 2002-02-08), this
+                       assignment has had no effect.  There needs to
+                       be some sort of check/decision based on the
+                       current architecture's byte-order vs the remote
+                       target's byte order.  For the moment disable
+                       the assignment to keep things building.  */
                    target_byte_order = BFD_ENDIAN_LITTLE;
+#endif
                    sync = 1;
                    break;
                  case RDP_RES_VALUE_BIG_ENDIAN:
+#if 0
+                   /* FIXME: cagney/2003-11-22: Ever since the ARM
+                       was multi-arched (in 2002-02-08), this
+                       assignment has had no effect.  There needs to
+                       be some sort of check/decision based on the
+                       current architecture's byte-order vs the remote
+                       target's byte order.  For the moment disable
+                       the assignment to keep things building.  */
                    target_byte_order = BFD_ENDIAN_BIG;
+#endif
                    sync = 1;
                    break;
                  default:
@@ -374,7 +392,7 @@ rdp_init (int cold, int tty)
 }
 
 
-void
+static void
 send_rdp (char *template,...)
 {
   char buf[200];
@@ -550,7 +568,7 @@ rdp_fetch_one_fpu_register (int mask, char *buf)
       send_rdp ("bbw-SWWWWZ", RDP_COPRO_READ, FPU_COPRO_NUMBER, mask, buf + 0, buf + 4, buf + 8, &dummy);
     }
 #endif
-  memset (buf, 0, MAX_REGISTER_RAW_SIZE);
+  memset (buf, 0, MAX_REGISTER_SIZE);
 }
 
 
@@ -612,7 +630,7 @@ remote_rdp_fetch_register (int regno)
     }
   else
     {
-      char buf[ARM_MAX_REGISTER_RAW_SIZE];
+      char buf[MAX_REGISTER_SIZE];
       if (regno < 15)
        rdp_fetch_one_register (1 << regno, buf);
       else if (regno == ARM_PC_REGNUM)
@@ -627,7 +645,7 @@ remote_rdp_fetch_register (int regno)
        {
          printf ("Help me with fetch reg %d\n", regno);
        }
-      supply_register (regno, buf);
+      regcache_raw_supply (current_regcache, regno, buf);
     }
 }
 
@@ -642,7 +660,7 @@ remote_rdp_store_register (int regno)
     }
   else
     {
-      char tmp[ARM_MAX_REGISTER_RAW_SIZE];
+      char tmp[MAX_REGISTER_SIZE];
       deprecated_read_register_gen (regno, tmp);
       if (regno < 15)
        rdp_store_one_register (1 << regno, tmp);
@@ -703,7 +721,7 @@ rdp_set_command_line (char *command, char *args)
   if (commandline != NULL)
     xfree (commandline);
 
-  xasprintf (&commandline, "%s %s", command, args);
+  commandline = xstrprintf ("%s %s", command, args);
 }
 
 static void
@@ -1163,7 +1181,7 @@ remote_rdp_open (char *args, int from_tty)
   flush_cached_frames ();
   registers_changed ();
   stop_pc = read_pc ();
-  print_stack_frame (get_selected_frame (), -1, 1);
+  print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
 }
 
 
@@ -1333,7 +1351,8 @@ remote_rdp_files_info (struct target_ops *target)
 
 
 static void
-remote_rdp_create_inferior (char *exec_file, char *allargs, char **env)
+remote_rdp_create_inferior (char *exec_file, char *allargs, char **env,
+                           int from_tty)
 {
   CORE_ADDR entry_point;
 
@@ -1403,6 +1422,8 @@ init_remote_rdp_ops (void)
   remote_rdp_ops.to_magic = OPS_MAGIC;
 }
 
+extern initialize_file_ftype _initialize_remote_rdp; /* -Wmissing-prototypes */
+
 void
 _initialize_remote_rdp (void)
 {
This page took 0.026128 seconds and 4 git commands to generate.