Re: FYI: fix 2 tests when glibc debuginfo is installed

Jan Kratochvil
2011-10-16T11:56:54Z

On Fri, 14 Oct 2011 23:25:10 +0200, Jan Kratochvil wrote:
> Yes. But I do not think it is problem, one can SIGCONT it safely after
> PTRACE_DETACH. Just it may be (T)-stopped for a moment but why not.
>
> The opposite - the upstream 2.6.x kernel state - was IMO worse, it was resumed
> and one could not safely keep it stopped.

Without going into detail one can reach both states with new kernels, just the
default behavior has changed.

sleep 1h&p=$!;sleep 1;kill -STOP $p;sleep 1;grep ^State /proc/$p/status;./gdb -q -batch -p $p -ex q;sleep 1;grep ^State /proc/$p/status;kill -9 $p
GNU gdb (GDB) 7.3.50.20111016-cvs

kernel-2.6.35.14-96.fc14.x86_64:
State: T (stopped)
[... - GDB attach+detach]
State: S (sleeping)

kernel-3.1.0-0.rc6.git0.0.fc17.x86_64
State: T (stopped)
[... - GDB attach+detach]
State: T (stopped)

Regards,
Jan