ptrace - Does android support the PTRACE_SINGLESTEP? -


ok, simple question.does android support ptrace_singlestep when use ptrace systemcall? when want ptrace android apk program, find can't process singlestep trace. situation changed when use ptrace_syscall, can work perfectly. android wipe out function or arm lack supports in hardware? appreciated!thanks.

this core program:

    int main(int argc, char *argv[])    {        if(argc != 2) {     __android_log_print(android_log_debug,tag,"please input pid!");       return -1;     }     if(0 != ptrace(ptrace_attach, target_pid, null, null))    {     __android_log_print(android_log_debug,tag,"ptrace attach error");     return -1;    }     __android_log_print(android_log_debug,tag,"start  monitor process     :%d",target_pid);     while(1)     {     wait(&status);     if(wifexited(status))     {         break;     } if (ptrace(ptrace_singlestep, target_pid, 0, 0) != 0) __android_log_print(android_log_debug,tag,"ptrace_singlestep attach error");     } ptrace(ptrace_detach, target_pid, null, null); __android_log_print(android_log_debug,tag,"monitor finished");    return 0;      } 

i run program on shell. , can root privilege. if change request ptrace_syscall program run normally. if request ptrace_singlestep, program error!

ptrace_singlestep has been removed on arm linux check this


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -