DWARF_DIE_LINK(3)

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

okay so this is the Library Functions Manual page for dwarf_die_link, and it's lowkey iconic because it's all about linking debugging information entries together. bestie, gather round. 🫢


🌸 NAME 🌸

dwarf_die_link β€” link a debugging information entry

πŸ“š LIBRARY πŸ“š

DWARF Access Library (libdwarf, -ldwarf)

πŸ› οΈ SYNOPSIS πŸ› οΈ

#include <libdwarf.h>

Dwarf_P_Die
dwarf_die_link(Dwarf_P_Die die, Dwarf_P_Die parent, Dwarf_P_Die child,
    Dwarf_P_Die left, Dwarf_P_Die right, Dwarf_Error *err);

πŸ’– DESCRIPTION πŸ’–

dwarf_die_link() is the function that links debugging information entries together. no cap, that's the whole vibe. πŸ¦‹

  • die β€” this is the debugging information entry you're updating. it's the main character here. πŸ‘‘
  • parent β€” this sets the new parent link for the debugging information entry.
  • child β€” this sets the new first child link for the debugging information entry.
  • left β€” this sets the new left sibling link for the debugging information entry.
  • right β€” this sets the new right sibling link for the debugging information entry.
🚨 okay bestie, this is important: only one of parent, child, left and right is allowed to be non-NULL. don't be out here passing more than one non-NULL link. fr fr.

Existing links to parent, child, left or right debugging information entries β€” if there are any β€” will be unlinked before the specified link is established. so it's not stacking links, it's clearing the old one first. πŸ’…

If err is not NULL, it will be used to store error information in case of an error. you love to see it. πŸ™ˆ

πŸŽ€ RETURN VALUES πŸŽ€

On success, dwarf_die_link() returns the debugging information entry provided in argument die. slay. ✨

In case of an error, dwarf_die_link() returns DW_DLV_BADADDR and sets the argument err. 😭

πŸ’€ ERRORS πŸ’€

dwarf_die_link() can fail with:

  • [DW_DLE_ARGUMENT] β€” Argument die was NULL.
  • [DW_DLE_ARGUMENT] β€” More than one of the arguments parent, child, left and right were non-NULL.

πŸ‘€ SEE ALSO πŸ‘€


xoxo, Debian πŸ’– September 4, 2011 πŸ’– DWARF_DIE_LINK(3)

πŸ“¦ where this page comes from