xref: /freebsd/lib/libsysdecode/sysdecode_utrace.3 (revision 4f8f43b06ed07e96a250855488cc531799d5b78f)
1.\"
2.\" Copyright (c) 2015 John Baldwin <jhb@FreeBSD.org>
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd November 24, 2017
26.Dt sysdecode_utrace 3
27.Os
28.Sh NAME
29.Nm sysdecode_utrace
30.Nd produce text description of a utrace record
31.Sh LIBRARY
32.Lb libsysdecode
33.Sh SYNOPSIS
34.In sysdecode.h
35.Ft int
36.Fn sysdecode_utrace "FILE *fp" "void *buf" "size_t len" "int decimal"
37.Sh DESCRIPTION
38The
39.Fn sysdecode_utrace
40function outputs a textual representation of a
41.Xr utrace 2
42record identified by
43.Fa buf
44and
45.Fa len
46to the output stream
47.Fa fp .
48.Pp
49The function only outputs a representation for certain types of records.
50If a record is recognized,
51the function outputs the description and returns a non-zero value.
52If the record is not recognized,
53the function does not output anything and returns zero.
54The
55.Fn sysdecode_utrace
56function currently recognizes
57.Xr utrace 2
58records generated by
59.Xr malloc 3
60and
61.Xr rtld 1 .
62.Sh RETURN VALUES
63The
64.Fn sysdecode_utrace
65function returns a non-zero value if it recognizes a
66.Xr utrace 2
67record;
68otherwise it returns zero.
69.Sh SEE ALSO
70.Xr utrace 2 ,
71.Xr sysdecode 3
72