by popular (overwhelming) demand, -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it now prevents enlightenment_start from ptracing, which allows gdb attaching once more
SVN revision: 79202
This commit is contained in:
parent
80858ec4fc
commit
e97ccf53cd
|
@ -417,8 +417,9 @@ main(int argc, char **argv)
|
||||||
else if (child == 0)
|
else if (child == 0)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
/* in the child */
|
if (!really_know)
|
||||||
ptrace(PT_TRACE_ME, 0, NULL, NULL);
|
/* in the child */
|
||||||
|
ptrace(PT_TRACE_ME, 0, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
execv(args[0], args);
|
execv(args[0], args);
|
||||||
return 0; /* We failed, 0 mean normal exit from E with no restart or crash so let exit */
|
return 0; /* We failed, 0 mean normal exit from E with no restart or crash so let exit */
|
||||||
|
@ -431,11 +432,12 @@ main(int argc, char **argv)
|
||||||
int status;
|
int status;
|
||||||
Eina_Bool done = EINA_FALSE;
|
Eina_Bool done = EINA_FALSE;
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
ptrace(PT_ATTACH, child, NULL, NULL);
|
if (!really_know)
|
||||||
|
ptrace(PT_ATTACH, child, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
result = waitpid(child, &status, 0);
|
result = waitpid(child, &status, 0);
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
if (!stop_ptrace)
|
if ((!really_know) && (!stop_ptrace))
|
||||||
{
|
{
|
||||||
if (WIFSTOPPED(status))
|
if (WIFSTOPPED(status))
|
||||||
ptrace(PT_CONTINUE, child, NULL, NULL);
|
ptrace(PT_CONTINUE, child, NULL, NULL);
|
||||||
|
@ -459,7 +461,8 @@ main(int argc, char **argv)
|
||||||
int back;
|
int back;
|
||||||
|
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
r = ptrace(PTRACE_GETSIGINFO, child, NULL, &sig);
|
if (!really_know)
|
||||||
|
r = ptrace(PTRACE_GETSIGINFO, child, NULL, &sig);
|
||||||
#endif
|
#endif
|
||||||
back = r == 0 &&
|
back = r == 0 &&
|
||||||
sig.si_signo != SIGTRAP ? sig.si_signo : 0;
|
sig.si_signo != SIGTRAP ? sig.si_signo : 0;
|
||||||
|
@ -485,13 +488,15 @@ main(int argc, char **argv)
|
||||||
sig.si_signo != SIGABRT))
|
sig.si_signo != SIGABRT))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
ptrace(PT_CONTINUE, child, NULL, back);
|
if (!really_know)
|
||||||
|
ptrace(PT_CONTINUE, child, NULL, back);
|
||||||
#endif
|
#endif
|
||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
/* E17 should be in pause, we can detach */
|
if (!really_know)
|
||||||
ptrace(PT_DETACH, child, NULL, back);
|
/* E17 should be in pause, we can detach */
|
||||||
|
ptrace(PT_DETACH, child, NULL, back);
|
||||||
#endif
|
#endif
|
||||||
/* And call gdb if available */
|
/* And call gdb if available */
|
||||||
if (home)
|
if (home)
|
||||||
|
@ -554,7 +559,8 @@ main(int argc, char **argv)
|
||||||
kill(child, SIGSTOP);
|
kill(child, SIGSTOP);
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
#ifdef HAVE_SYS_PTRACE_H
|
#ifdef HAVE_SYS_PTRACE_H
|
||||||
ptrace(PT_DETACH, child, NULL, NULL);
|
if (!really_know)
|
||||||
|
ptrace(PT_DETACH, child, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue