1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright 2015 Joyent, Inc. 13.\" 14.Dd May 11, 2016 15.Dt PDELBKPT 3PROC 16.Os 17.Sh NAME 18.Nm Pdelbkpt 19.Nd clear a breakpoint in a process 20.Sh LIBRARY 21.Lb libproc 22.Sh SYNOPSIS 23.In libproc.h 24.Ft int 25.Fo Pdelbkpt 26.Fa "struct ps_prochandle *P" 27.Fa "uintptr_t address" 28.Fa "ulong_t saved" 29.Fc 30.Sh DESCRIPTION 31The 32.Fn Pdelbkpt 33function removes the breakpoint installed at 34.Fa address 35from process 36.Fa P . 37Restoring the instruction present in 38.Fa saved . 39.Pp 40If the instruction at 41.Fa address 42is no longer the architecture-specific breakpoint instruction, then 43.Fa saved 44is not restored, but the function still returns successfully. 45This behavior is done due to the presence of setting breakpoints in 46self-modifying code, e.g. procedure linkage tables. 47.Pp 48The 49.Fn Pdelbkpt 50function only works on running processes, such as those created through 51.Xr Pgrab 3PROC 52and 53.Xr Pcreate 3PROC . 54Attempting to remove a breakpoint from process handles to core files, 55zombie processes, or ELF objects will fail. 56.Sh RETURN VALUES 57Upon successful completion, the 58.Fn Pdelbkpt 59function removes the breakpoint and 60returns 61.Sy 0 . 62Otherwise, 63.Sy -1 64is returned, and 65.Sy errno 66is set to indicate the error. 67.Sh ERRORS 68For a full list of possible errors see the 69.Sy DIAGNOSTICS 70section in 71.Xr proc 4 . 72.Pp 73The 74.Fn Pdelbkpt 75function will fail with: 76.Bl -tag -width Er 77.It Er ENOENT 78The handle 79.Fa P 80refers to a grabbed core file, a zombie process, or an ELF object. 81.El 82.Sh INTERFACE STABILITY 83.Sy Uncommitted 84.Sh MT-LEVEL 85See 86.Sy LOCKING 87in 88.Xr libproc 3LIB . 89.Sh SEE ALSO 90.Xr libproc 3LIB , 91.Xr Pcreate 3PROC , 92.Xr Pgrab 3PROC , 93.Xr Pgrab_core 3PROC , 94.Xr Pgrab_file 3PROC , 95.Xr Psetbkpt 3PROC , 96.Xr proc 4 97