diff options
-rw-r--r-- | debugger.c | 3 | ||||
-rw-r--r-- | misplays.c | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -17,7 +17,8 @@ static const int PTRACE_OPTIONS = PTRACE_O_TRACECLONE | - PTRACE_O_TRACEEXIT | + //PTRACE_O_TRACEEXIT | + PTRACE_O_TRACEEXEC | PTRACE_O_TRACESYSGOOD; static int detect_breakpoint(struct thread *th) { @@ -27,9 +27,10 @@ static pid_t dofork(char **argv, struct console *cons) { } if (pid == 0) { + usleep(100000); console_configslave(cons); close_range(STDERR_FILENO+1, ~0U, CLOSE_RANGE_UNSHARE); - raise(SIGSTOP); // ptrace(PTRACE_TRACEME, 0, NULL, NULL); + //raise(SIGSTOP); // ptrace(PTRACE_TRACEME, 0, NULL, NULL); execvp(argv[0], argv); exit(EXIT_FAILURE); } @@ -209,6 +210,10 @@ int main(int argc, char **argv) { list_insert(processes.end, proc); th = proc->threads.head; + if (child) { + dbg_cont(th, PTRACE_CONT); + } + cursinit(); left = newpan(0, 0, 0, 0); right = newpan(0, 0, 0, 0); |