|
| #define | SYMS_VERSION_MAJOR 1 |
| |
| #define | SYMS_VERSION_MINOR 0 |
| |
| #define | SYMS_VERSION_SUBMINOR 0 |
| |
| #define | SYMS_VERSION_STR "1.0.0" |
| |
| #define | SYMS_API static |
| |
| #define | SYMS_C_LINKAGE_BEGIN |
| |
| #define | SYMS_C_LINKAGE_END |
| |
| #define | SYMS_EXTERN extern |
| |
| #define | SYMS_GLOBAL static |
| |
| #define | SYMS_LOCAL static |
| |
| #define | SYMS_READ_ONLY |
| |
| #define | SYMS_PARANOID 0 |
| |
| #define | SYMS_ASSERT_INVARIANTS 0 |
| |
| #define | SYMS_DISABLE_NORMAL_ASSERTS 0 |
| |
| #define | SYMS_ENABLE_DEV_SRCLOC 0 |
| |
| #define | SYMS_ENABLE_DEV_STRING 0 |
| |
| #define | SYMS_ENABLE_DEV_LOG 0 |
| |
| #define | SYMS_ENABLE_DEV_PROFILE 0 |
| |
| #define | syms_false 0 |
| |
| #define | syms_true 1 |
| |
| #define | syms_write_srcloc__impl(f, l) ((void)0) |
| |
| #define | SYMS_WRITE_SRCLOC(f, l) ((void)0) |
| |
| #define | SYMS_ASSERT_RAW(x) do { if(!(x)) { SYMS_ASSERT_BREAK(x); } } while(0) |
| |
| #define | SYMS_ASSERT(x) SYMS_ASSERT_RAW(x) |
| |
| #define | SYMS_ASSERT_PARANOID(x) |
| |
| #define | SYMS_INVARIANT(r, x) do{ if (!(x)){ (r) = syms_false; goto finish_invariants; } } while(0) |
| |
| #define | SYMS_NOT_IMPLEMENTED SYMS_ASSERT_BREAK("not implemented") |
| |
| #define | SYMS_INVALID_CODE_PATH SYMS_ASSERT_BREAK("invalid code path") |
| |
| #define | SYMS_ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) |
| |
| #define | SYMS_PTR_DIF(a, b) (SYMS_U64)((SYMS_U8*)(a) - (SYMS_U8*)(b)) |
| |
| #define | SYMS_MEMBER(type, member) (&((type*)0)->member) |
| |
| #define | SYMS_MEMBER_OFFSET(type, member) (SYMS_PTR_DIF(SYMS_MEMBER(type, member), 0)) |
| |
| #define | SYMS_KB(num) ((SYMS_U64)(num) << 10) |
| |
| #define | SYMS_MB(num) ((SYMS_U64)(num) << 20) |
| |
| #define | SYMS_GB(num) ((SYMS_U64)(num) << 30) |
| |
| #define | SYMS_TB(num) ((SYMS_U64)(num) << 40) |
| |
| #define | SYMS_Stringify_(x) #x |
| |
| #define | SYMS_Stringify(x) SYMS_Stringify_(x) |
| |
| #define | SYMS_Glue_(a, b) a ## b |
| |
| #define | SYMS_Glue(a, b) SYMS_Glue_(a,b) |
| |
| #define | syms_memzero_struct(s) syms_memset((s), 0, sizeof(*(s))) |
| |
| #define | syms_memisnull_struct(s) syms_memisnull((s), sizeof(*(s))) |
| |
| #define | SYMS_S8_MIN 0x80 |
| |
| #define | SYMS_S8_MAX 0x7f |
| |
| #define | SYMS_S16_MIN 0x8000 |
| |
| #define | SYMS_S16_MAX 0x7fff |
| |
| #define | SYMS_S32_MIN 0x80000000 |
| |
| #define | SYMS_S32_MAX 0x7fffffff |
| |
| #define | SYMS_S64_MIN 0x8000000000000000ull |
| |
| #define | SYMS_S64_MAX 0x7fffffffffffffffull |
| |
| #define | SYMS_U8_MAX 0xFFu |
| |
| #define | SYMS_U16_MAX 0xFFFFu |
| |
| #define | SYMS_U32_MAX 0xFFFFFFFFu |
| |
| #define | SYMS_U64_MAX 0xFFFFFFFFFFFFFFFFu |
| |
| #define | SYMS_STATIC_ASSERT(c) typedef char SYMS_Glue(assert, __LINE__)[(c)?+1:-1] |
| |
| #define | SYMS_MIN(a, b) ((a)<(b)?(a):(b)) |
| |
| #define | SYMS_MAX(a, b) ((a)>(b)?(a):(b)) |
| |
| #define | SYMS_ClampTop(a, b) SYMS_MIN(a,b) |
| |
| #define | SYMS_ClampBot(a, b) SYMS_MAX(a,b) |
| |
| #define | SYMS_CeilIntegerDiv(a, b) (((a) + (b) - 1)/(b)) |
| |
| #define | SYMS_AlignPow2(a, b) (((a) + (b) - 1)&(~((b) - 1))) |
| |
| #define | SYMS_AlignDownPow2(a, b) ((a)&(~((b) - 1))) |
| |
| #define | SYMS_Swap(T, a, b) do{ T t__ = (a); (a) = (b); (b) = t__; }while(0) |
| |
| #define | SYMS_THIS_SRCLOC __FILE__ ":" SYMS_Stringify(__LINE__) |
| |
| #define | SYMS_ID_u32_0(id) (SYMS_U32)(id) |
| |
| #define | SYMS_ID_u32_1(id) (SYMS_U32)((id) >> 32) |
| |
| #define | SYMS_ID_u16_0(id) (SYMS_U16)(id) |
| |
| #define | SYMS_ID_u16_1(id) (SYMS_U16)((id) >> 16) |
| |
| #define | SYMS_ID_u16_2(id) (SYMS_U16)((id) >> 32) |
| |
| #define | SYMS_ID_u16_3(id) (SYMS_U16)((id) >> 48) |
| |
| #define | SYMS_ID_u32_u32(a, b) ((SYMS_U64)(a) | ((SYMS_U64)(b) << 32)) |
| |
| #define | SYMS_ID_u16_u16_u32(a, b, c) ((SYMS_U64)(a) | ((SYMS_U64)(b) << 16) | ((SYMS_U64)(c) << 32)) |
| |
| #define | SYMS_QueuePush_N(f, l, n, next) |
| |
| #define | SYMS_QueuePushFront_N(f, l, n, next) |
| |
| #define | SYMS_QueuePop_N(f, l, next) |
| |
| #define | SYMS_QueuePush(f, l, n) SYMS_QueuePush_N(f,l,n,next) |
| |
| #define | SYMS_QueuePushFront(f, l, n) SYMS_QueuePushFront_N(f,l,n,next) |
| |
| #define | SYMS_QueuePop(f, l) SYMS_QueuePop_N(f,l,next) |
| |
| #define | SYMS_StackPush_N(f, n, next) ( (n)->next=(f), (f)=(n) ) |
| |
| #define | SYMS_StackPop_N(f, next) ( (f)=(f)->next ) |
| |
| #define | SYMS_StackPush(f, n) SYMS_StackPush_N(f,n,next) |
| |
| #define | SYMS_StackPop(f) SYMS_StackPop_N(f,next) |
| |
| #define | syms_serial_type(name) (_syms_serial_type_##name) |
| |
| #define | syms_string_from_enum_value(enum_type, value) (syms_serial_value_from_enum_value(&syms_serial_type(enum_type), value)->name) |
| |
| #define | syms_bswap_in_place(type, ptr) syms_bswap_in_place__##type((type*)(ptr)) |
| |
| #define | syms_str8_comp(s) { (SYMS_U8 *)(s), sizeof(s) - 1 } |
| |
| #define | syms_str8_lit(s) syms_str8((SYMS_U8 *)(s), sizeof(s) - 1) |
| |
| #define | syms_expand_string(s) (int)((s).size), ((s).str) |
| |
| #define | syms_arena_alloc syms_arena_alloc__impl |
| |
| #define | syms_arena_release syms_arena_release__impl |
| |
| #define | syms_arena_get_pos syms_arena_get_pos__impl |
| |
| #define | syms_arena_push syms_arena_push__impl |
| |
| #define | syms_arena_pop_to syms_arena_pop_to__impl |
| |
| #define | syms_arena_set_auto_align syms_arena_set_auto_align__impl |
| |
| #define | syms_arena_absorb syms_arena_absorb__impl |
| |
| #define | syms_arena_tidy syms_arena_tidy__impl |
| |
| #define | syms_get_implicit_thread_arena syms_get_implicit_thread_arena__impl |
| |
| #define | syms_push_array(a, T, c) |
| |
| #define | syms_push_array_zero(a, T, c) ((T*)syms_memset(syms_push_array(a,T,c), 0, sizeof(T)*(c))) |
| |
| #define | syms_release_scratch syms_arena_temp_end |
| |
| #define | syms_scratch_pool_tidy syms_scratch_pool_tidy__impl |
| |
| #define | syms_based_range_read_struct(b, r, o, p) syms_based_range_read((b), (r), (o), sizeof(*(p)), p) |
| |
| #define | syms_memory_view_read_struct(s, a, p) syms_memory_view_read((s),(a),sizeof(*(p)),(p)) |
| |
|
| SYMS_C_LINKAGE_BEGIN SYMS_API SYMS_String8 | syms_version_string (void) |
| |
| SYMS_API SYMS_U64Range | syms_make_u64_range (SYMS_U64 min, SYMS_U64 max) |
| |
| SYMS_API SYMS_U64Range | syms_make_u64_inrange (SYMS_U64Range range, SYMS_U64 offset, SYMS_U64 size) |
| |
| SYMS_API SYMS_U64 | syms_u64_range_size (SYMS_U64Range range) |
| |
| SYMS_API SYMS_U64 | syms_hash_djb2 (SYMS_String8 string) |
| |
| SYMS_API SYMS_U64 | syms_hash_djb2_continue (SYMS_String8 string, SYMS_U64 intermediate_hash) |
| |
| SYMS_API SYMS_U64 | syms_hash_u64 (SYMS_U64 x) |
| |
| SYMS_API SYMS_SerialField * | syms_serial_first_field (SYMS_SerialType *type) |
| |
| SYMS_API SYMS_SerialValue * | syms_serial_first_value (SYMS_SerialType *type) |
| |
| SYMS_API SYMS_SerialFlag * | syms_serial_first_flag (SYMS_SerialType *type) |
| |
| SYMS_API SYMS_SerialValue * | syms_serial_value_from_enum_value (SYMS_SerialType *type, SYMS_U64 value) |
| |
| SYMS_API SYMS_SerialFlag * | syms_serial_flag_from_bit_offset (SYMS_SerialType *type, SYMS_U64 bit_off) |
| |
| SYMS_API SYMS_String8List | syms_string_list_from_flags (SYMS_Arena *arena, SYMS_SerialType *type, SYMS_U32 flags) |
| |
| SYMS_API SYMS_U64 | syms_enum_index_from_value_identity (SYMS_U64 v) |
| |
| SYMS_API SYMS_B32 | syms_codepoint_is_whitespace (SYMS_U32 codepoint) |
| |
| SYMS_API SYMS_U32 | syms_lowercase_from_codepoint (SYMS_U32 codepoint) |
| |
| SYMS_API SYMS_String8 | syms_str8 (SYMS_U8 *str, SYMS_U64 size) |
| |
| SYMS_API SYMS_String8 | syms_str8_cstring (char *str) |
| |
| SYMS_API SYMS_String8 | syms_str8_range (SYMS_U8 *first, SYMS_U8 *opl) |
| |
| SYMS_API SYMS_String8 | syms_str8_skip_chop_whitespace (SYMS_String8 str) |
| |
| SYMS_API SYMS_B32 | syms_string_match (SYMS_String8 a, SYMS_String8 b, SYMS_StringMatchFlags flags) |
| |
| SYMS_API SYMS_U8 * | syms_decode_utf8 (SYMS_U8 *p, SYMS_U32 *dst) |
| |
| SYMS_API void | syms_string_list_push_node (SYMS_String8Node *node, SYMS_String8List *list, SYMS_String8 string) |
| |
| SYMS_API void | syms_string_list_push_node_front (SYMS_String8Node *node, SYMS_String8List *list, SYMS_String8 string) |
| |
| SYMS_API void | syms_string_list_push (SYMS_Arena *arena, SYMS_String8List *list, SYMS_String8 string) |
| |
| SYMS_API void | syms_string_list_push_front (SYMS_Arena *arena, SYMS_String8List *list, SYMS_String8 string) |
| |
| SYMS_API SYMS_String8List | syms_string_list_concat (SYMS_String8List *left, SYMS_String8List *right) |
| |
| SYMS_API SYMS_String8 | syms_string_list_join (SYMS_Arena *arena, SYMS_String8List *list, SYMS_StringJoin *join) |
| |
| SYMS_API SYMS_String8 | syms_push_string_copy (SYMS_Arena *arena, SYMS_String8 string) |
| |
| SYMS_API SYMS_String8 | syms_string_trunc_symbol_heuristic (SYMS_String8 string) |
| |
| SYMS_API SYMS_String8List | syms_string_split (SYMS_Arena *arena, SYMS_String8 input, SYMS_U32 delimiter) |
| |
| SYMS_API SYMS_U64 | syms_u64_from_string (SYMS_String8 str, SYMS_U32 radix) |
| |
| SYMS_API SYMS_S64 | syms_s64_from_string_c_rules (SYMS_String8 str) |
| |
| SYMS_API SYMS_String8 | syms_string_from_u64 (SYMS_Arena *arena, SYMS_U64 x) |
| |
| SYMS_API void | syms_u64_range_list_push_node (SYMS_U64RangeNode *node, SYMS_U64RangeList *list, SYMS_U64Range range) |
| |
| SYMS_API void | syms_u64_range_list_push (SYMS_Arena *arena, SYMS_U64RangeList *list, SYMS_U64Range range) |
| |
| SYMS_API void | syms_u64_range_list_concat (SYMS_U64RangeList *list, SYMS_U64RangeList *to_push) |
| |
| SYMS_API SYMS_U64RangeArray | syms_u64_range_array_from_list (SYMS_Arena *arena, SYMS_U64RangeList *list) |
| |
| SYMS_API void | syms_u64_list_push_node (SYMS_U64Node *node, SYMS_U64List *list, SYMS_U64 v) |
| |
| SYMS_API void | syms_u64_list_push (SYMS_Arena *arena, SYMS_U64List *list, SYMS_U64 v) |
| |
| SYMS_API void | syms_u64_list_concat_in_place (SYMS_U64List *dst, SYMS_U64List *src) |
| |
| SYMS_API SYMS_U64Array | syms_u64_array_from_list (SYMS_Arena *arena, SYMS_U64List *list) |
| |
| SYMS_API SYMS_U64 | syms_1based_checked_lookup_u64 (SYMS_U64 *u64, SYMS_U64 count, SYMS_U64 n) |
| |
| SYMS_API void | syms_arena_push_align (SYMS_Arena *arena, SYMS_U64 boundary) |
| |
| SYMS_API void | syms_arena_put_back (SYMS_Arena *arena, SYMS_U64 amount) |
| |
| SYMS_API SYMS_ArenaTemp | syms_arena_temp_begin (SYMS_Arena *arena) |
| |
| SYMS_API void | syms_arena_temp_end (SYMS_ArenaTemp frame) |
| |
| SYMS_API SYMS_ArenaTemp | syms_get_scratch (SYMS_Arena **conflicts, SYMS_U64 count) |
| |
| SYMS_API SYMS_SortNode * | syms_sort_node_push (SYMS_Arena *arena, SYMS_SortNode **stack, SYMS_SortNode **free_stack, SYMS_U64 first, SYMS_U64 opl) |
| |
| SYMS_API void | syms_set_lane (SYMS_U64 lane) |
| |
| SYMS_API SYMS_U64 | syms_get_lane (void) |
| |
| SYMS_API void * | syms_based_range_ptr (void *base, SYMS_U64Range range, SYMS_U64 offset) |
| |
| SYMS_API SYMS_U64 | syms_based_range_read (void *base, SYMS_U64Range range, SYMS_U64 offset, SYMS_U64 out_size, void *out) |
| |
| SYMS_API SYMS_U64 | syms_based_range_read_uleb128 (void *base, SYMS_U64Range range, SYMS_U64 offset, SYMS_U64 *out_value) |
| |
| SYMS_API SYMS_U64 | syms_based_range_read_sleb128 (void *base, SYMS_U64Range range, SYMS_U64 offset, SYMS_S64 *out_value) |
| |
| SYMS_API SYMS_String8 | syms_based_range_read_string (void *base, SYMS_U64Range range, SYMS_U64 offset) |
| |
| SYMS_API SYMS_MemoryView | syms_memory_view_make (SYMS_String8 data, SYMS_U64 base) |
| |
| SYMS_API SYMS_B32 | syms_memory_view_read (SYMS_MemoryView *memview, SYMS_U64 addr, SYMS_U64 size, void *ptr) |
| |
| SYMS_API void | syms_unwind_result_missed_read (SYMS_UnwindResult *unwind_result, SYMS_U64 addr) |
| |
| SYMS_API SYMS_U16 | syms_bswap_u16 (SYMS_U16 x) |
| |
| SYMS_API SYMS_U32 | syms_bswap_u32 (SYMS_U32 x) |
| |
| SYMS_API SYMS_U64 | syms_bswap_u64 (SYMS_U64 x) |
| |
| SYMS_API void | syms_bswap_bytes (void *p, SYMS_U64 size) |
| |