Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ _leb128_signed_decode32(3E) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

libelfutil(5)

xlate(4)



LEB128UNSIGNEDDECODE64(3E)                    LEB128UNSIGNEDDECODE64(3E)



NAME
     leb128unsigneddecode64: leb128signeddecode64:
     leb128unsigneddecode32: leb128signeddecode32 - decode leb128
     integers

SYNOPSIS
     #include <cmplrs/leb128.h>

     int leb128unsigneddecode64(char* data, uint64t* value);

     int leb128signeddecode64(char* data, int64t* value);

     int leb128unsigneddecode32(char* data, uint32t* value);

     int leb128signeddecode32(char* data, int32t* value);

DESCRIPTION
     These routines decode leb128 numbers into the integers they encode.  The
     leb128 format is a variable-length encoding extensively used in the DWARF
     debugging information format and is described in the DWARF documentation.

     The caller must know if the leb128 number data in hand is 32 or 64 bit
     and if it is signed or unsigned: nothing in the leb128 format makes it
     possible to determine this from the input data itself.

     If a data points to a number which fits in 32 bits either the 32bit or
     64bit decoding routine may be called: the correct value is returned
     through the value pointer.  If data points at a number too large to fit
     in 32 bits both the returned-value *and* the number of bytes returned by
     either of the 32-bit functions will be incorrect.

     The decoded number is placed into data and the number of bytes of data
     which held the number is returned.

     Link with the option -lelfutil to link in these routines.

     The arguments are as follows:

     data is a pointer to the input number to be converted from leb128 format
          into an integer.

     value
          is a pointer to properly aligned space (provided by the caller) to
          which the called routine writes the decoded integer value.

FILES
     /usr/include/cmplrs/leb128.h
     /usr/lib/libelfutil.a
     /usr/lib32/libelfutil.a
     /usr/lib64/libelfutil.a





                                                                        Page 1





LEB128UNSIGNEDDECODE64(3E)                    LEB128UNSIGNEDDECODE64(3E)



DIAGNOSTICS
     Returns the number of bytes found and used in decoding the number.  The
     returned value will be in the range 1 to 5 for the 32-bit number input
     versions.  The returned value will be in the range 1 to 10 for the 64-bit
     number input versions.

     If a number is erroneously encoded for the call (if the decoded value
     will not fit in the provided value pointed to) there is no error
     indication: instead a value is returned and the length returned is 5 (for
     the 32bit versions) or 10 (for the 64bit versions).

SEE ALSO
     libelfutil(5), xlate(4), _leb128_unsigned_encode64,
     _leb128_unsigned_encode32, _leb128_signed_encode64,
     _leb128_signed_encode32, DWARF Debugging Information Format , A Consumer
     Library Interface to DWARF







































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026