DWARF_SETERRARG(3)

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

πŸ’– NAME πŸ’–

okay so welcome to DWARF_SETERRARG(3), a page from the Library Functions Manual, and it’s all about dwarf_seterrarg and dwarf_seterrhand β€” configure error handling. πŸ’…βœ¨

πŸ¦‹ LIBRARY πŸ¦‹

This one lives in the DWARF Access Library (libdwarf, -ldwarf). 🫢

🌸 SYNOPSIS 🌸

bestie, here are the signatures, verbatim, do not @ me:

#include <libdwarf.h>

Dwarf_Ptr
dwarf_seterrarg(Dwarf_Debug dbg, Dwarf_Ptr arg);

Dwarf_Handler
dwarf_seterrhand(Dwarf_Debug dbg, Dwarf_Handler handler);

✨ DESCRIPTION ✨

These functions may be used by applications to configure error handling callbacks. The error handling scheme used by the library is described in dwarf(3). iconic library behavior, tbh πŸ’–

  • dwarf_seterrarg() β€” may be used to set the callback argument passed to a configured error handler at the time it is invoked. Argument arg is the callback argument being set. Argument dbg can be a debug context allocated by a prior call to dwarf_init(3), or can be NULL to indicate that the library-wide callback argument is to be set. πŸŽ€
  • dwarf_seterrhand() β€” may be used to associate an error handler denoted by argument handler with the DWARF debug context descriptor denoted by argument dbg. Argument dbg should be a debug context allocated by a prior call to dwarf_init(3), or may be NULL to indicate that the library-wide error handler is to be set. πŸ¦‹

πŸ”₯ RETURN VALUES πŸ”₯

  • Function dwarf_seterrhand() returns the previous error handler associated with argument dbg. If argument dbg is NULL, function dwarf_seterrhand() returns the previous library-wide error handler. πŸ‘‘
  • Function dwarf_seterrarg() returns the previous callback argument associated with argument dbg. If argument dbg is NULL, function dwarf_seterrarg() returns the previous library-wide callback argument. ⭐

πŸ’œ COMPATIBILITY πŸ’œ

The behavior of these functions when argument dbg is NULL is a local extension.

so like, that NULL behavior is a local extension β€” cute, but local, iykyk πŸ™ˆπŸ’…

🌈 ERRORS 🌈

These functions do not set an error code. periodt. πŸ“

🧚 SEE ALSO 🧚

dwarf(3), dwarf_init(3) πŸ’–


mwah πŸ’‹ β€” this page is from Debian, dated May 01, 2010, and it’s the DWARF_SETERRARG(3) manual page. byeee bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from