DWARF_GET_CU_DIE_OFFSET(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– NAME πŸ’–

This is DWARF_GET_CU_DIE_OFFSET(3), bestie β€” straight outta the Library Functions Manual β€” and the actual main characters are dwarf_get_arange_cu_header_offset and dwarf_get_cu_die_offset, aka your retrieve-compilation-unit-offsets besties. πŸ’…

πŸ“š LIBRARY πŸ“š

DWARF Access Library (libdwarf, -ldwarf) β€” your DWARF-access home base, periodt. 🫢

✨ SYNOPSIS ✨

#include <libdwarf.h>

int
dwarf_get_arange_cu_header_offset(Dwarf_Arange ar, Dwarf_Off *ret,
    Dwarf_Error *err);

int
dwarf_get_cu_die_offset(Dwarf_Arange ar, Dwarf_Off *ret,
    Dwarf_Error *err);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so these functions are literally here to retrieve the offsets β€” relative to the .debug_info DWARF section β€” of the debugging information entries describing the compilation unit associated with a Dwarf_Arange descriptor. Iconic. ✨

Function dwarf_get_arange_cu_header_offset() retrieves the offset of the compilation unit header associated with argument ar, and stores it in the location pointed to by argument ret. Slay. πŸ’…

Function dwarf_get_cu_die_offset() retrieves the offset of the debugging information entry for the compilation unit associated with argument ar, and stores it in the location pointed to by argument ret. Also slay. 🌸

If argument err is not NULL, these functions will use it to store error information, in case of an error. Noted, bestie. 🫢

🌈 RETURN VALUES 🌈

On success, these functions return DW_DLV_OK. In case of an error, they return DW_DLV_ERROR and set the argument err. That's the whole vibe check. βœ…

πŸŽ€ ERRORS πŸŽ€

These functions may fail with:

  • [DW_DLE_ARGUMENT] β€” Argument ar was not a valid Dwarf_Arange descriptor.
  • [DW_DLE_ARGUMENT] β€” Argument ret was NULL.
Not me showing up with a bad descriptor or a NULL ret β€” that's a hard no, bestie. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


Source/version: Debian; date: April 10, 2011; page: DWARF_GET_CU_DIE_OFFSET(3). Byeee! πŸ’‹βœ¨

πŸ“¦ where this page comes from