This is a wish list of features we'd like to see implemented in the Linux kernel.

In no particular order:

* A PTRACE_GET_SIGINFO variant that returns the siginfo_t object in the architecture of the inferior, rather than the architecture of the kernel.

* TRAP_BRKPT on x86 (better, on all archs that need to unwind the PC on breakpoints. Better yet, on all archs).

It would be useful for the kernel to tell us whether a SIGTRAP corresponds to a breakpoint hit or a finished single-step (or something else), without having to resort to heuristics. Checking for the existence of an int3 in memory at PC-1 is not a complete solution, as the breakpoint might be gone already. This is actually useful both for ptracers and in-process self debuggers.

Some archs started encoding trap discrimination on SIGTRAPs si_code. E.g., on PPC boxes one can 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
};

But unfortunately, x86 doesn't implement this.

* A PTRACE_O_SYSCALL(_ENTER|_EXIT) ptrace option, along with PTRACE_EVENT_SYSCALL(_ENTER|_EXIT).

* A way to filter which signals the tracer is interested in.

* A way to use ptrace without signals or wait.

* This thread has a few more ideas.

None: LinuxKernelWishList (last edited 2013-01-08 17:01:29 by PedroAlves)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.