]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libc/sys/utrace.2
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libc / sys / utrace.2
1 .\"     $NetBSD: utrace.2,v 1.11 2003/04/24 12:17:49 wiz Exp $
2 .\"
3 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\"
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Gregory McGarry <g.mcgarry@ieee.org>.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\" 3. All advertising materials mentioning features or use of this software
18 .\"    must display the following acknowledgement:
19 .\"      This product includes software developed by the NetBSD
20 .\"      Foundation, Inc. and its contributors.
21 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
22 .\"    contributors may be used to endorse or promote products derived
23 .\"    from this software without specific prior written permission.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 .\"
36 .\" $FreeBSD$
37 .\"
38 .Dd December 28, 2000
39 .Dt UTRACE 2
40 .Os
41 .Sh NAME
42 .Nm utrace
43 .Nd insert user record in ktrace log
44 .Sh LIBRARY
45 .Lb libc
46 .Sh SYNOPSIS
47 .In sys/types.h
48 .In sys/param.h
49 .In sys/time.h
50 .In sys/uio.h
51 .In sys/ktrace.h
52 .Ft int
53 .Fn utrace "const void *addr" "size_t len"
54 .Sh DESCRIPTION
55 Adds a record to the process trace with information supplied by user.
56 The record contains
57 .Fa len
58 bytes from memory pointed to by
59 .Fa addr .
60 This call only has an effect if the calling process is being traced.
61 .Sh RETURN VALUES
62 .Rv -std
63 .Sh ERRORS
64 .Bl -tag -width Er
65 .It Bq Er EINVAL
66 Specified data length
67 .Fa len
68 was bigger than
69 .Dv KTR_USER_MAXLEN .
70 .It Bq Er ENOMEM
71 Insufficient memory to honor the request.
72 .It Bq Er ENOSYS
73 Currently running kernel was compiled without
74 .Xr ktrace 2
75 support
76 .Pq Cd "options KTRACE" .
77 .El
78 .Sh SEE ALSO
79 .Xr kdump 1 ,
80 .Xr ktrace 1 ,
81 .Xr ktrace 2
82 .Sh HISTORY
83 The
84 .Fn utrace
85 system call first appeared in
86 .Fx 2.2 .