DWARF_GET_SECTION_MAX_OFFSETS(3)
π¦ DWARF_GET_SECTION_MAX_OFFSETS(3) π¦
okay so bestie, welcome to DWARF_GET_SECTION_MAX_OFFSETS(3) from the Library Functions Manual β weβre doing DWARF section sizes today and itβs lowkey iconic π
πΈ NAME πΈ
dwarf_get_section_max_offsets, dwarf_get_section_max_offsets_b β return the size of DWARF sections β¨
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf)
π SYNOPSIS π
#include <libdwarf.h>
int
dwarf_get_section_max_offsets(Dwarf_Debug dbg,
Dwarf_Unsigned *debug_info, Dwarf_Unsigned *debug_abbrev,
Dwarf_Unsigned *debug_line, Dwarf_Unsigned *debug_loc,
Dwarf_Unsigned *debug_aranges, Dwarf_Unsigned *debug_macinfo,
Dwarf_Unsigned *debug_pubnames, Dwarf_Unsigned *debug_str,
Dwarf_Unsigned *debug_frame, Dwarf_Unsigned *debug_ranges,
Dwarf_Unsigned *debug_pubtypes);
int
dwarf_get_section_max_offsets_b(Dwarf_Debug dbg,
Dwarf_Unsigned *debug_info, Dwarf_Unsigned *debug_abbrev,
Dwarf_Unsigned *debug_line, Dwarf_Unsigned *debug_loc,
Dwarf_Unsigned *debug_aranges, Dwarf_Unsigned *debug_macinfo,
Dwarf_Unsigned *debug_pubnames, Dwarf_Unsigned *debug_str,
Dwarf_Unsigned *debug_frame, Dwarf_Unsigned *debug_ranges,
Dwarf_Unsigned *debug_pubtypes, Dwarf_Unsigned *debug_types);
π«Ά DESCRIPTION π«Ά
So dwarf_get_section_max_offsets_b() is the main character here: it retrieves the sizes of the DWARF sections in a DWARF debug context. The dbg argument should reference a DWARF debug context allocated using dwarf_init(3).
The function stores the size of each DWARF section into the location pointed to by the argument that corresponds to that section name. And if a DWARF section doesnβt exist? No stress β the location pointed to by the argument for that section gets set to zero. Slay. β¨
A value of NULL may be used for any of the arguments debug_info, debug_abbrev, debug_line, debug_loc, debug_aranges, debug_macinfo, debug_pubnames, debug_str, debug_frame, debug_ranges, debug_pubtypes and debug_types if the caller is not interested in the respective section size. Very βnot me caring about every single sectionβ of you π
dwarf_get_section_max_offsets() is literally identical to dwarf_get_section_max_offsets_b() except it does not provide the debug_types argument, so it cannot return the size of the .debug_types section. Thatβs the whole difference, no cap.
π₯ RETURN VALUES π₯
On success, these functions return DW_DLV_OK. If the dbg argument is NULL, they return DW_DLV_ERROR.
π SEE ALSO π
okay bestie thatβs the whole vibe check π this cutie came from Debian, dated December 21, 201, and lives under DWARF_GET_SECTION_MAX_OFFSETS(3) β periodt π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libdwarf 15.0.0
- Copyright (c) 2014 Kai Wang
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms