PDELBKPT(3PROC) Process Control Library Functions PDELBKPT(3PROC)

NAME


Pdelbkpt - clear a breakpoint in a process

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

int
Pdelbkpt(struct ps_prochandle *P, uintptr_t address, ulong_t saved);

DESCRIPTION


The Pdelbkpt() function removes the breakpoint installed at address from
process P. Restoring the instruction present in saved.

If the instruction at address is no longer the architecture-specific
breakpoint instruction, then saved is not restored, but the function still
returns successfully. This behavior is done due to the presence of setting
breakpoints in self-modifying code, e.g. procedure linkage tables.

The Pdelbkpt() function only works on running processes, such as those
created through Pgrab(3PROC) and Pcreate(3PROC). Attempting to remove a
breakpoint from process handles to core files, zombie processes, or ELF
objects will fail.

RETURN VALUES


Upon successful completion, the Pdelbkpt() function removes the breakpoint
and returns 0. Otherwise, -1 is returned, and errno is set to indicate the
error.

ERRORS


For a full list of possible errors see the DIAGNOSTICS section in proc(4).

The Pdelbkpt() function will fail with:

ENOENT The handle P refers to a grabbed core file, a zombie
process, or an ELF object.

INTERFACE STABILITY


Uncommitted

MT-LEVEL
See LOCKING in libproc(3LIB).

SEE ALSO


libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), Pgrab_core(3PROC),
Pgrab_file(3PROC), Psetbkpt(3PROC), proc(4)

illumos May 11, 2016 illumos