2012-04-11 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 11 Apr 2012 13:17:05 +0000 (13:17 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 11 Apr 2012 13:17:05 +0000 (13:17 +0000)
PR gdb/13901
* darwin-nat.c (darwin_resume_thread): Call darwin_set_sstep only
in case of change.

gdb/ChangeLog
gdb/darwin-nat.c

index 20fd5735b3bf988159afc30873126cd79b1a9613..1d65759d129e3633eb09e87bfcaaf00d94d7a281 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-11  Tristan Gingold  <gingold@adacore.com>
+
+       PR gdb/13901
+       * darwin-nat.c (darwin_resume_thread): Call darwin_set_sstep only
+       in case of change.
+
 2012-04-11  Tristan Gingold  <gingold@adacore.com>
 
        * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Fix
 2012-04-02  Tristan Gingold  <gingold@adacore.com>
 
        PR gdb/13901
-       * darwin-nat.c (darwin_execvp): Sey binary preference.
+       * darwin-nat.c (darwin_execvp): Set binary preference.
 
 2012-04-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
index df2b7611421efe8a4db44a264b29234ac2028587..3c5ddbef9b425b493899d7001fbd0c57ba418ece 100644 (file)
@@ -705,11 +705,14 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread,
          thread->signaled = 1;
        }
 
-      /* Set single step.  */
-      inferior_debug (4, _("darwin_set_sstep (thread=%x, enable=%d)\n"),
-                      thread->gdb_port, step);
-      darwin_set_sstep (thread->gdb_port, step);
-      thread->single_step = step;
+      /* Set or reset single step.  */
+      if (step != thread->single_step)
+       {
+         inferior_debug (4, _("darwin_set_sstep (thread=%x, enable=%d)\n"),
+                         thread->gdb_port, step);
+         darwin_set_sstep (thread->gdb_port, step);
+         thread->single_step = step;
+       }
 
       darwin_send_reply (inf, thread);
       thread->msg_state = DARWIN_RUNNING;