libdwarf: LEB Encode and Decode

libdwarf

Loading...
Searching...
No Matches
Functions
LEB Encode and Decode

## Functions
DW_API int | dwarf_encode_leb128 (Dwarf_Unsigned dw_val, int *dw_nbytes, char *dw_space, int dw_splen)
DW_API int | dwarf_encode_signed_leb128 (Dwarf_Signed dw_val, int *dw_nbytes, char *dw_space, int dw_splen)
DW_API int | dwarf_decode_leb128 (char *dw_leb, Dwarf_Unsigned *dw_leblen, Dwarf_Unsigned *dw_outval, char *dw_endptr)
DW_API int | dwarf_decode_signed_leb128 (char *dw_leb, Dwarf_Unsigned *dw_leblen, Dwarf_Signed *dw_outval, char *dw_endptr)

## Detailed Description

These are LEB/ULEB reading and writing functions heavily used inside libdwarf.

While the DWARF Standard does not mention allowing extra insignificant trailing bytes in a ULEB these functions allow a few such for compilers using extras for alignment in DWARF.