15d6c4788SMatthias Schmidt.\" $NetBSD: utrace.2,v 1.11 2003/04/24 12:17:49 wiz Exp $ 25d6c4788SMatthias Schmidt.\" 35d6c4788SMatthias Schmidt.\" Copyright (c) 2000 The NetBSD Foundation, Inc. 45d6c4788SMatthias Schmidt.\" All rights reserved. 55d6c4788SMatthias Schmidt.\" 65d6c4788SMatthias Schmidt.\" This code is derived from software contributed to The NetBSD Foundation 75d6c4788SMatthias Schmidt.\" by Gregory McGarry <g.mcgarry@ieee.org>. 85d6c4788SMatthias Schmidt.\" 95d6c4788SMatthias Schmidt.\" Redistribution and use in source and binary forms, with or without 105d6c4788SMatthias Schmidt.\" modification, are permitted provided that the following conditions 115d6c4788SMatthias Schmidt.\" are met: 125d6c4788SMatthias Schmidt.\" 1. Redistributions of source code must retain the above copyright 135d6c4788SMatthias Schmidt.\" notice, this list of conditions and the following disclaimer. 145d6c4788SMatthias Schmidt.\" 2. Redistributions in binary form must reproduce the above copyright 155d6c4788SMatthias Schmidt.\" notice, this list of conditions and the following disclaimer in the 165d6c4788SMatthias Schmidt.\" documentation and/or other materials provided with the distribution. 175d6c4788SMatthias Schmidt.\" 3. All advertising materials mentioning features or use of this software 185d6c4788SMatthias Schmidt.\" must display the following acknowledgement: 195d6c4788SMatthias Schmidt.\" This product includes software developed by the NetBSD 205d6c4788SMatthias Schmidt.\" Foundation, Inc. and its contributors. 215d6c4788SMatthias Schmidt.\" 4. Neither the name of The NetBSD Foundation nor the names of its 225d6c4788SMatthias Schmidt.\" contributors may be used to endorse or promote products derived 235d6c4788SMatthias Schmidt.\" from this software without specific prior written permission. 245d6c4788SMatthias Schmidt.\" 255d6c4788SMatthias Schmidt.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 265d6c4788SMatthias Schmidt.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 275d6c4788SMatthias Schmidt.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 285d6c4788SMatthias Schmidt.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 295d6c4788SMatthias Schmidt.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 305d6c4788SMatthias Schmidt.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 315d6c4788SMatthias Schmidt.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 325d6c4788SMatthias Schmidt.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 335d6c4788SMatthias Schmidt.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 345d6c4788SMatthias Schmidt.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 355d6c4788SMatthias Schmidt.\" 365d6c4788SMatthias Schmidt.\" $FreeBSD: src/lib/libc/sys/utrace.2,v 1.3 2004/07/03 23:14:34 ru Exp $ 375d6c4788SMatthias Schmidt.\" 38*c5803757Szrj.Dd November 24, 2019 395d6c4788SMatthias Schmidt.Dt UTRACE 2 405d6c4788SMatthias Schmidt.Os 415d6c4788SMatthias Schmidt.Sh NAME 425d6c4788SMatthias Schmidt.Nm utrace 435d6c4788SMatthias Schmidt.Nd insert user record in ktrace log 445d6c4788SMatthias Schmidt.Sh LIBRARY 455d6c4788SMatthias Schmidt.Lb libc 465d6c4788SMatthias Schmidt.Sh SYNOPSIS 475d6c4788SMatthias Schmidt.In sys/types.h 485d6c4788SMatthias Schmidt.In sys/param.h 495d6c4788SMatthias Schmidt.In sys/time.h 505d6c4788SMatthias Schmidt.In sys/ktrace.h 515d6c4788SMatthias Schmidt.Ft int 525d6c4788SMatthias Schmidt.Fn utrace "const void *addr" "size_t len" 535d6c4788SMatthias Schmidt.Sh DESCRIPTION 545d6c4788SMatthias SchmidtAdds a record to the process trace with information supplied by user. 555d6c4788SMatthias SchmidtThe record contains 565d6c4788SMatthias Schmidt.Fa len 575d6c4788SMatthias Schmidtbytes from memory pointed to by 585d6c4788SMatthias Schmidt.Fa addr . 595d6c4788SMatthias SchmidtThis call only has an effect if the calling process is being traced. 605d6c4788SMatthias Schmidt.Sh RETURN VALUES 615d6c4788SMatthias Schmidt.Rv -std 625d6c4788SMatthias Schmidt.Sh ERRORS 635d6c4788SMatthias Schmidt.Bl -tag -width Er 645d6c4788SMatthias Schmidt.It Bq Er EINVAL 655d6c4788SMatthias SchmidtSpecified data length 665d6c4788SMatthias Schmidt.Fa len 675d6c4788SMatthias Schmidtwas bigger than 685d6c4788SMatthias Schmidt.Dv KTR_USER_MAXLEN . 695d6c4788SMatthias Schmidt.It Bq Er ENOSYS 705d6c4788SMatthias SchmidtCurrently running kernel was compiled without 715d6c4788SMatthias Schmidt.Xr ktrace 2 725d6c4788SMatthias Schmidtsupport 735d6c4788SMatthias Schmidt.Pq Cd "options KTRACE" . 745d6c4788SMatthias Schmidt.El 755d6c4788SMatthias Schmidt.Sh SEE ALSO 765d6c4788SMatthias Schmidt.Xr kdump 1 , 775d6c4788SMatthias Schmidt.Xr ktrace 1 , 785d6c4788SMatthias Schmidt.Xr ktrace 2 795d6c4788SMatthias Schmidt.Sh HISTORY 805d6c4788SMatthias SchmidtThe 815d6c4788SMatthias Schmidt.Fn utrace 825d6c4788SMatthias Schmidtsystem call first appeared in 835d6c4788SMatthias Schmidt.Fx 2.2 . 84