summaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2012-04-11 13:17:00 +0000
committerTristan Gingold <gingold@adacore.com>2012-04-11 13:17:00 +0000
commit7d0a281e40d1cd28b0000830bd9d5a18e40f5f45 (patch)
tree9003dde760636bffc7038252cd0e26ce6667a470 /gdb/darwin-nat.c
parentba18e27c42c6baab0a90a19d2379292c6a459b91 (diff)
downloadgdb-7d0a281e40d1cd28b0000830bd9d5a18e40f5f45.tar.gz
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.
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index df2b7611421..3c5ddbef9b4 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -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;