XS-libdwarf
view release on metacpan or search on metacpan
libdwarf-code-0.11.1/src/lib/libdwarf/libdwarf.h view on Meta::CPAN
#define DW_PATHSOURCE_unspecified 0
#define DW_PATHSOURCE_basic 1
#define DW_PATHSOURCE_dsym 2 /* MacOS dSYM */
#define DW_PATHSOURCE_debuglink 3 /* GNU debuglink */
#ifndef DW_FTYPE_UNKNOWN
#define DW_FTYPE_UNKNOWN 0
#define DW_FTYPE_ELF 1 /* Unix/Linux/etc */
#define DW_FTYPE_MACH_O 2 /* MacOS. */
#define DW_FTYPE_PE 3 /* Windows */
#define DW_FTYPE_ARCHIVE 4 /* unix archive */
#define DW_FTYPE_APPLEUNIVERSAL 5
#endif /* DW_FTYPE_UNKNOWN */
/* standard return values for functions */
#define DW_DLV_NO_ENTRY -1
#define DW_DLV_OK 0
#define DW_DLV_ERROR 1
/* These support opening DWARF5 split dwarf objects and
Elf SHT_GROUP blocks of DWARF sections. */
#define DW_GROUPNUMBER_ANY 0
#define DW_GROUPNUMBER_BASE 1
#define DW_GROUPNUMBER_DWO 2
/* FRAME special values */
/* The following 3 are assigned numbers, but
are only present at run time.
Must not conflict with DW_FRAME values in dwarf.h */
/* Taken as meaning 'undefined value', this is not
a column or register number. */
#ifndef DW_FRAME_UNDEFINED_VAL
#define DW_FRAME_UNDEFINED_VAL 12288
#endif
/* Taken as meaning 'same value' as caller had,
not a column or register number */
#ifndef DW_FRAME_SAME_VAL
#define DW_FRAME_SAME_VAL 12289
#endif
/* DW_FRAME_CFA_COL is assigned a virtual table position
but is accessed via CFA specific calls. */
#ifndef DW_FRAME_CFA_COL
#define DW_FRAME_CFA_COL 12290
#endif
#define DW_FRAME_CFA_COL3 DW_FRAME_CFA_COL /*compatibility name*/
/* END FRAME special values */
/* dwarf_pcline function, slide arguments
*/
#define DW_DLS_BACKWARD -1 /* slide backward to find line */
#define DW_DLS_NOSLIDE 0 /* match exactly without sliding */
#define DW_DLS_FORWARD 1 /* slide forward to find line */
/* Defined larger than necessary.
struct Dwarf_Debug_Fission_Per_CU_s,
being visible, will be difficult to change:
binary compatibility. The count is for arrays
inside the struct, the struct itself is
a single struct. */
#define DW_FISSION_SECT_COUNT 12
/*! @defgroup basicdatatypes Basic Library Datatypes Group
@{
@typedef Dwarf_Unsigned
The basic unsigned data type.
Intended to be an unsigned 64bit value.
@typedef Dwarf_Signed
The basic signed data type.
Intended to be a signed 64bit value.
@typedef Dwarf_Off
Used for offsets. It should be same size as Dwarf_Unsigned.
@typedef Dwarf_Addr
Used when a data item is a an address represented
in DWARF. 64 bits. Must be as large as the largest
object address size.
@typedef Dwarf_Half
Many libdwarf values (attribute codes, for example)
are defined by the standard to be 16 bits, and
this datatype reflects that (the type must be
at least 16 bits wide).
@typedef Dwarf_Bool
A TRUE(non-zero)/FALSE(zero) data item.
@typedef Dwarf_Ptr
A generic pointer type. It uses void *
so it cannot be added-to or subtracted-from.
@typedef Dwarf_Small
Used for small unsigned integers and
used as Dwarf_Small* for pointers and
it supports pointer addition and subtraction
conveniently.
*/
typedef unsigned long long Dwarf_Unsigned;
typedef signed long long Dwarf_Signed;
typedef unsigned long long Dwarf_Off;
typedef unsigned long long Dwarf_Addr;
/* Dwarf_Bool as int is wasteful, but for compatibility
it must stay as int, not unsigned char. */
typedef int Dwarf_Bool; /* boolean type */
typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */
typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */
/* If sizeof(Dwarf_Half) is greater than 2
we believe libdwarf still works properly. */
typedef void* Dwarf_Ptr; /* host machine pointer */
/*! @} endgroup basicdatatypes */
/*! @defgroup enums Enumerators with various purposes
@{
@enum Dwarf_Ranges_Entry_Type
The dwr_addr1/addr2 data is either pair of offsets
of a base pc address (DW_RANGES_ENTRY)
or a base pc address (dwr_addr2 in DW_RANGES_ADDRESS_SELECTION) or
both are zero(end of list, DW_RANGES_END)
or both non-zero but identical
(means an empty range, DW_RANGES_ENTRY).
These are for use with DWARF 2,3,4.
DW_RANGES_ADDRESS_SELECTION should have been spelled
DW_RANGES_BASE_ADDRESS. but it is not worth changing
as it is widely used.
The DW_RANGES_ENTRY values are raw pc offset data recorded
in the section, not addresses.
@see examplev
Dwarf_Ranges* apply to DWARF2,3, and 4.
Not to DWARF5 (the data is different and
in a new DWARF5 section).
*/
enum Dwarf_Ranges_Entry_Type { DW_RANGES_ENTRY,
DW_RANGES_ADDRESS_SELECTION,
DW_RANGES_END
};
/*! @enum Dwarf_Form_Class
The dwarf specification separates FORMs into
different classes. To do the separation properly
requires 4 pieces of data as of DWARF4 (thus the
function arguments listed here).
The DWARF4 specification class definition suffices to
describe all DWARF versions.
See section 7.5.4, Attribute Encodings.
A return of DW_FORM_CLASS_UNKNOWN means the library
could not properly figure
out what form-class it is.
DW_FORM_CLASS_FRAMEPTR is MIPS/IRIX only, and refers
to the DW_AT_MIPS_fde attribute (a reference to the
.debug_frame section).
DWARF5:
DW_FORM_CLASS_LOCLISTSPTR is like DW_FORM_CLASS_LOCLIST
except that LOCLISTSPTR is always a section offset,
never an index, and LOCLISTSPTR is only referenced
by DW_AT_loclists_base.
Note DW_FORM_CLASS_LOCLISTSPTR spelling to distinguish
from DW_FORM_CLASS_LOCLISTPTR.
DWARF5:
DW_FORM_CLASS_RNGLISTSPTR is like DW_FORM_CLASS_RNGLIST
except that RNGLISTSPTR is always a section offset,
never an index. DW_FORM_CLASS_RNGLISTSPTR is only
referenced by DW_AT_rnglists_base.
*/
enum Dwarf_Form_Class {
( run in 0.744 second using v1.01-cache-2.11-cpan-39bf76dae61 )