[dev] ignore register read error

This commit is contained in:
nganhkhoa 2025-05-21 01:07:49 +07:00
parent 9c6f5c64fb
commit 091a8666a5

4
main.c
View File

@ -177,7 +177,9 @@ static void tracer(pid_t ppid) {
if (WSTOPSIG(status) == (SIGTRAP | 0x80)) {
struct user_regs_struct regs;
if (ptrace(PTRACE_GETREGS, pid, NULL, &regs) == -1) {
die("Cannot get registers");
// TODO: this reaches, even though the stop reason is syscall
// printf("error=%d pid=%d\n", errno, pid);
printf("Cannot get registers\n");
continue;
}