DEBUG_SETCONTEXT(2) Linux Programmer's Manual DEBUG_SETCONTEXT(2)NAME
debug_setcontext - allows signal handlers to perform debug functions
SYNOPSIS
#include <asm-powerpc/signal.h>
int debug_setcontext(struct ucontext* ctx, int ndbg, struct sig_dbg_op* dbg, int r6, int r7, int r8, struct pt_regs* regs);
DESCRIPTION
This syscall allows signal handlers to perform debug functions. It
allows the signal handler to turn on single-stepping, for instance, and
the thread will get a trap after executing the next instruction. It
can also (on supported PPC processors) turn on branch tracing and get a
trap after the next branch instruction is executed. This is useful for
in-application debugging. ctx provides the user context. dbg is an
array of debugging ops, where ndbg gives the number of elements in that
array. These are processed sequentially. r6, r7, and r8 are unused.
regs must be valid.
RETURN VALUEdebug_setcontext() returns 0 on success or one of the codes below on
errors.
ERRORS-EINVAL
On any of the dbg elements has a dbg->dbg_type that is neither
SIG_DBG_SINGLE_STEPPING nor SIG_DBG_BRANCH_TRACING.
-EFAULT
If access to the provided ctx is denied.
PORTABILITY
This call exists on the PowerPC (not PPC64) architecture only.
Linux 2.6.17 OCTOBER 2006 DEBUG_SETCONTEXT(2)