![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYDWARF Access Library (libdwarf, -ldwarf) SYNOPSIS
int
DESCRIPTIONFunction
Argument dbg should be a handle to a valid Dwarf_Debug instance returned by a prior call to dwarf_init(3) or dwarf_elf_init(3). Argument elf points a location into which a handle to an Elf descriptor will be written. Argument err is used to record error information in case of failure. RETURN VALUESOn success, function EXAMPLESTo retrieve the Elf instance associated with a Dwarf_Debug instance use: Dwarf_Debug dbg; Dwarf_Error de; Elf *elf; ... allocate dbg using dwarf_init() etc ... if (dwarf_get_elf(dbg, &elf, &de) != DW_DLV_OK) errx(EXIT_FAILURE, "dwarf_get_elf: %s", dwarf_errmsg(de)); SEE ALSOdwarf(3), dwarf_errmsg(3), dwarf_finish(3), dwarf_init(3), elf(3)
|