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 <[email protected]>. 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 11, 2015 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/param.h 41.In sys/time.h 42.In sys/uio.h 43.In sys/ktrace.h 44.Ft int 45.Fn utrace "const void *addr" "size_t len" 46.Sh DESCRIPTION 47Adds a record to the process trace with information supplied by user. 48The record contains 49.Fa len 50bytes from memory pointed to by 51.Fa addr . 52This call only has an effect if the calling process is being traced. 53.Sh RETURN VALUES 54.Rv -std 55.Sh ERRORS 56.Bl -tag -width Er 57.It Bq Er EINVAL 58Specified data length 59.Fa len 60was bigger than 61.Dv KTR_USER_MAXLEN . 62.It Bq Er ENOMEM 63Insufficient memory to honor the request. 64.It Bq Er ENOSYS 65Currently running kernel was compiled without 66.Xr ktrace 2 67support 68.Pq Cd "options KTRACE" . 69.El 70.Sh SEE ALSO 71.Xr kdump 1 , 72.Xr ktrace 1 , 73.Xr truss 1 , 74.Xr ktrace 2 , 75.Xr sysdecode_utrace 3 76.Sh HISTORY 77The 78.Fn utrace 79system call first appeared in 80.Fx 2.2 . 81