]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - lib/libc/sys/utrace.2
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd December 28, 2000
32 .Dt UTRACE 2
33 .Os
34 .Sh NAME
35 .Nm utrace
36 .Nd insert user record in ktrace log
37 .Sh LIBRARY
38 .Lb libc
39 .Sh SYNOPSIS
40 .In sys/types.h
41 .In sys/param.h
42 .In sys/time.h
43 .In sys/uio.h
44 .In sys/ktrace.h
45 .Ft int
46 .Fn utrace "const void *addr" "size_t len"
47 .Sh DESCRIPTION
48 Adds a record to the process trace with information supplied by user.
49 The record contains
50 .Fa len
51 bytes from memory pointed to by
52 .Fa addr .
53 This call only has an effect if the calling process is being traced.
54 .Sh RETURN VALUES
55 .Rv -std
56 .Sh ERRORS
57 .Bl -tag -width Er
58 .It Bq Er EINVAL
59 Specified data length
60 .Fa len
61 was bigger than
62 .Dv KTR_USER_MAXLEN .
63 .It Bq Er ENOMEM
64 Insufficient memory to honor the request.
65 .It Bq Er ENOSYS
66 Currently running kernel was compiled without
67 .Xr ktrace 2
68 support
69 .Pq Cd "options KTRACE" .
70 .El
71 .Sh SEE ALSO
72 .Xr kdump 1 ,
73 .Xr ktrace 1 ,
74 .Xr ktrace 2
75 .Sh HISTORY
76 The
77 .Fn utrace
78 system call first appeared in
79 .Fx 2.2 .