table of contents
| DWARFGEN(1) | 1 (dwarfdump and libdwarf) | DWARFGEN(1) |
NAME¶
dwarfgen —
generate example DWARF data.
SYNOPSIS¶
dwarfgen |
[-t type]
[-o outpath]
[-c -cunum]
pathname |
DESCRIPTION¶
The dwarfgen creates DWARF sections as
requested by specific options.
Using some information source, create a tree of dwarf information (speaking of a DIE tree). Turn the die tree into dwarfdata using libdwarf producer and write the resulting data in an object file. It is a bit inconsistent in error handling just to demonstrate the various possibilities using the producer library.
Main options:
-ttype- what sort of input to read. May be one of:
- def
- means predefined (no input is read, the output is based on some canned setups built into dwarfgen). path is ignored in this case. This is the default, and does not work.
- obj
- means path is the object file to read (The dwarf sections are duplicated in the output file.) Requires path.
- txt
- path contains plain text (in a form rather like output by dwarfdump) that defines the dwarf that is to be output. Requires path.
-ooutpath- specifies the pathname of the output object. If not supplied, testout.o is used as the default output path.
-ccunum- supplies a CU number of the ‘
obj’ type input to read . because the dwarf producer wants just one CU. Default is -1 which won't match anything.
Other options:
| November 2, 2025 | Linux 6.4.0-150700.53.19-default |