DWARFGEN(1)
β¨ NAME β¨
okay so bestie, welcome to dwarfgen β it generates example DWARF data. that's it, that's the job, she's a little generator girlie and she's serving π
(this is from the dwarfdump and libdwarf manual set, in case you were wondering which family she runs with π«Ά)
πΈ SYNOPSIS πΈ
dwarfgen [-t type] [-o outpath] [-c -cunum] pathname
π¦ DESCRIPTION π¦
so the way dwarfgen works is she creates DWARF sections as requested by specific options. lowkey iconic behaviour.
using some information source, she creates a tree of dwarf information (we're talking about a DIE tree, iykyk π³). then she turns that die tree into dwarfdata using the libdwarf producer, and writes the resulting data into an object file. and ngl, she's a bit inconsistent in error handling β but that's on purpose, bestie, it's literally just to demonstrate the various possibilities you get from the producer library. it's giving "demo, not production," fr fr.
π Main options π
-ttype β tells her what sort of input to read. may be one of:defβ means predefined. no input is read at all; the output is based on some canned setups built right intodwarfgen.pathis ignored in this case. this is the default, and it does not work. π yeah. we know. she said what she said.objβ meanspathis the object file to read. the dwarf sections are duplicated in the output file. requirespath.txtβpathcontains plain text (in a form rather like output bydwarfdump) that defines the dwarf that is to be output. requirespath.
-ooutpath β specifies the pathname of the output object. if you don't supply it,testout.ois used as the default output path. simple as that π-ccunum β supplies a CU number of theobjtype input to read. because the dwarf producer wants just one CU, okay?? she's monogamous like that. the default is-1, which won't match anything. π
π Other options π
-hβ transform high PC to const.-sβ output as text.-rβ show relocation details.-vversion β DWARF version2,3,4, or5.-psize β pointer size,4or8.-foffset β offset size,4or8.
ngl bestie, this is the part where I remind you: the def type is the default and it does not work. she's not being shady, she's being honest. β¨
okay and for the little sign-off moment: this one's a Debian page, stamped with $Mdocdate$, and she lives under the manual name DWARFGEN(1) β which we already shouted out at the top because that's just how we do it around here. mwah. π«Άπ
π¦ where this page comes from
- alpine 3.22: dwarf-tools-doc 0.9.2-r0 Β· LGPL-2.1-only
- alpine 3.23: dwarf-tools-doc 2.1.0-r0 Β· LGPL-2.1-only
- alpine 3.24: dwarf-tools-doc 2.1.0-r0 Β· LGPL-2.1-only
- epel 10: libdwarf-tools 1:2.2.0-1.el10_2 Β· GPL-2.0-only AND BSD-2-Clause-FreeBSD
- fedora 43: libdwarf-tools 1:2.1.0-3.fc43 Β· GPL-2.0-only AND BSD-2-Clause-FreeBSD
- fedora 44: libdwarf-tools 1:2.3.1-1.fc44 Β· GPL-2.0-only AND BSD-2-Clause-FreeBSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms