Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | BYTE_AT(type, i, shift) (((type)(p[i]) & 0x7f) << (shift)) |
#define | LEB128_1(type) (BYTE_AT(type, 0, 0)) |
#define | LEB128_2(type) (BYTE_AT(type, 1, 7) | LEB128_1(type)) |
#define | LEB128_3(type) (BYTE_AT(type, 2, 14) | LEB128_2(type)) |
#define | LEB128_4(type) (BYTE_AT(type, 3, 21) | LEB128_3(type)) |
#define | LEB128_5(type) (BYTE_AT(type, 4, 28) | LEB128_4(type)) |
#define | LEB128_6(type) (BYTE_AT(type, 5, 35) | LEB128_5(type)) |
#define | LEB128_7(type) (BYTE_AT(type, 6, 42) | LEB128_6(type)) |
#define | LEB128_8(type) (BYTE_AT(type, 7, 49) | LEB128_7(type)) |
#define | LEB128_9(type) (BYTE_AT(type, 8, 56) | LEB128_8(type)) |
#define | LEB128_10(type) (BYTE_AT(type, 9, 63) | LEB128_9(type)) |
#define | SHIFT_AMOUNT(type, sign_bit) (sizeof(type) * 8 - 1 - (sign_bit)) |
#define | SIGN_EXTEND(type, value, sign_bit) |
Functions | |
RZ_API const ut8 * | rz_uleb128 (const ut8 *data, int datalen, RZ_NULLABLE ut64 *v, const char **error) |
RZ_API int | rz_uleb128_len (const ut8 *data, int size) |
RZ_API const ut8 * | rz_uleb128_decode (const ut8 *data, int *datalen, ut64 *v) |
RZ_API ut8 * | rz_uleb128_encode (const ut64 s, int *len) |
RZ_API const ut8 * | rz_leb128 (const ut8 *data, int datalen, st64 *v) |
RZ_API st64 | rz_sleb128 (const ut8 **data, const ut8 *end) |
RZ_API size_t | read_u32_leb128 (const ut8 *p, const ut8 *max, ut32 *out_value) |
RZ_API size_t | read_i32_leb128 (const ut8 *p, const ut8 *max, st32 *out_value) |
RZ_API size_t | read_u64_leb128 (const ut8 *p, const ut8 *max, ut64 *out_value) |
RZ_API size_t | read_i64_leb128 (const ut8 *p, const ut8 *max, st64 *out_value) |
Definition at line 211 of file uleb128.c.
References LEB128_1, LEB128_2, LEB128_3, LEB128_4, LEB128_5, max, p, and SIGN_EXTEND.
Referenced by consume_s7_r(), and wasm_dis().
Definition at line 186 of file uleb128.c.
References LEB128_1, LEB128_2, LEB128_3, LEB128_4, LEB128_5, max, and p.
Referenced by consume_u1_r(), consume_u32_r(), consume_u7_r(), decode_buffer(), get_cf_offset(), wasm_dis(), and wasm_op().
Definition at line 117 of file uleb128.c.
Referenced by parse_abbrev_raw(), parse_attr_value(), and parse_std_opcode().
Definition at line 145 of file uleb128.c.
References cond, test_evm::end, p, st64, and value.
Referenced by get_relocs(), parse_dwarf_location(), and reconstruct_chained_fixup().
RZ_API const ut8* rz_uleb128 | ( | const ut8 * | data, |
int | datalen, | ||
RZ_NULLABLE ut64 * | v, | ||
const char ** | error | ||
) |
Definition at line 9 of file uleb128.c.
References c, error(), NULL, rz_str_newf(), s, ST32_MAX, ut64(), and v.
Referenced by parse_abbrev_raw(), parse_attr_value(), parse_comp_unit(), parse_dwarf_location(), parse_ext_opcode(), parse_line_header_source(), and parse_std_opcode().