summaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2015-07-08 12:18:32 +0200
committerTristan Gingold <gingold@adacore.com>2015-11-23 15:29:57 +0100
commitaa14fb50785c8ac8be5fbb148d7cdd88fcf8f896 (patch)
tree39c201b71f77756517c2033aa2c9059994f56c60 /gdb/darwin-nat.c
parentad2073b0b48e23028ca9b4d348970690d4501933 (diff)
darwin-nat: disable sstep cache.
Was not reliable after inferior call.
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index cb2b08eaa8..457ba89e76 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -245,12 +245,12 @@ unparse_exception_type (unsigned int i)
static int
darwin_ptrace (const char *name,
- int request, int pid, PTRACE_TYPE_ARG3 arg3, int arg4)
+ int request, int pid, caddr_t arg3, int arg4)
{
int ret;
errno = 0;
- ret = ptrace (request, pid, (caddr_t) arg3, arg4);
+ ret = ptrace (request, pid, arg3, arg4);
if (ret == -1 && errno == 0)
ret = 0;
@@ -728,7 +728,7 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread,
{
/* Either deliver a new signal or cancel the signal received. */
res = PTRACE (PT_THUPDATE, inf->pid,
- (void *)(uintptr_t)thread->gdb_port, nsignal);
+ (caddr_t)thread->gdb_port, nsignal);
if (res < 0)
inferior_debug (1, _("ptrace THUP: res=%d\n"), res);
}
@@ -743,13 +743,10 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread,
}
/* Set or reset single step. */
- if (step != thread->single_step)
- {
- inferior_debug (4, _("darwin_set_sstep (thread=0x%x, enable=%d)\n"),
- thread->gdb_port, step);
- darwin_set_sstep (thread->gdb_port, step);
- thread->single_step = step;
- }
+ inferior_debug (4, _("darwin_set_sstep (thread=0x%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;