Is it possible to set a gdb watchpoint programmatically?

Set hardware watchpoint from child process. #include <signal.h> #include <syscall.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <sys/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include <linux/user.h> enum { DR7_BREAK_ON_EXEC = 0, DR7_BREAK_ON_WRITE = 1, DR7_BREAK_ON_RW = 3, }; enum { DR7_LEN_1 = 0, DR7_LEN_2 = 1, DR7_LEN_4 = 3, }; typedef struct { char l0:1; … Read more