Hi all,
I static link dynamorio in my app and use like this:
dr_client_main(...) {
dr_register_fork_init_event(...);
drmgr_register_post_syscall_event(...);
}
my_app() {
dr_app_setup();
dr_app_start();
pid_t pid = fork(); // <--- fork_init_event could be triggered here
if (pid > 0) {
// ...
} else {
execve("launch.sh", ...); // <--- fork_init_event would not be triggered here
}
}
I hope I could capture all subprocess init event in launch.sh, but after run execve DR seems lose control of the process, the fork init event not triggered and in post syscall event I could not get SYS_execve event, but SYS_execve event could be get when execve failed. So maybe I mistook something?