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.\" $DragonFly: src/lib/libc/sys/utrace.2,v 1.1 2008/10/16 07:58:43 matthias Exp $ 38.\" 39.Dd October 16, 2008 40.Dt UTRACE 2 41.Os 42.Sh NAME 43.Nm utrace 44.Nd insert user record in ktrace log 45.Sh LIBRARY 46.Lb libc 47.Sh SYNOPSIS 48.In sys/types.h 49.In sys/param.h 50.In sys/time.h 51.In sys/uio.h 52.In sys/ktrace.h 53.Ft int 54.Fn utrace "const void *addr" "size_t len" 55.Sh DESCRIPTION 56Adds a record to the process trace with information supplied by user. 57The record contains 58.Fa len 59bytes from memory pointed to by 60.Fa addr . 61This call only has an effect if the calling process is being traced. 62.Sh RETURN VALUES 63.Rv -std 64.Sh ERRORS 65.Bl -tag -width Er 66.It Bq Er EINVAL 67Specified data length 68.Fa len 69was bigger than 70.Dv KTR_USER_MAXLEN . 71.It Bq Er ENOSYS 72Currently running kernel was compiled without 73.Xr ktrace 2 74support 75.Pq Cd "options KTRACE" . 76.El 77.Sh SEE ALSO 78.Xr kdump 1 , 79.Xr ktrace 1 , 80.Xr ktrace 2 81.Sh HISTORY 82The 83.Fn utrace 84system call first appeared in 85.Fx 2.2 . 86