Tue Aug 12 14:37:18 1997 Geoffrey Noer <noer@cygnus.com>
authorGeoffrey Noer <noer@cygnus>
Tue, 12 Aug 1997 21:38:54 +0000 (21:38 +0000)
committerGeoffrey Noer <noer@cygnus>
Tue, 12 Aug 1997 21:38:54 +0000 (21:38 +0000)
        * ocd.c (ocd_wait): loop until we're in BDM mode instead of
        assuming control has returned to GDB.

gdb/ChangeLog
gdb/ocd.c

index cd4528532b32038500a8912f70059d3de625ea9d..ed6635dc87e6a5428c281c366c7b30c3d6eb3498 100644 (file)
@@ -1,3 +1,8 @@
+Tue Aug 12 14:37:18 1997  Geoffrey Noer  <noer@cygnus.com>
+
+       * ocd.c (ocd_wait): loop until we're in BDM mode instead of
+       assuming control has returned to GDB.
+
 start-sanitize-gdbtk
 Tue Aug 12 16:35:21 1997  Ian Lance Taylor  <ian@cygnus.com>
 
index 721ae3fff72b3f45e8bb7f9ec2c88b4ff8ecdba1..a853080fe0a75cca2c6c51b5d087f2d085aeb7e8 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -453,7 +453,10 @@ ocd_wait ()
 
   /* Target may already be stopped by the time we get here. */
 
-  if (!(last_run_status & OCD_FLAG_BDM))
+/* if (!(last_run_status & OCD_FLAG_BDM)) */
+
+  /* Loop until we've dropped back into BDM mode */
+  while (!(last_run_status & OCD_FLAG_BDM))
     {
       ofunc = (void (*)()) signal (SIGINT, ocd_interrupt);
 
@@ -464,19 +467,20 @@ ocd_wait ()
       if (pktlen < 2)
        error ("Truncated response packet from OCD device");
 
-      status = p[1];
+      last_run_status = p[1];
       error_code = p[2];
 
       if (error_code != 0)
        ocd_error ("target_wait:", error_code);
 
-      if (status & OCD_FLAG_PWF)
+      if (last_run_status & OCD_FLAG_PWF)
        error ("OCD device lost VCC at BDM interface.");
-      else if (status & OCD_FLAG_CABLE_DISC)
-       error ("BDM cable appears to have been disconnected.");
-
-      if (!(status & OCD_FLAG_BDM))
+      else if (last_run_status & OCD_FLAG_CABLE_DISC)
+       error ("OCD device cable appears to have been disconnected.");
+#if 0
+      if (!(last_run_status & OCD_FLAG_BDM))
        error ("OCD device woke up, but wasn't stopped: 0x%x", status);
+#endif
     }
 
   if (ocd_interrupt_flag)
This page took 0.038703 seconds and 4 git commands to generate.