nrelease - fix/improve livecd
[dragonfly.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: src/lib/libc/sys/utrace.2,v 1.3 2004/07/03 23:14:34 ru Exp $
37 .\"
38 .Dd November 24, 2019
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/ktrace.h
51 .Ft int
52 .Fn utrace "const void *addr" "size_t len"
53 .Sh DESCRIPTION
54 Adds a record to the process trace with information supplied by user.
55 The record contains
56 .Fa len
57 bytes from memory pointed to by
58 .Fa addr .
59 This call only has an effect if the calling process is being traced.
60 .Sh RETURN VALUES
61 .Rv -std
62 .Sh ERRORS
63 .Bl -tag -width Er
64 .It Bq Er EINVAL
65 Specified data length
66 .Fa len
67 was bigger than
68 .Dv KTR_USER_MAXLEN .
69 .It Bq Er ENOSYS
70 Currently running kernel was compiled without
71 .Xr ktrace 2
72 support
73 .Pq Cd "options KTRACE" .
74 .El
75 .Sh SEE ALSO
76 .Xr kdump 1 ,
77 .Xr ktrace 1 ,
78 .Xr ktrace 2
79 .Sh HISTORY
80 The
81 .Fn utrace
82 system call first appeared in
83 .Fx 2.2 .