Revision | aa14fb50785c8ac8be5fbb148d7cdd88fcf8f896 (tree) |
---|---|
Time | 2015-11-23 23:29:57 |
Author | Tristan Gingold <gingold@adac...> |
Commiter | Tristan Gingold |
darwin-nat: disable sstep cache.
Was not reliable after inferior call.
@@ -1,5 +1,11 @@ | ||
1 | 1 | 2015-11-23 Tristan Gingold <gingold@adacore.com> |
2 | 2 | |
3 | + * darwin-nat.c (darwin_ptrace): Avoid a cast. | |
4 | + (darwin_resume_thread): Ditto. And always set or reset | |
5 | + single step. | |
6 | + | |
7 | +2015-11-23 Tristan Gingold <gingold@adacore.com> | |
8 | + | |
3 | 9 | * darwin-nat.c (darwin_read_dyld_info): Write address in |
4 | 10 | big-endian order. |
5 | 11 | * solib-darwin.c (darwin_validate_exec_header): New function, |
@@ -245,12 +245,12 @@ unparse_exception_type (unsigned int i) | ||
245 | 245 | |
246 | 246 | static int |
247 | 247 | darwin_ptrace (const char *name, |
248 | - int request, int pid, PTRACE_TYPE_ARG3 arg3, int arg4) | |
248 | + int request, int pid, caddr_t arg3, int arg4) | |
249 | 249 | { |
250 | 250 | int ret; |
251 | 251 | |
252 | 252 | errno = 0; |
253 | - ret = ptrace (request, pid, (caddr_t) arg3, arg4); | |
253 | + ret = ptrace (request, pid, arg3, arg4); | |
254 | 254 | if (ret == -1 && errno == 0) |
255 | 255 | ret = 0; |
256 | 256 |
@@ -728,7 +728,7 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread, | ||
728 | 728 | { |
729 | 729 | /* Either deliver a new signal or cancel the signal received. */ |
730 | 730 | res = PTRACE (PT_THUPDATE, inf->pid, |
731 | - (void *)(uintptr_t)thread->gdb_port, nsignal); | |
731 | + (caddr_t)thread->gdb_port, nsignal); | |
732 | 732 | if (res < 0) |
733 | 733 | inferior_debug (1, _("ptrace THUP: res=%d\n"), res); |
734 | 734 | } |
@@ -743,13 +743,10 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread, | ||
743 | 743 | } |
744 | 744 | |
745 | 745 | /* Set or reset single step. */ |
746 | - if (step != thread->single_step) | |
747 | - { | |
748 | - inferior_debug (4, _("darwin_set_sstep (thread=0x%x, enable=%d)\n"), | |
749 | - thread->gdb_port, step); | |
750 | - darwin_set_sstep (thread->gdb_port, step); | |
751 | - thread->single_step = step; | |
752 | - } | |
746 | + inferior_debug (4, _("darwin_set_sstep (thread=0x%x, enable=%d)\n"), | |
747 | + thread->gdb_port, step); | |
748 | + darwin_set_sstep (thread->gdb_port, step); | |
749 | + thread->single_step = step; | |
753 | 750 | |
754 | 751 | darwin_send_reply (inf, thread); |
755 | 752 | thread->msg_state = DARWIN_RUNNING; |