GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DWARF_GET_ELF(3) FreeBSD Library Functions Manual DWARF_GET_ELF(3)

dwarf_get_elf
retrieve the Elf descriptor associated with a Dwarf_Debug instance

DWARF Access Library (libdwarf, -ldwarf)

#include <libdwarf.h>

int
dwarf_get_elf(Dwarf_Debug dbg, Elf **elf, Dwarf_Error *err);

Function dwarf_get_elf() returns the Elf descriptor associated with a Dwarf_Debug instance.

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.

On success, function dwarf_get_elf() returns DW_DLV_OK. In case of an error, it returns DW_DLV_ERROR and sets argument err.

To 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));

dwarf(3), dwarf_errmsg(3), dwarf_finish(3), dwarf_init(3), elf(3)
November 9, 2011 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.