Blame dwarfgen/dwarfgen.1

Packit cdaae3
.Dd $Mdocdate$
Packit cdaae3
.Dt DWARFGEN \&1 "dwarfdump and libdwarf"
Packit cdaae3
.Os
Packit cdaae3
.Sh NAME
Packit cdaae3
.Nm dwarfgen
Packit cdaae3
.Nd generate example DWARF data.
Packit cdaae3
.Sh SYNOPSIS
Packit cdaae3
.Nm
Packit cdaae3
.Op Fl t Ar type
Packit cdaae3
.Op Fl o Ar outpath
Packit cdaae3
.Op Fl c cunum
Packit cdaae3
.Ar pathname
Packit cdaae3
.
Packit cdaae3
.Sh DESCRIPTION
Packit cdaae3
The
Packit cdaae3
.Nm
Packit cdaae3
creates DWARF sections as requested by specific options.
Packit cdaae3
.Pp
Packit cdaae3
Using some information source, create a tree of dwarf
Packit cdaae3
information (speaking of a DIE tree).
Packit cdaae3
Turn the die tree into dwarfdata using libdwarf producer
Packit cdaae3
and write the resulting data in an object file.
Packit cdaae3
It is a bit inconsistent in error handling just to
Packit cdaae3
demonstrate the various possibilities using the producer
Packit cdaae3
library.
Packit cdaae3
.Pp
Packit cdaae3
Main options:
Packit cdaae3
.Bl -tag -compact
Packit cdaae3
.It Fl t Ar type
Packit cdaae3
what sort of input to read.  May be one of:
Packit cdaae3
.Bl -tag -compact
Packit cdaae3
.It Ar def
Packit cdaae3
means predefined (no input is read, the output
Packit cdaae3
is based on some canned setups built into dwarfgen).
Packit cdaae3
.Ar path
Packit cdaae3
is ignored in this case. This is the default, and does not work.
Packit cdaae3
.It Ar obj
Packit cdaae3
means
Packit cdaae3
.Ar path
Packit cdaae3
is the object file to
Packit cdaae3
read (The dwarf sections are duplicated in the output file.)
Packit cdaae3
Requires 
Packit cdaae3
.Ar path .
Packit cdaae3
.It Ar txt
Packit cdaae3
.Ar path
Packit cdaae3
contains plain text
Packit cdaae3
(in a form rather like output by dwarfdump)
Packit cdaae3
that defines the dwarf that is to be output.
Packit cdaae3
Requires 
Packit cdaae3
.Ar path .
Packit cdaae3
.El
Packit cdaae3
.
Packit cdaae3
.It Fl o Ar outpath
Packit cdaae3
specifies the pathname of the output object. If not supplied,
Packit cdaae3
.Pa testout.o
Packit cdaae3
is used as the default output path.
Packit cdaae3
.
Packit cdaae3
.It Fl c Ar cunum
Packit cdaae3
supplies a CU number of the
Packit cdaae3
.Ql obj
Packit cdaae3
.Ar type
Packit cdaae3
input to read .
Packit cdaae3
.\" not "output" ??? jkl
Packit cdaae3
because the dwarf producer wants just one CU.
Packit cdaae3
Default is -1 which won't match anything.
Packit cdaae3
.El
Packit cdaae3
.Pp
Packit cdaae3
Other options:
Packit cdaae3
.Bl -tag -compact
Packit cdaae3
.It Fl h
Packit cdaae3
transform high PC to const. 
Packit cdaae3
.It Fl s
Packit cdaae3
output as text.
Packit cdaae3
.It Fl r
Packit cdaae3
show relocation details.
Packit cdaae3
.It Fl v Ar version
Packit cdaae3
DWARF version 2, 3, 4, or 5. 
Packit cdaae3
.It Fl p Ar size
Packit cdaae3
pointer size, 4 or 8.
Packit cdaae3
.It Fl f Ar offset
Packit cdaae3
offset size, 4 or 8.
Packit cdaae3
.El
Packit cdaae3
.
Packit cdaae3
.\" .Sh ENVIRONMENT
Packit cdaae3
.\" For sections 1, 6, 7, and 8 only.
Packit cdaae3
.\" .Sh FILES
Packit cdaae3
.\" .Sh EXIT	STATUS
Packit cdaae3
.\" For sections 1, 6, and 8 only.
Packit cdaae3
.\" .Sh EXAMPLES
Packit cdaae3
.\" .Sh DIAGNOSTICS
Packit cdaae3
.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
Packit cdaae3
.\" .Sh SEE ALSO
Packit cdaae3
.\" .Xr foobar 1
Packit cdaae3
.\" .Sh STANDARDS
Packit cdaae3
.\" .Sh HISTORY
Packit cdaae3
.\" .Sh AUTHORS
Packit cdaae3
.\" .Sh CAVEATS
Packit cdaae3
.\" .Sh BUGS