xref: /illumos-gate/usr/src/tools/scripts/ctfconvert.1onbld (revision 273d774d1d685415fd99d31224bdae55e7cfb793)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
12.\"
13.Dd October 23, 2020
14.Dt ctfconvert 1ONBLD
15.Os
16.Sh NAME
17.Nm ctfconvert
18.Nd Convert ELF object debug data to CTF container
19.Sh SYNOPSIS
20.Nm
21.Op Fl ikm
22.Op Fl b Ar batchsize
23.Op Fl j Ar threads
24.Op Fl l Ar label | Fl L Ar labelenv
25.Op Fl o Ar outfile
26.Ar ELF_object
27.Sh DESCRIPTION
28The
29.Nm
30utility converts debug information found within
31.Ar ELF_object
32to CTF data and adds this to a CTF container.
33.Ar ELF_object
34can be a single object file or a fully linked object such as a shared library
35or binary.
36.Nm
37currently supports input debug data in DWARFv2 or DWARFv4 format.
38Unless the
39.Fl o
40option is present, this is done in-place; the original file being modified
41with a new CTF container being added.
42For in-place processing, unless the
43.Fl k
44option is present, the source file will be removed if an error occurs.
45.Sh OPTIONS
46The following options are supported:
47.Bl -tag -width Ar
48.It Fl i
49Ignore files not built partially from C sources.
50.Nm
51will usually check
52.Ar ELF_object
53to see if at least one of the input files was a
54.Sq .c
55file, and exit with an error if not.
56The
57.Fl i
58option overrides this check and allows processing to continue.
59.It Fl k
60When processing a file in-place and an error occurs, keep the input file
61rather than deleting it.
62.It Fl m
63Allow
64.Ar ELF_object
65to have missing debug data.
66By default,
67.Nm
68requires that each C source compilation unit in
69.Ar ELF_object
70contains debug data, and will exit with an error if this is not the case.
71The
72.Fl m
73option relaxes this restriction allowing processing of such files.
74Note that if the file contains no debug data in any of the compilation units
75then this flag will cause
76.Nm
77to exit successfully without taking any action, and can mask missing CTF data.
78.It Fl b Ar batchsize
79Batch-process this many compilation units from the source file at once (default
80256). This helps to reduce memory usage when processing large objects which
81were built from many source files.
82.It Fl j Ar threads
83Use this many threads to perform the merge (default 4).
84.It Fl l Ar label
85Set the output container's label to the specified value.
86.It Fl L Ar labelenv
87Set the output container's label to the value of the specified environment
88variable.
89.It Fl o Ar outfile
90Write the new object with added CTF ta to the specified output file, rather
91than updating the input in-place.
92.El
93.Sh OPERANDS
94The following operands are supported:
95.Bl -tag -width Ar
96.It Ar object_file
97The source object file to process.
98.El
99.Sh EXIT STATUS
100.Bl -inset
101.It Sy 0
102.Dl Execution completed successfully.
103.It Sy 1
104.Dl A fatal error occurred.
105.It Sy 2
106.Dl Invalid command line options were specified.
107.El
108.Sh INTERFACE STABILITY
109The command line interface of
110.Nm
111is
112.Sy Uncommitted .
113.Sh SEE ALSO
114.Xr ctfdiff 1 ,
115.Xr ctfdump 1 ,
116.Xr ctf 4
117