libdwarf: Determine Object Type of a File

libdwarf

Loading...
Searching...
No Matches
Functions
Determine Object Type of a File

## Functions
DW_API int | dwarf_object_detector_path_b (const char *dw_path, char *dw_outpath_buffer, unsigned long dw_outpathlen, char **dw_gl_pathnames, unsigned int dw_gl_pathcount, unsigned int *dw_ftype, unsigned int *dw_endian, unsigned int *dw_offsetsize, Dwarf_Unsigned *dw_filesize, unsigned char *dw_pathsource, int *dw_errcode)
DW_API int | dwarf_object_detector_path_dSYM (const char *dw_path, char *dw_outpath, unsigned long dw_outpath_len, char **dw_gl_pathnames, unsigned int dw_gl_pathcount, unsigned int *dw_ftype, unsigned int *dw_endian, unsigned int *dw_offsetsize, Dwarf_Unsigned *dw_filesize, unsigned char *dw_pathsource, int *dw_errcode)
DW_API int | dwarf_object_detector_fd (int dw_fd, unsigned int *dw_ftype, unsigned int *dw_endian, unsigned int *dw_offsetsize, Dwarf_Unsigned *dw_filesize, int *dw_errcode)

## Detailed Description

This group of functions are unlikely to be called by your code unless your code needs to know the basic data about an object file without actually opening a Dwarf_Debug.

These are crucial for libdwarf itself. The dw_ftype returned is one of DW_FTYPE_ELF, DW_FTYPE_PE, DW_FTYPE_MACH_O, or DW_FTYPE_APPLEUNIVERSAL.

These are not meant to deal with a specific binary inside a Macos Universal Binary (DW_FTYPE_APPLEUNIVERSAL).