2003-06-11 Andrew Cagney <cagney@redhat.com>
[binutils-gdb.git] / gdb / ocd.c
index 3364a912e765536c83d6ed1eeab17cefb9978f84..3c8d5d2936ddda5ae58bd7e71d24193db3bb1c77 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -42,7 +42,7 @@
 
 static int ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
 
-static int ocd_start_remote (PTR dummy);
+static int ocd_start_remote (void *dummy);
 
 static int readchar (int timeout);
 
@@ -171,7 +171,7 @@ ocd_close (int quitting)
 /* Stub for catch_errors.  */
 
 static int
-ocd_start_remote (PTR dummy)
+ocd_start_remote (void *dummy)
 {
   unsigned char buf[10], *p;
   int pktlen;
@@ -254,9 +254,7 @@ ocd_start_remote (PTR dummy)
   flush_cached_frames ();
   registers_changed ();
   stop_pc = read_pc ();
-  set_current_frame (create_new_frame (read_fp (), stop_pc));
-  select_frame (get_current_frame (), 0);
-  print_stack_frame (selected_frame, -1, 1);
+  print_stack_frame (get_selected_frame (), -1, 1);
 
   buf[0] = OCD_LOG_FILE;
   buf[1] = 3;                  /* close existing WIGGLERS.LOG */
@@ -291,29 +289,9 @@ device the OCD device is attached to (e.g. /dev/ttya).");
 
   unpush_target (current_ops);
 
-  if (strncmp (name, "wiggler", 7) == 0)
-    {
-      ocd_desc = serial_open ("ocd");
-      if (!ocd_desc)
-       perror_with_name (name);
-
-      buf[0] = OCD_LOG_FILE;
-      buf[1] = 1;              /* open new or overwrite existing WIGGLERS.LOG */
-      ocd_put_packet (buf, 2);
-      p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-
-      buf[0] = OCD_SET_CONNECTION;
-      buf[1] = 0x01;           /* atoi (name[11]); */
-      ocd_put_packet (buf, 2);
-      p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-    }
-  else
-    /* not using Wigglers.dll */
-    {
-      ocd_desc = serial_open (name);
-      if (!ocd_desc)
-       perror_with_name (name);
-    }
+  ocd_desc = serial_open (name);
+  if (!ocd_desc)
+    perror_with_name (name);
 
   if (baud_rate != -1)
     {
@@ -1387,6 +1365,8 @@ bdm_read_register_command (char *args, int from_tty)
 
 }
 \f
+extern initialize_file_ftype _initialize_remote_ocd; /* -Wmissing-prototypes */
+
 void
 _initialize_remote_ocd (void)
 {