Deleted Added
full compact
procfs_dbregs.c (94622) procfs_dbregs.c (96886)
1/*-
2 * Copyright (c) 1999 Brian Scott Dean, brdean@unx.sas.com.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Jan-Simon Pendry under the following copyrights and conditions:
7 *
8 * Copyright (c) 1993 Jan-Simon Pendry

--- 30 unchanged lines hidden (view full) ---

39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 * From: @(#)procfs_regs.c 8.4 (Berkeley) 6/15/94
44 *
45 * From:
46 * $Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
1/*-
2 * Copyright (c) 1999 Brian Scott Dean, brdean@unx.sas.com.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Jan-Simon Pendry under the following copyrights and conditions:
7 *
8 * Copyright (c) 1993 Jan-Simon Pendry

--- 30 unchanged lines hidden (view full) ---

39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 * From: @(#)procfs_regs.c 8.4 (Berkeley) 6/15/94
44 *
45 * From:
46 * $Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
47 * $FreeBSD: head/sys/fs/procfs/procfs_dbregs.c 94622 2002-04-13 23:14:08Z jhb $
47 * $FreeBSD: head/sys/fs/procfs/procfs_dbregs.c 96886 2002-05-19 00:14:50Z jhb $
48 */
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/lock.h>
53#include <sys/mutex.h>
54#include <sys/proc.h>
55#include <sys/ptrace.h>

--- 8 unchanged lines hidden (view full) ---

64procfs_doprocdbregs(PFS_FILL_ARGS)
65{
66 int error;
67 struct dbreg r;
68 char *kv;
69 int kl;
70
71 PROC_LOCK(p);
48 */
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/lock.h>
53#include <sys/mutex.h>
54#include <sys/proc.h>
55#include <sys/ptrace.h>

--- 8 unchanged lines hidden (view full) ---

64procfs_doprocdbregs(PFS_FILL_ARGS)
65{
66 int error;
67 struct dbreg r;
68 char *kv;
69 int kl;
70
71 PROC_LOCK(p);
72 if (p_candebug(td->td_proc, p) != 0) {
72 if (p_candebug(td, p) != 0) {
73 PROC_UNLOCK(p);
74 return (EPERM);
75 }
76 kl = sizeof(r);
77 kv = (char *) &r;
78
79 kv += uio->uio_offset;
80 kl -= uio->uio_offset;

--- 24 unchanged lines hidden ---
73 PROC_UNLOCK(p);
74 return (EPERM);
75 }
76 kl = sizeof(r);
77 kv = (char *) &r;
78
79 kv += uio->uio_offset;
80 kl -= uio->uio_offset;

--- 24 unchanged lines hidden ---