Re: [PATCHSET ptrace] ptrace: implement PTRACE_SEIZE/INTERRUPT andgroup stop notification, take#4

From: Tejun Heo
Date: Thu Jun 16 2011 - 04:38:38 EST


Hello, Pedro. Sorry about late reply.

On Fri, Jun 03, 2011 at 11:25:15AM +0100, Pedro Alves wrote:
> Some archs started encoding some of that stuff on SIGTRAPs si_code.
> E.g., on a ppc box I got here, I see:
>
> /* `si_code' values for SIGTRAP signal. */
> enum
> {
> TRAP_BRKPT = 1, /* Process breakpoint. */
> # define TRAP_BRKPT TRAP_BRKPT
> TRAP_TRACE /* Process trace trap. */
> # define TRAP_TRACE TRAP_TRACE
> };

Yeap, several archs seem to have grown their own tricks.

> It'd be _very_ useful for x86 (and others) to have
> something like TRAP_BRKPT for int3. Both for ptracers
> and in-process self debuggers.
>
> I'd be super happy to be told we have that already
> in recent kernels and I missed it. :-)

Unfortunately, AFAICS, x86 doesn't have it nor is there a generic
mechanism, but this should be solvable without disrupting existing
users.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/