mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
lib_rdi_format -> lib_rdi
This commit is contained in:
@@ -51,6 +51,7 @@ read_only global String8 dw_name_title_from_dump_subset_table[] =
|
||||
#undef X
|
||||
};
|
||||
|
||||
internal String8 dw_string_from_reg_off(Arena *arena, Arch arch, U64 reg_idx, S64 reg_off);
|
||||
internal String8List dw_string_list_from_expression (Arena *arena, String8 raw_data, U64 cu_base, U64 address_size, Arch arch, DW_Version ver, DW_Ext ext, DW_Format format);
|
||||
internal String8 dw_format_expression_single_line(Arena *arena, String8 raw_data, U64 cu_base, U64 address_size, Arch arch, DW_Version ver, DW_Ext ext, DW_Format format);
|
||||
internal String8 dw_format_eh_ptr_enc (Arena *arena, DW_EhPtrEnc enc);
|
||||
@@ -71,7 +72,6 @@ internal void dw_print_debug_pubnames (Arena *arena, String8List *out, String8
|
||||
internal void dw_print_debug_pubtypes (Arena *arena, String8List *out, String8 indent, DW_Input *input);
|
||||
internal void dw_print_debug_line_str (Arena *arena, String8List *out, String8 indent, DW_Input *input);
|
||||
internal void dw_print_debug_str_offsets(Arena *arena, String8List *out, String8 indent, DW_Input *input);
|
||||
internal void
|
||||
dw_format(Arena *arena, String8List *out, String8 indent, DW_DumpSubsetFlags subset_flags, DW_Input *input, Arch arch, ExecutableImageKind image_type);
|
||||
internal void dw_format(Arena *arena, String8List *out, String8 indent, DW_DumpSubsetFlags subset_flags, DW_Input *input, Arch arch, ExecutableImageKind image_type);
|
||||
|
||||
#endif // DWARF_DUMP_H
|
||||
|
||||
@@ -1,360 +1,360 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ RAD Debug Info, (R)AD(D)BG(I) Format Library
|
||||
//
|
||||
// Defines standard RDI debug information format types and
|
||||
// functions.
|
||||
|
||||
#ifndef RDI_FORMAT_C
|
||||
#define RDI_FORMAT_C
|
||||
|
||||
RDI_U16 rdi_section_element_size_table[40] =
|
||||
{
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_TopLevelInfo),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_BinarySection),
|
||||
sizeof(RDI_FilePathNode),
|
||||
sizeof(RDI_SourceFile),
|
||||
sizeof(RDI_LineTable),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_Line),
|
||||
sizeof(RDI_Column),
|
||||
sizeof(RDI_SourceLineMap),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_Unit),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_TypeNode),
|
||||
sizeof(RDI_UDT),
|
||||
sizeof(RDI_Member),
|
||||
sizeof(RDI_EnumMember),
|
||||
sizeof(RDI_GlobalVariable),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_ThreadVariable),
|
||||
sizeof(RDI_Constant),
|
||||
sizeof(RDI_Procedure),
|
||||
sizeof(RDI_Scope),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_InlineSite),
|
||||
sizeof(RDI_Local),
|
||||
sizeof(RDI_LocationBlock),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_NameMap),
|
||||
sizeof(RDI_NameMapBucket),
|
||||
sizeof(RDI_NameMapNode),
|
||||
sizeof(RDI_U8),
|
||||
};
|
||||
|
||||
RDI_U8 rdi_section_is_required_table[40] =
|
||||
{
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
RDI_U16 rdi_eval_op_ctrlbits_table[52] =
|
||||
{
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 0),
|
||||
RDI_EVAL_CTRLBITS(2, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(2, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(16, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(2, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 1, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
};
|
||||
|
||||
struct {RDI_EvalConversionKind dst_typegroups[RDI_EvalTypeGroup_COUNT];} rdi_eval_typegroup_conversion_kind_matrix[6] =
|
||||
{
|
||||
{{RDI_EvalConversionKind_OtherToOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Noop}},
|
||||
{{RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop}},
|
||||
};
|
||||
|
||||
struct {RDI_U8 *str; RDI_U64 size;} rdi_eval_conversion_kind_message_string_table[6] =
|
||||
{
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
{(RDI_U8 *)"Cannot convert between these types.", sizeof("Cannot convert between these types.")},
|
||||
{(RDI_U8 *)"Cannot convert to this type.", sizeof("Cannot convert to this type.")},
|
||||
{(RDI_U8 *)"Cannot convert this type.", sizeof("Cannot convert this type.")},
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
};
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
rdi_hash(RDI_U8 *ptr, RDI_U64 size)
|
||||
{
|
||||
RDI_U64 result = 5381;
|
||||
RDI_U8 *opl = ptr + size;
|
||||
for(;ptr < opl; ptr += 1)
|
||||
{
|
||||
result = ((result << 5) + result) + *ptr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U8 *
|
||||
rdi_string_from_type_kind(RDI_TypeKind kind, RDI_U64 *size_out)
|
||||
{
|
||||
RDI_U8 *result = 0;
|
||||
*size_out = 0;
|
||||
switch (kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_TypeKind_NULL: {result = (RDI_U8*)"NULL"; *size_out = sizeof("NULL")-1;}break;
|
||||
case RDI_TypeKind_Void: {result = (RDI_U8*)"Void"; *size_out = sizeof("Void")-1;}break;
|
||||
case RDI_TypeKind_Handle: {result = (RDI_U8*)"Handle"; *size_out = sizeof("Handle")-1;}break;
|
||||
case RDI_TypeKind_HResult: {result = (RDI_U8*)"HResult"; *size_out = sizeof("HResult")-1;}break;
|
||||
case RDI_TypeKind_Char8: {result = (RDI_U8*)"Char8"; *size_out = sizeof("Char8")-1;}break;
|
||||
case RDI_TypeKind_Char16: {result = (RDI_U8*)"Char16"; *size_out = sizeof("Char16")-1;}break;
|
||||
case RDI_TypeKind_Char32: {result = (RDI_U8*)"Char32"; *size_out = sizeof("Char32")-1;}break;
|
||||
case RDI_TypeKind_UChar8: {result = (RDI_U8*)"UChar8"; *size_out = sizeof("UChar8")-1;}break;
|
||||
case RDI_TypeKind_UChar16: {result = (RDI_U8*)"UChar16"; *size_out = sizeof("UChar16")-1;}break;
|
||||
case RDI_TypeKind_UChar32: {result = (RDI_U8*)"UChar32"; *size_out = sizeof("UChar32")-1;}break;
|
||||
case RDI_TypeKind_U8: {result = (RDI_U8*)"U8"; *size_out = sizeof("U8")-1;}break;
|
||||
case RDI_TypeKind_U16: {result = (RDI_U8*)"U16"; *size_out = sizeof("U16")-1;}break;
|
||||
case RDI_TypeKind_U32: {result = (RDI_U8*)"U32"; *size_out = sizeof("U32")-1;}break;
|
||||
case RDI_TypeKind_U64: {result = (RDI_U8*)"U64"; *size_out = sizeof("U64")-1;}break;
|
||||
case RDI_TypeKind_U128: {result = (RDI_U8*)"U128"; *size_out = sizeof("U128")-1;}break;
|
||||
case RDI_TypeKind_U256: {result = (RDI_U8*)"U256"; *size_out = sizeof("U256")-1;}break;
|
||||
case RDI_TypeKind_U512: {result = (RDI_U8*)"U512"; *size_out = sizeof("U512")-1;}break;
|
||||
case RDI_TypeKind_S8: {result = (RDI_U8*)"S8"; *size_out = sizeof("S8")-1;}break;
|
||||
case RDI_TypeKind_S16: {result = (RDI_U8*)"S16"; *size_out = sizeof("S16")-1;}break;
|
||||
case RDI_TypeKind_S32: {result = (RDI_U8*)"S32"; *size_out = sizeof("S32")-1;}break;
|
||||
case RDI_TypeKind_S64: {result = (RDI_U8*)"S64"; *size_out = sizeof("S64")-1;}break;
|
||||
case RDI_TypeKind_S128: {result = (RDI_U8*)"S128"; *size_out = sizeof("S128")-1;}break;
|
||||
case RDI_TypeKind_S256: {result = (RDI_U8*)"S256"; *size_out = sizeof("S256")-1;}break;
|
||||
case RDI_TypeKind_S512: {result = (RDI_U8*)"S512"; *size_out = sizeof("S512")-1;}break;
|
||||
case RDI_TypeKind_Bool: {result = (RDI_U8*)"Bool"; *size_out = sizeof("Bool")-1;}break;
|
||||
case RDI_TypeKind_F16: {result = (RDI_U8*)"F16"; *size_out = sizeof("F16")-1;}break;
|
||||
case RDI_TypeKind_F32: {result = (RDI_U8*)"F32"; *size_out = sizeof("F32")-1;}break;
|
||||
case RDI_TypeKind_F32PP: {result = (RDI_U8*)"F32PP"; *size_out = sizeof("F32PP")-1;}break;
|
||||
case RDI_TypeKind_F48: {result = (RDI_U8*)"F48"; *size_out = sizeof("F48")-1;}break;
|
||||
case RDI_TypeKind_F64: {result = (RDI_U8*)"F64"; *size_out = sizeof("F64")-1;}break;
|
||||
case RDI_TypeKind_F80: {result = (RDI_U8*)"F80"; *size_out = sizeof("F80")-1;}break;
|
||||
case RDI_TypeKind_F128: {result = (RDI_U8*)"F128"; *size_out = sizeof("F128")-1;}break;
|
||||
case RDI_TypeKind_ComplexF32: {result = (RDI_U8*)"ComplexF32"; *size_out = sizeof("ComplexF32")-1;}break;
|
||||
case RDI_TypeKind_ComplexF64: {result = (RDI_U8*)"ComplexF64"; *size_out = sizeof("ComplexF64")-1;}break;
|
||||
case RDI_TypeKind_ComplexF80: {result = (RDI_U8*)"ComplexF80"; *size_out = sizeof("ComplexF80")-1;}break;
|
||||
case RDI_TypeKind_ComplexF128: {result = (RDI_U8*)"ComplexF128"; *size_out = sizeof("ComplexF128")-1;}break;
|
||||
case RDI_TypeKind_Modifier: {result = (RDI_U8*)"Modifier"; *size_out = sizeof("Modifier")-1;}break;
|
||||
case RDI_TypeKind_Ptr: {result = (RDI_U8*)"Ptr"; *size_out = sizeof("Ptr")-1;}break;
|
||||
case RDI_TypeKind_LRef: {result = (RDI_U8*)"LRef"; *size_out = sizeof("LRef")-1;}break;
|
||||
case RDI_TypeKind_RRef: {result = (RDI_U8*)"RRef"; *size_out = sizeof("RRef")-1;}break;
|
||||
case RDI_TypeKind_Array: {result = (RDI_U8*)"Array"; *size_out = sizeof("Array")-1;}break;
|
||||
case RDI_TypeKind_Function: {result = (RDI_U8*)"Function"; *size_out = sizeof("Function")-1;}break;
|
||||
case RDI_TypeKind_Method: {result = (RDI_U8*)"Method"; *size_out = sizeof("Method")-1;}break;
|
||||
case RDI_TypeKind_MemberPtr: {result = (RDI_U8*)"MemberPtr"; *size_out = sizeof("MemberPtr")-1;}break;
|
||||
case RDI_TypeKind_Struct: {result = (RDI_U8*)"Struct"; *size_out = sizeof("Struct")-1;}break;
|
||||
case RDI_TypeKind_Class: {result = (RDI_U8*)"Class"; *size_out = sizeof("Class")-1;}break;
|
||||
case RDI_TypeKind_Union: {result = (RDI_U8*)"Union"; *size_out = sizeof("Union")-1;}break;
|
||||
case RDI_TypeKind_Enum: {result = (RDI_U8*)"Enum"; *size_out = sizeof("Enum")-1;}break;
|
||||
case RDI_TypeKind_Alias: {result = (RDI_U8*)"Alias"; *size_out = sizeof("Alias")-1;}break;
|
||||
case RDI_TypeKind_IncompleteStruct: {result = (RDI_U8*)"IncompleteStruct"; *size_out = sizeof("IncompleteStruct")-1;}break;
|
||||
case RDI_TypeKind_IncompleteUnion: {result = (RDI_U8*)"IncompleteUnion"; *size_out = sizeof("IncompleteUnion")-1;}break;
|
||||
case RDI_TypeKind_IncompleteClass: {result = (RDI_U8*)"IncompleteClass"; *size_out = sizeof("IncompleteClass")-1;}break;
|
||||
case RDI_TypeKind_IncompleteEnum: {result = (RDI_U8*)"IncompleteEnum"; *size_out = sizeof("IncompleteEnum")-1;}break;
|
||||
case RDI_TypeKind_Bitfield: {result = (RDI_U8*)"Bitfield"; *size_out = sizeof("Bitfield")-1;}break;
|
||||
case RDI_TypeKind_Variadic: {result = (RDI_U8*)"Variadic"; *size_out = sizeof("Variadic")-1;}break;
|
||||
case RDI_TypeKind_Count: {result = (RDI_U8*)"Count"; *size_out = sizeof("Count")-1;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U32
|
||||
rdi_size_from_basic_type_kind(RDI_TypeKind kind)
|
||||
{
|
||||
RDI_U32 result = 0;
|
||||
switch(kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_TypeKind_Handle:{result = 0xFFFFFFFF;}break;
|
||||
case RDI_TypeKind_HResult:{result = 4;}break;
|
||||
case RDI_TypeKind_Char8:{result = 1;}break;
|
||||
case RDI_TypeKind_Char16:{result = 2;}break;
|
||||
case RDI_TypeKind_Char32:{result = 4;}break;
|
||||
case RDI_TypeKind_UChar8:{result = 1;}break;
|
||||
case RDI_TypeKind_UChar16:{result = 2;}break;
|
||||
case RDI_TypeKind_UChar32:{result = 4;}break;
|
||||
case RDI_TypeKind_U8:{result = 1;}break;
|
||||
case RDI_TypeKind_U16:{result = 2;}break;
|
||||
case RDI_TypeKind_U32:{result = 4;}break;
|
||||
case RDI_TypeKind_U64:{result = 8;}break;
|
||||
case RDI_TypeKind_U128:{result = 16;}break;
|
||||
case RDI_TypeKind_U256:{result = 32;}break;
|
||||
case RDI_TypeKind_U512:{result = 64;}break;
|
||||
case RDI_TypeKind_S8:{result = 1;}break;
|
||||
case RDI_TypeKind_S16:{result = 2;}break;
|
||||
case RDI_TypeKind_S32:{result = 4;}break;
|
||||
case RDI_TypeKind_S64:{result = 8;}break;
|
||||
case RDI_TypeKind_S128:{result = 16;}break;
|
||||
case RDI_TypeKind_S256:{result = 32;}break;
|
||||
case RDI_TypeKind_S512:{result = 64;}break;
|
||||
case RDI_TypeKind_Bool:{result = 1;}break;
|
||||
case RDI_TypeKind_F16:{result = 2;}break;
|
||||
case RDI_TypeKind_F32:{result = 4;}break;
|
||||
case RDI_TypeKind_F32PP:{result = 4;}break;
|
||||
case RDI_TypeKind_F48:{result = 6;}break;
|
||||
case RDI_TypeKind_F64:{result = 8;}break;
|
||||
case RDI_TypeKind_F80:{result = 10;}break;
|
||||
case RDI_TypeKind_F128:{result = 16;}break;
|
||||
case RDI_TypeKind_ComplexF32:{result = 8;}break;
|
||||
case RDI_TypeKind_ComplexF64:{result = 16;}break;
|
||||
case RDI_TypeKind_ComplexF80:{result = 20;}break;
|
||||
case RDI_TypeKind_ComplexF128:{result = 32;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U32
|
||||
rdi_addr_size_from_arch(RDI_Arch arch)
|
||||
{
|
||||
RDI_U32 result = 0;
|
||||
switch(arch)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_Arch_X86:{result = 4;}break;
|
||||
case RDI_Arch_X64:{result = 8;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_EvalConversionKind
|
||||
rdi_eval_conversion_kind_from_typegroups(RDI_EvalTypeGroup in, RDI_EvalTypeGroup out)
|
||||
{
|
||||
RDI_EvalConversionKind k = rdi_eval_typegroup_conversion_kind_matrix[in].dst_typegroups[out];
|
||||
return k;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_S32
|
||||
rdi_eval_op_typegroup_are_compatible(RDI_EvalOp op, RDI_EvalTypeGroup group)
|
||||
{
|
||||
RDI_S32 result = 0;
|
||||
switch(op)
|
||||
{
|
||||
case RDI_EvalOp_Neg: case RDI_EvalOp_Add: case RDI_EvalOp_Sub:
|
||||
case RDI_EvalOp_Mul: case RDI_EvalOp_Div:
|
||||
case RDI_EvalOp_EqEq:case RDI_EvalOp_NtEq:
|
||||
case RDI_EvalOp_LsEq:case RDI_EvalOp_GrEq:
|
||||
case RDI_EvalOp_Less:case RDI_EvalOp_Grtr:
|
||||
{
|
||||
if(group != RDI_EvalTypeGroup_Other)
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}break;
|
||||
case RDI_EvalOp_Mod:case RDI_EvalOp_LShift:case RDI_EvalOp_RShift:
|
||||
case RDI_EvalOp_BitNot:case RDI_EvalOp_BitAnd:case RDI_EvalOp_BitXor:
|
||||
case RDI_EvalOp_BitOr:case RDI_EvalOp_LogNot:case RDI_EvalOp_LogAnd:
|
||||
case RDI_EvalOp_LogOr:
|
||||
{
|
||||
if(group == RDI_EvalTypeGroup_S || group == RDI_EvalTypeGroup_U)
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U8 *
|
||||
rdi_explanation_string_from_eval_conversion_kind(RDI_EvalConversionKind kind, RDI_U64 *size_out)
|
||||
{
|
||||
*size_out = rdi_eval_conversion_kind_message_string_table[kind].size;
|
||||
return rdi_eval_conversion_kind_message_string_table[kind].str;
|
||||
}
|
||||
|
||||
#endif // RDI_FORMAT_C
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ (R)AD (D)ebug (I)nfo Format Library
|
||||
//
|
||||
// Defines standard RDI debug information format types and
|
||||
// functions.
|
||||
|
||||
#ifndef RDI_C
|
||||
#define RDI_C
|
||||
|
||||
RDI_U16 rdi_section_element_size_table[40] =
|
||||
{
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_TopLevelInfo),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_BinarySection),
|
||||
sizeof(RDI_FilePathNode),
|
||||
sizeof(RDI_SourceFile),
|
||||
sizeof(RDI_LineTable),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_Line),
|
||||
sizeof(RDI_Column),
|
||||
sizeof(RDI_SourceLineMap),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_Unit),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_TypeNode),
|
||||
sizeof(RDI_UDT),
|
||||
sizeof(RDI_Member),
|
||||
sizeof(RDI_EnumMember),
|
||||
sizeof(RDI_GlobalVariable),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_ThreadVariable),
|
||||
sizeof(RDI_Constant),
|
||||
sizeof(RDI_Procedure),
|
||||
sizeof(RDI_Scope),
|
||||
sizeof(RDI_U64),
|
||||
sizeof(RDI_VMapEntry),
|
||||
sizeof(RDI_InlineSite),
|
||||
sizeof(RDI_Local),
|
||||
sizeof(RDI_LocationBlock),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U8),
|
||||
sizeof(RDI_U32),
|
||||
sizeof(RDI_NameMap),
|
||||
sizeof(RDI_NameMapBucket),
|
||||
sizeof(RDI_NameMapNode),
|
||||
sizeof(RDI_U8),
|
||||
};
|
||||
|
||||
RDI_U8 rdi_section_is_required_table[40] =
|
||||
{
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
RDI_U16 rdi_eval_op_ctrlbits_table[52] =
|
||||
{
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 0),
|
||||
RDI_EVAL_CTRLBITS(2, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(2, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(16, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(2, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 1),
|
||||
RDI_EVAL_CTRLBITS(0, 1, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(1, 2, 1),
|
||||
RDI_EVAL_CTRLBITS(1, 1, 1),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(4, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(8, 0, 0),
|
||||
RDI_EVAL_CTRLBITS(0, 0, 0),
|
||||
};
|
||||
|
||||
struct {RDI_EvalConversionKind dst_typegroups[RDI_EvalTypeGroup_COUNT];} rdi_eval_typegroup_conversion_kind_matrix[6] =
|
||||
{
|
||||
{{RDI_EvalConversionKind_OtherToOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther, RDI_EvalConversionKind_FromOther}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Legal}},
|
||||
{{RDI_EvalConversionKind_ToOther, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Legal, RDI_EvalConversionKind_Noop}},
|
||||
{{RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop, RDI_EvalConversionKind_Noop}},
|
||||
};
|
||||
|
||||
struct {RDI_U8 *str; RDI_U64 size;} rdi_eval_conversion_kind_message_string_table[6] =
|
||||
{
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
{(RDI_U8 *)"Cannot convert between these types.", sizeof("Cannot convert between these types.")},
|
||||
{(RDI_U8 *)"Cannot convert to this type.", sizeof("Cannot convert to this type.")},
|
||||
{(RDI_U8 *)"Cannot convert this type.", sizeof("Cannot convert this type.")},
|
||||
{(RDI_U8 *)"", sizeof("")},
|
||||
};
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
rdi_hash(RDI_U8 *ptr, RDI_U64 size)
|
||||
{
|
||||
RDI_U64 result = 5381;
|
||||
RDI_U8 *opl = ptr + size;
|
||||
for(;ptr < opl; ptr += 1)
|
||||
{
|
||||
result = ((result << 5) + result) + *ptr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U8 *
|
||||
rdi_string_from_type_kind(RDI_TypeKind kind, RDI_U64 *size_out)
|
||||
{
|
||||
RDI_U8 *result = 0;
|
||||
*size_out = 0;
|
||||
switch (kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_TypeKind_NULL: {result = (RDI_U8*)"NULL"; *size_out = sizeof("NULL")-1;}break;
|
||||
case RDI_TypeKind_Void: {result = (RDI_U8*)"Void"; *size_out = sizeof("Void")-1;}break;
|
||||
case RDI_TypeKind_Handle: {result = (RDI_U8*)"Handle"; *size_out = sizeof("Handle")-1;}break;
|
||||
case RDI_TypeKind_HResult: {result = (RDI_U8*)"HResult"; *size_out = sizeof("HResult")-1;}break;
|
||||
case RDI_TypeKind_Char8: {result = (RDI_U8*)"Char8"; *size_out = sizeof("Char8")-1;}break;
|
||||
case RDI_TypeKind_Char16: {result = (RDI_U8*)"Char16"; *size_out = sizeof("Char16")-1;}break;
|
||||
case RDI_TypeKind_Char32: {result = (RDI_U8*)"Char32"; *size_out = sizeof("Char32")-1;}break;
|
||||
case RDI_TypeKind_UChar8: {result = (RDI_U8*)"UChar8"; *size_out = sizeof("UChar8")-1;}break;
|
||||
case RDI_TypeKind_UChar16: {result = (RDI_U8*)"UChar16"; *size_out = sizeof("UChar16")-1;}break;
|
||||
case RDI_TypeKind_UChar32: {result = (RDI_U8*)"UChar32"; *size_out = sizeof("UChar32")-1;}break;
|
||||
case RDI_TypeKind_U8: {result = (RDI_U8*)"U8"; *size_out = sizeof("U8")-1;}break;
|
||||
case RDI_TypeKind_U16: {result = (RDI_U8*)"U16"; *size_out = sizeof("U16")-1;}break;
|
||||
case RDI_TypeKind_U32: {result = (RDI_U8*)"U32"; *size_out = sizeof("U32")-1;}break;
|
||||
case RDI_TypeKind_U64: {result = (RDI_U8*)"U64"; *size_out = sizeof("U64")-1;}break;
|
||||
case RDI_TypeKind_U128: {result = (RDI_U8*)"U128"; *size_out = sizeof("U128")-1;}break;
|
||||
case RDI_TypeKind_U256: {result = (RDI_U8*)"U256"; *size_out = sizeof("U256")-1;}break;
|
||||
case RDI_TypeKind_U512: {result = (RDI_U8*)"U512"; *size_out = sizeof("U512")-1;}break;
|
||||
case RDI_TypeKind_S8: {result = (RDI_U8*)"S8"; *size_out = sizeof("S8")-1;}break;
|
||||
case RDI_TypeKind_S16: {result = (RDI_U8*)"S16"; *size_out = sizeof("S16")-1;}break;
|
||||
case RDI_TypeKind_S32: {result = (RDI_U8*)"S32"; *size_out = sizeof("S32")-1;}break;
|
||||
case RDI_TypeKind_S64: {result = (RDI_U8*)"S64"; *size_out = sizeof("S64")-1;}break;
|
||||
case RDI_TypeKind_S128: {result = (RDI_U8*)"S128"; *size_out = sizeof("S128")-1;}break;
|
||||
case RDI_TypeKind_S256: {result = (RDI_U8*)"S256"; *size_out = sizeof("S256")-1;}break;
|
||||
case RDI_TypeKind_S512: {result = (RDI_U8*)"S512"; *size_out = sizeof("S512")-1;}break;
|
||||
case RDI_TypeKind_Bool: {result = (RDI_U8*)"Bool"; *size_out = sizeof("Bool")-1;}break;
|
||||
case RDI_TypeKind_F16: {result = (RDI_U8*)"F16"; *size_out = sizeof("F16")-1;}break;
|
||||
case RDI_TypeKind_F32: {result = (RDI_U8*)"F32"; *size_out = sizeof("F32")-1;}break;
|
||||
case RDI_TypeKind_F32PP: {result = (RDI_U8*)"F32PP"; *size_out = sizeof("F32PP")-1;}break;
|
||||
case RDI_TypeKind_F48: {result = (RDI_U8*)"F48"; *size_out = sizeof("F48")-1;}break;
|
||||
case RDI_TypeKind_F64: {result = (RDI_U8*)"F64"; *size_out = sizeof("F64")-1;}break;
|
||||
case RDI_TypeKind_F80: {result = (RDI_U8*)"F80"; *size_out = sizeof("F80")-1;}break;
|
||||
case RDI_TypeKind_F128: {result = (RDI_U8*)"F128"; *size_out = sizeof("F128")-1;}break;
|
||||
case RDI_TypeKind_ComplexF32: {result = (RDI_U8*)"ComplexF32"; *size_out = sizeof("ComplexF32")-1;}break;
|
||||
case RDI_TypeKind_ComplexF64: {result = (RDI_U8*)"ComplexF64"; *size_out = sizeof("ComplexF64")-1;}break;
|
||||
case RDI_TypeKind_ComplexF80: {result = (RDI_U8*)"ComplexF80"; *size_out = sizeof("ComplexF80")-1;}break;
|
||||
case RDI_TypeKind_ComplexF128: {result = (RDI_U8*)"ComplexF128"; *size_out = sizeof("ComplexF128")-1;}break;
|
||||
case RDI_TypeKind_Modifier: {result = (RDI_U8*)"Modifier"; *size_out = sizeof("Modifier")-1;}break;
|
||||
case RDI_TypeKind_Ptr: {result = (RDI_U8*)"Ptr"; *size_out = sizeof("Ptr")-1;}break;
|
||||
case RDI_TypeKind_LRef: {result = (RDI_U8*)"LRef"; *size_out = sizeof("LRef")-1;}break;
|
||||
case RDI_TypeKind_RRef: {result = (RDI_U8*)"RRef"; *size_out = sizeof("RRef")-1;}break;
|
||||
case RDI_TypeKind_Array: {result = (RDI_U8*)"Array"; *size_out = sizeof("Array")-1;}break;
|
||||
case RDI_TypeKind_Function: {result = (RDI_U8*)"Function"; *size_out = sizeof("Function")-1;}break;
|
||||
case RDI_TypeKind_Method: {result = (RDI_U8*)"Method"; *size_out = sizeof("Method")-1;}break;
|
||||
case RDI_TypeKind_MemberPtr: {result = (RDI_U8*)"MemberPtr"; *size_out = sizeof("MemberPtr")-1;}break;
|
||||
case RDI_TypeKind_Struct: {result = (RDI_U8*)"Struct"; *size_out = sizeof("Struct")-1;}break;
|
||||
case RDI_TypeKind_Class: {result = (RDI_U8*)"Class"; *size_out = sizeof("Class")-1;}break;
|
||||
case RDI_TypeKind_Union: {result = (RDI_U8*)"Union"; *size_out = sizeof("Union")-1;}break;
|
||||
case RDI_TypeKind_Enum: {result = (RDI_U8*)"Enum"; *size_out = sizeof("Enum")-1;}break;
|
||||
case RDI_TypeKind_Alias: {result = (RDI_U8*)"Alias"; *size_out = sizeof("Alias")-1;}break;
|
||||
case RDI_TypeKind_IncompleteStruct: {result = (RDI_U8*)"IncompleteStruct"; *size_out = sizeof("IncompleteStruct")-1;}break;
|
||||
case RDI_TypeKind_IncompleteUnion: {result = (RDI_U8*)"IncompleteUnion"; *size_out = sizeof("IncompleteUnion")-1;}break;
|
||||
case RDI_TypeKind_IncompleteClass: {result = (RDI_U8*)"IncompleteClass"; *size_out = sizeof("IncompleteClass")-1;}break;
|
||||
case RDI_TypeKind_IncompleteEnum: {result = (RDI_U8*)"IncompleteEnum"; *size_out = sizeof("IncompleteEnum")-1;}break;
|
||||
case RDI_TypeKind_Bitfield: {result = (RDI_U8*)"Bitfield"; *size_out = sizeof("Bitfield")-1;}break;
|
||||
case RDI_TypeKind_Variadic: {result = (RDI_U8*)"Variadic"; *size_out = sizeof("Variadic")-1;}break;
|
||||
case RDI_TypeKind_Count: {result = (RDI_U8*)"Count"; *size_out = sizeof("Count")-1;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U32
|
||||
rdi_size_from_basic_type_kind(RDI_TypeKind kind)
|
||||
{
|
||||
RDI_U32 result = 0;
|
||||
switch(kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_TypeKind_Handle:{result = 0xFFFFFFFF;}break;
|
||||
case RDI_TypeKind_HResult:{result = 4;}break;
|
||||
case RDI_TypeKind_Char8:{result = 1;}break;
|
||||
case RDI_TypeKind_Char16:{result = 2;}break;
|
||||
case RDI_TypeKind_Char32:{result = 4;}break;
|
||||
case RDI_TypeKind_UChar8:{result = 1;}break;
|
||||
case RDI_TypeKind_UChar16:{result = 2;}break;
|
||||
case RDI_TypeKind_UChar32:{result = 4;}break;
|
||||
case RDI_TypeKind_U8:{result = 1;}break;
|
||||
case RDI_TypeKind_U16:{result = 2;}break;
|
||||
case RDI_TypeKind_U32:{result = 4;}break;
|
||||
case RDI_TypeKind_U64:{result = 8;}break;
|
||||
case RDI_TypeKind_U128:{result = 16;}break;
|
||||
case RDI_TypeKind_U256:{result = 32;}break;
|
||||
case RDI_TypeKind_U512:{result = 64;}break;
|
||||
case RDI_TypeKind_S8:{result = 1;}break;
|
||||
case RDI_TypeKind_S16:{result = 2;}break;
|
||||
case RDI_TypeKind_S32:{result = 4;}break;
|
||||
case RDI_TypeKind_S64:{result = 8;}break;
|
||||
case RDI_TypeKind_S128:{result = 16;}break;
|
||||
case RDI_TypeKind_S256:{result = 32;}break;
|
||||
case RDI_TypeKind_S512:{result = 64;}break;
|
||||
case RDI_TypeKind_Bool:{result = 1;}break;
|
||||
case RDI_TypeKind_F16:{result = 2;}break;
|
||||
case RDI_TypeKind_F32:{result = 4;}break;
|
||||
case RDI_TypeKind_F32PP:{result = 4;}break;
|
||||
case RDI_TypeKind_F48:{result = 6;}break;
|
||||
case RDI_TypeKind_F64:{result = 8;}break;
|
||||
case RDI_TypeKind_F80:{result = 10;}break;
|
||||
case RDI_TypeKind_F128:{result = 16;}break;
|
||||
case RDI_TypeKind_ComplexF32:{result = 8;}break;
|
||||
case RDI_TypeKind_ComplexF64:{result = 16;}break;
|
||||
case RDI_TypeKind_ComplexF80:{result = 20;}break;
|
||||
case RDI_TypeKind_ComplexF128:{result = 32;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U32
|
||||
rdi_addr_size_from_arch(RDI_Arch arch)
|
||||
{
|
||||
RDI_U32 result = 0;
|
||||
switch(arch)
|
||||
{
|
||||
default:{}break;
|
||||
case RDI_Arch_X86:{result = 4;}break;
|
||||
case RDI_Arch_X64:{result = 8;}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_EvalConversionKind
|
||||
rdi_eval_conversion_kind_from_typegroups(RDI_EvalTypeGroup in, RDI_EvalTypeGroup out)
|
||||
{
|
||||
RDI_EvalConversionKind k = rdi_eval_typegroup_conversion_kind_matrix[in].dst_typegroups[out];
|
||||
return k;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_S32
|
||||
rdi_eval_op_typegroup_are_compatible(RDI_EvalOp op, RDI_EvalTypeGroup group)
|
||||
{
|
||||
RDI_S32 result = 0;
|
||||
switch(op)
|
||||
{
|
||||
case RDI_EvalOp_Neg: case RDI_EvalOp_Add: case RDI_EvalOp_Sub:
|
||||
case RDI_EvalOp_Mul: case RDI_EvalOp_Div:
|
||||
case RDI_EvalOp_EqEq:case RDI_EvalOp_NtEq:
|
||||
case RDI_EvalOp_LsEq:case RDI_EvalOp_GrEq:
|
||||
case RDI_EvalOp_Less:case RDI_EvalOp_Grtr:
|
||||
{
|
||||
if(group != RDI_EvalTypeGroup_Other)
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}break;
|
||||
case RDI_EvalOp_Mod:case RDI_EvalOp_LShift:case RDI_EvalOp_RShift:
|
||||
case RDI_EvalOp_BitNot:case RDI_EvalOp_BitAnd:case RDI_EvalOp_BitXor:
|
||||
case RDI_EvalOp_BitOr:case RDI_EvalOp_LogNot:case RDI_EvalOp_LogAnd:
|
||||
case RDI_EvalOp_LogOr:
|
||||
{
|
||||
if(group == RDI_EvalTypeGroup_S || group == RDI_EvalTypeGroup_U)
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U8 *
|
||||
rdi_explanation_string_from_eval_conversion_kind(RDI_EvalConversionKind kind, RDI_U64 *size_out)
|
||||
{
|
||||
*size_out = rdi_eval_conversion_kind_message_string_table[kind].size;
|
||||
return rdi_eval_conversion_kind_message_string_table[kind].str;
|
||||
}
|
||||
|
||||
#endif // RDI_C
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,233 +1,233 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ RAD Debug Info, (R)AD(D)BG(I) Format Parsing Library
|
||||
//
|
||||
// Defines helper types and functions for extracting data from
|
||||
// RDI files.
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ Usage Samples
|
||||
//
|
||||
#if 0
|
||||
// Procedure Name -> Line
|
||||
{
|
||||
RDI_Parsed *rdi = ...;
|
||||
char *name = "mule_main";
|
||||
RDI_Procedure *procedure = rdi_procedure_from_name_cstr(rdi, name); // 1. name -> procedure
|
||||
RDI_U64 procedure_first_voff = rdi_first_voff_from_procedure(rdi, procedure); // 2. procedure -> virtual offset
|
||||
RDI_Line line = rdi_line_from_voff(rdi, procedure_first_voff); // 3. virtual offset -> line
|
||||
RDI_SourceFile *file = rdi_source_file_from_line(rdi, &line); // 4. line -> source file
|
||||
RDI_U64 file_path_size = 0; // 5. source file -> path
|
||||
RDI_U8 *file_path = rdi_normal_path_from_source_file(rdi, file, &file_path_size);
|
||||
printf("%s is at %.*s:%u\n", name, (int)file_path_size, file_path, line.line_num);
|
||||
}
|
||||
|
||||
// Line -> Procedure Name
|
||||
{
|
||||
RDI_Parsed *rdi = ...;
|
||||
char *path = "c:/devel/raddebugger/src/mule/mule_main.cpp";
|
||||
RDI_U32 line_num = 2557;
|
||||
RDI_SourceFile *file = rdi_source_file_from_normal_path_cstr(rdi, path); // 1. path -> source file
|
||||
RDI_U64 voff = rdi_first_voff_from_source_file_line_num(rdi, file, line_num); // 2. (source file, line) -> virtual offset
|
||||
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, voff); // 3. virtual offset -> procedure
|
||||
RDI_U64 name_size = 0; // 4. procedure -> name
|
||||
RDI_U8 *name = rdi_name_from_procedure(rdi, procedure, &name_size);
|
||||
printf("%s:%u is inside %.*s\n", path, line_num, (int)name_size, name);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef RDI_FORMAT_PARSE_H
|
||||
#define RDI_FORMAT_PARSE_H
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ Parsed Information Types
|
||||
|
||||
typedef enum RDI_ParseStatus
|
||||
{
|
||||
RDI_ParseStatus_Good = 0,
|
||||
RDI_ParseStatus_HeaderDoesNotMatch = 1,
|
||||
RDI_ParseStatus_UnsupportedVersionNumber = 2,
|
||||
RDI_ParseStatus_InvalidDataSecionLayout = 3,
|
||||
RDI_ParseStatus_MissingRequiredSection = 4,
|
||||
}
|
||||
RDI_ParseStatus;
|
||||
|
||||
typedef struct RDI_Parsed RDI_Parsed;
|
||||
struct RDI_Parsed
|
||||
{
|
||||
RDI_U8 *raw_data;
|
||||
RDI_U64 raw_data_size;
|
||||
RDI_Section *sections;
|
||||
RDI_U64 sections_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedLineTable RDI_ParsedLineTable;
|
||||
struct RDI_ParsedLineTable
|
||||
{
|
||||
// NOTE: Mapping VOFF -> LINE_INFO
|
||||
//
|
||||
// * [ voff[i], voff[i + 1] ) forms the voff range
|
||||
// * for the line info at lines[i] (and cols[i] if i < col_count)
|
||||
RDI_U64* voffs; // [count + 1] sorted
|
||||
RDI_Line* lines; // [count]
|
||||
RDI_Column* cols; // [col_count]
|
||||
RDI_U64 count;
|
||||
RDI_U64 col_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedSourceLineMap RDI_ParsedSourceLineMap;
|
||||
struct RDI_ParsedSourceLineMap
|
||||
{
|
||||
// NOTE: Mapping LINE_NUMBER -> VOFFs
|
||||
//
|
||||
// * nums[i] gives a line number
|
||||
// * that line number has one or more associated voffs
|
||||
//
|
||||
// * to find all associated voffs for the line number nums[i] :
|
||||
// * let k span over the range [ ranges[i], ranges[i + 1] )
|
||||
// * voffs[k] gives the associated voffs
|
||||
RDI_U32* nums; // [count] sorted
|
||||
RDI_U32* ranges; // [count + 1]
|
||||
RDI_U64* voffs; // [voff_count]
|
||||
RDI_U64 count;
|
||||
RDI_U64 voff_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedNameMap RDI_ParsedNameMap;
|
||||
struct RDI_ParsedNameMap
|
||||
{
|
||||
RDI_NameMapBucket *buckets;
|
||||
RDI_NameMapNode *nodes;
|
||||
RDI_U64 bucket_count;
|
||||
RDI_U64 node_count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ Global Nils
|
||||
|
||||
static union
|
||||
{
|
||||
RDI_TopLevelInfo top_level_info;
|
||||
RDI_BinarySection binary_section;
|
||||
RDI_FilePathNode file_path_node;
|
||||
RDI_SourceFile source_file;
|
||||
RDI_LineTable line_table;
|
||||
RDI_SourceLineMap source_line_map;
|
||||
RDI_Line line;
|
||||
RDI_Column column;
|
||||
RDI_Unit unit;
|
||||
RDI_VMapEntry vmap_entry;
|
||||
RDI_TypeNode type_node;
|
||||
RDI_UDT udt;
|
||||
RDI_Member member;
|
||||
RDI_EnumMember enum_member;
|
||||
RDI_GlobalVariable global_variable;
|
||||
RDI_ThreadVariable thread_variable;
|
||||
RDI_Procedure procedure;
|
||||
RDI_Scope scope;
|
||||
RDI_U64 voff;
|
||||
RDI_LocationBlock location_block;
|
||||
RDI_Local local;
|
||||
}
|
||||
rdi_nil_element_union = {0};
|
||||
static RDI_Parsed rdi_parsed_nil = {0};
|
||||
|
||||
////////////////////////////////
|
||||
//~ Top-Level Parsing API
|
||||
|
||||
RDI_PROC RDI_ParseStatus rdi_parse(RDI_U8 *data, RDI_U64 size, RDI_Parsed *out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ Base Parsed Info Extraction Helpers
|
||||
|
||||
//- section table/element raw data extraction
|
||||
RDI_PROC void *rdi_section_raw_data_from_kind(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_SectionEncoding *encoding_out, RDI_U64 *size_out);
|
||||
RDI_PROC void *rdi_section_raw_table_from_kind(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_U64 *count_out);
|
||||
RDI_PROC void *rdi_section_raw_element_from_kind_idx(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_U64 idx);
|
||||
#define rdi_table_from_name(rdi, name, count_out) ((RDI_SectionElementType_##name *)rdi_section_raw_table_from_kind((rdi), RDI_SectionKind_##name, (count_out)))
|
||||
#define rdi_element_from_name_idx(rdi, name, idx) ((RDI_SectionElementType_##name *)rdi_section_raw_element_from_kind_idx((rdi), RDI_SectionKind_##name, (idx)))
|
||||
|
||||
//- info about whole parse
|
||||
RDI_PROC RDI_U64 rdi_decompressed_size_from_parsed(RDI_Parsed *rdi);
|
||||
|
||||
//- strings
|
||||
RDI_PROC RDI_U8 *rdi_string_from_idx(RDI_Parsed *rdi, RDI_U32 idx, RDI_U64 *len_out);
|
||||
|
||||
//- index runs
|
||||
RDI_PROC RDI_U32 *rdi_idx_run_from_first_count(RDI_Parsed *rdi, RDI_U32 raw_first, RDI_U32 raw_count, RDI_U32 *n_out);
|
||||
|
||||
//- line info
|
||||
RDI_PROC void rdi_parsed_from_line_table(RDI_Parsed *rdi, RDI_LineTable *line_table, RDI_ParsedLineTable *out);
|
||||
RDI_PROC RDI_U64 rdi_line_info_idx_range_from_voff(RDI_ParsedLineTable *line_info, RDI_U64 voff, RDI_U64 *n_out);
|
||||
RDI_PROC RDI_U64 rdi_line_info_idx_from_voff(RDI_ParsedLineTable *line_info, RDI_U64 voff);
|
||||
RDI_PROC void rdi_parsed_from_source_line_map(RDI_Parsed *rdi, RDI_SourceLineMap *map, RDI_ParsedSourceLineMap *out);
|
||||
RDI_PROC RDI_U64 *rdi_line_voffs_from_num(RDI_ParsedSourceLineMap *map, RDI_U32 linenum, RDI_U32 *n_out);
|
||||
|
||||
//- vmap lookups
|
||||
RDI_PROC RDI_U64 rdi_vmap_idx_from_voff(RDI_VMapEntry *vmap, RDI_U64 vmap_count, RDI_U64 voff);
|
||||
|
||||
//- name maps
|
||||
RDI_PROC RDI_NameMap *rdi_name_map_from_kind(RDI_Parsed *p, RDI_NameMapKind kind);
|
||||
RDI_PROC void rdi_name_map_parse(RDI_Parsed* p, RDI_NameMap *mapptr, RDI_ParsedNameMap *out);
|
||||
RDI_PROC RDI_NameMapNode *rdi_name_map_lookup(RDI_Parsed *p, RDI_ParsedNameMap *map, RDI_U8 *str, RDI_U64 len);
|
||||
RDI_PROC RDI_U32 *rdi_matches_from_map_node(RDI_Parsed *p, RDI_NameMapNode *node, RDI_U32 *n_out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ High-Level Composite Lookup Functions
|
||||
|
||||
//- procedures
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_name(RDI_Parsed *rdi, RDI_U8 *name, RDI_U64 name_size);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_name_cstr(RDI_Parsed *rdi, char *cstr);
|
||||
RDI_PROC RDI_U8 *rdi_name_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure, RDI_U64 *len_out);
|
||||
RDI_PROC RDI_Scope *rdi_root_scope_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_UDT *rdi_container_udt_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_Procedure *rdi_container_procedure_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_U64 rdi_opl_voff_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
|
||||
//- scopes
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_U64 rdi_opl_voff_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_Scope *rdi_scope_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_Scope *rdi_parent_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_InlineSite *rdi_inline_site_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
|
||||
//- global variables
|
||||
RDI_PROC RDI_GlobalVariable *rdi_global_variable_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
|
||||
//- units
|
||||
RDI_PROC RDI_Unit *rdi_unit_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_LineTable *rdi_line_table_from_unit(RDI_Parsed *rdi, RDI_Unit *unit);
|
||||
|
||||
//- line tables
|
||||
RDI_PROC RDI_Line rdi_line_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_Line rdi_line_from_line_table_voff(RDI_Parsed *rdi, RDI_LineTable *line_table, RDI_U64 voff);
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_line(RDI_Parsed *rdi, RDI_Line *line);
|
||||
|
||||
//- source files
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_normal_path(RDI_Parsed *rdi, RDI_U8 *name, RDI_U64 name_size);
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_normal_path_cstr(RDI_Parsed *rdi, char *cstr);
|
||||
RDI_PROC RDI_U8 *rdi_normal_path_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file, RDI_U64 *len_out);
|
||||
RDI_PROC RDI_FilePathNode *rdi_file_path_node_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file);
|
||||
RDI_PROC RDI_SourceLineMap *rdi_source_line_map_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file);
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_source_file_line_num(RDI_Parsed *rdi, RDI_SourceFile *src_file, RDI_U32 line_num);
|
||||
|
||||
//- source line maps
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_source_line_map_num(RDI_Parsed *rdi, RDI_SourceLineMap *map, RDI_U32 line_num);
|
||||
|
||||
//- file path nodes
|
||||
RDI_PROC RDI_FilePathNode *rdi_parent_from_file_path_node(RDI_Parsed *rdi, RDI_FilePathNode *node);
|
||||
RDI_PROC RDI_U8 *rdi_name_from_file_path_node(RDI_Parsed *rdi, RDI_FilePathNode *node, RDI_U64 *len_out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ Parser Helpers
|
||||
|
||||
#define rdi_parse__min(a,b) (((a)<(b))?(a):(b))
|
||||
RDI_PROC RDI_U64 rdi_cstring_length(char *cstr);
|
||||
RDI_PROC RDI_U64 rdi_size_from_bytecode_stream(RDI_U8 *ptr, RDI_U8 *opl);
|
||||
|
||||
#endif // RDI_FORMAT_PARSE_H
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ (R)AD (D)ebug (I)nfo Format Parsing Library
|
||||
//
|
||||
// Defines helper types and functions for extracting data from
|
||||
// RDI files.
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ Usage Samples
|
||||
//
|
||||
#if 0
|
||||
// Procedure Name -> Line
|
||||
{
|
||||
RDI_Parsed *rdi = ...;
|
||||
char *name = "mule_main";
|
||||
RDI_Procedure *procedure = rdi_procedure_from_name_cstr(rdi, name); // 1. name -> procedure
|
||||
RDI_U64 procedure_first_voff = rdi_first_voff_from_procedure(rdi, procedure); // 2. procedure -> virtual offset
|
||||
RDI_Line line = rdi_line_from_voff(rdi, procedure_first_voff); // 3. virtual offset -> line
|
||||
RDI_SourceFile *file = rdi_source_file_from_line(rdi, &line); // 4. line -> source file
|
||||
RDI_U64 file_path_size = 0; // 5. source file -> path
|
||||
RDI_U8 *file_path = rdi_normal_path_from_source_file(rdi, file, &file_path_size);
|
||||
printf("%s is at %.*s:%u\n", name, (int)file_path_size, file_path, line.line_num);
|
||||
}
|
||||
|
||||
// Line -> Procedure Name
|
||||
{
|
||||
RDI_Parsed *rdi = ...;
|
||||
char *path = "c:/devel/raddebugger/src/mule/mule_main.cpp";
|
||||
RDI_U32 line_num = 2557;
|
||||
RDI_SourceFile *file = rdi_source_file_from_normal_path_cstr(rdi, path); // 1. path -> source file
|
||||
RDI_U64 voff = rdi_first_voff_from_source_file_line_num(rdi, file, line_num); // 2. (source file, line) -> virtual offset
|
||||
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, voff); // 3. virtual offset -> procedure
|
||||
RDI_U64 name_size = 0; // 4. procedure -> name
|
||||
RDI_U8 *name = rdi_name_from_procedure(rdi, procedure, &name_size);
|
||||
printf("%s:%u is inside %.*s\n", path, line_num, (int)name_size, name);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef RDI_PARSE_H
|
||||
#define RDI_PARSE_H
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ Parsed Information Types
|
||||
|
||||
typedef enum RDI_ParseStatus
|
||||
{
|
||||
RDI_ParseStatus_Good = 0,
|
||||
RDI_ParseStatus_HeaderDoesNotMatch = 1,
|
||||
RDI_ParseStatus_UnsupportedVersionNumber = 2,
|
||||
RDI_ParseStatus_InvalidDataSecionLayout = 3,
|
||||
RDI_ParseStatus_MissingRequiredSection = 4,
|
||||
}
|
||||
RDI_ParseStatus;
|
||||
|
||||
typedef struct RDI_Parsed RDI_Parsed;
|
||||
struct RDI_Parsed
|
||||
{
|
||||
RDI_U8 *raw_data;
|
||||
RDI_U64 raw_data_size;
|
||||
RDI_Section *sections;
|
||||
RDI_U64 sections_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedLineTable RDI_ParsedLineTable;
|
||||
struct RDI_ParsedLineTable
|
||||
{
|
||||
// NOTE: Mapping VOFF -> LINE_INFO
|
||||
//
|
||||
// * [ voff[i], voff[i + 1] ) forms the voff range
|
||||
// * for the line info at lines[i] (and cols[i] if i < col_count)
|
||||
RDI_U64* voffs; // [count + 1] sorted
|
||||
RDI_Line* lines; // [count]
|
||||
RDI_Column* cols; // [col_count]
|
||||
RDI_U64 count;
|
||||
RDI_U64 col_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedSourceLineMap RDI_ParsedSourceLineMap;
|
||||
struct RDI_ParsedSourceLineMap
|
||||
{
|
||||
// NOTE: Mapping LINE_NUMBER -> VOFFs
|
||||
//
|
||||
// * nums[i] gives a line number
|
||||
// * that line number has one or more associated voffs
|
||||
//
|
||||
// * to find all associated voffs for the line number nums[i] :
|
||||
// * let k span over the range [ ranges[i], ranges[i + 1] )
|
||||
// * voffs[k] gives the associated voffs
|
||||
RDI_U32* nums; // [count] sorted
|
||||
RDI_U32* ranges; // [count + 1]
|
||||
RDI_U64* voffs; // [voff_count]
|
||||
RDI_U64 count;
|
||||
RDI_U64 voff_count;
|
||||
};
|
||||
|
||||
typedef struct RDI_ParsedNameMap RDI_ParsedNameMap;
|
||||
struct RDI_ParsedNameMap
|
||||
{
|
||||
RDI_NameMapBucket *buckets;
|
||||
RDI_NameMapNode *nodes;
|
||||
RDI_U64 bucket_count;
|
||||
RDI_U64 node_count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ Global Nils
|
||||
|
||||
static union
|
||||
{
|
||||
RDI_TopLevelInfo top_level_info;
|
||||
RDI_BinarySection binary_section;
|
||||
RDI_FilePathNode file_path_node;
|
||||
RDI_SourceFile source_file;
|
||||
RDI_LineTable line_table;
|
||||
RDI_SourceLineMap source_line_map;
|
||||
RDI_Line line;
|
||||
RDI_Column column;
|
||||
RDI_Unit unit;
|
||||
RDI_VMapEntry vmap_entry;
|
||||
RDI_TypeNode type_node;
|
||||
RDI_UDT udt;
|
||||
RDI_Member member;
|
||||
RDI_EnumMember enum_member;
|
||||
RDI_GlobalVariable global_variable;
|
||||
RDI_ThreadVariable thread_variable;
|
||||
RDI_Procedure procedure;
|
||||
RDI_Scope scope;
|
||||
RDI_U64 voff;
|
||||
RDI_LocationBlock location_block;
|
||||
RDI_Local local;
|
||||
}
|
||||
rdi_nil_element_union = {0};
|
||||
static RDI_Parsed rdi_parsed_nil = {0};
|
||||
|
||||
////////////////////////////////
|
||||
//~ Top-Level Parsing API
|
||||
|
||||
RDI_PROC RDI_ParseStatus rdi_parse(RDI_U8 *data, RDI_U64 size, RDI_Parsed *out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ Base Parsed Info Extraction Helpers
|
||||
|
||||
//- section table/element raw data extraction
|
||||
RDI_PROC void *rdi_section_raw_data_from_kind(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_SectionEncoding *encoding_out, RDI_U64 *size_out);
|
||||
RDI_PROC void *rdi_section_raw_table_from_kind(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_U64 *count_out);
|
||||
RDI_PROC void *rdi_section_raw_element_from_kind_idx(RDI_Parsed *rdi, RDI_SectionKind kind, RDI_U64 idx);
|
||||
#define rdi_table_from_name(rdi, name, count_out) ((RDI_SectionElementType_##name *)rdi_section_raw_table_from_kind((rdi), RDI_SectionKind_##name, (count_out)))
|
||||
#define rdi_element_from_name_idx(rdi, name, idx) ((RDI_SectionElementType_##name *)rdi_section_raw_element_from_kind_idx((rdi), RDI_SectionKind_##name, (idx)))
|
||||
|
||||
//- info about whole parse
|
||||
RDI_PROC RDI_U64 rdi_decompressed_size_from_parsed(RDI_Parsed *rdi);
|
||||
|
||||
//- strings
|
||||
RDI_PROC RDI_U8 *rdi_string_from_idx(RDI_Parsed *rdi, RDI_U32 idx, RDI_U64 *len_out);
|
||||
|
||||
//- index runs
|
||||
RDI_PROC RDI_U32 *rdi_idx_run_from_first_count(RDI_Parsed *rdi, RDI_U32 raw_first, RDI_U32 raw_count, RDI_U32 *n_out);
|
||||
|
||||
//- line info
|
||||
RDI_PROC void rdi_parsed_from_line_table(RDI_Parsed *rdi, RDI_LineTable *line_table, RDI_ParsedLineTable *out);
|
||||
RDI_PROC RDI_U64 rdi_line_info_idx_range_from_voff(RDI_ParsedLineTable *line_info, RDI_U64 voff, RDI_U64 *n_out);
|
||||
RDI_PROC RDI_U64 rdi_line_info_idx_from_voff(RDI_ParsedLineTable *line_info, RDI_U64 voff);
|
||||
RDI_PROC void rdi_parsed_from_source_line_map(RDI_Parsed *rdi, RDI_SourceLineMap *map, RDI_ParsedSourceLineMap *out);
|
||||
RDI_PROC RDI_U64 *rdi_line_voffs_from_num(RDI_ParsedSourceLineMap *map, RDI_U32 linenum, RDI_U32 *n_out);
|
||||
|
||||
//- vmap lookups
|
||||
RDI_PROC RDI_U64 rdi_vmap_idx_from_voff(RDI_VMapEntry *vmap, RDI_U64 vmap_count, RDI_U64 voff);
|
||||
|
||||
//- name maps
|
||||
RDI_PROC RDI_NameMap *rdi_name_map_from_kind(RDI_Parsed *p, RDI_NameMapKind kind);
|
||||
RDI_PROC void rdi_name_map_parse(RDI_Parsed* p, RDI_NameMap *mapptr, RDI_ParsedNameMap *out);
|
||||
RDI_PROC RDI_NameMapNode *rdi_name_map_lookup(RDI_Parsed *p, RDI_ParsedNameMap *map, RDI_U8 *str, RDI_U64 len);
|
||||
RDI_PROC RDI_U32 *rdi_matches_from_map_node(RDI_Parsed *p, RDI_NameMapNode *node, RDI_U32 *n_out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ High-Level Composite Lookup Functions
|
||||
|
||||
//- procedures
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_name(RDI_Parsed *rdi, RDI_U8 *name, RDI_U64 name_size);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_name_cstr(RDI_Parsed *rdi, char *cstr);
|
||||
RDI_PROC RDI_U8 *rdi_name_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure, RDI_U64 *len_out);
|
||||
RDI_PROC RDI_Scope *rdi_root_scope_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_UDT *rdi_container_udt_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_Procedure *rdi_container_procedure_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_U64 rdi_opl_voff_from_procedure(RDI_Parsed *rdi, RDI_Procedure *procedure);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
|
||||
//- scopes
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_U64 rdi_opl_voff_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_Scope *rdi_scope_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_Scope *rdi_parent_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_Procedure *rdi_procedure_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
RDI_PROC RDI_InlineSite *rdi_inline_site_from_scope(RDI_Parsed *rdi, RDI_Scope *scope);
|
||||
|
||||
//- global variables
|
||||
RDI_PROC RDI_GlobalVariable *rdi_global_variable_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
|
||||
//- units
|
||||
RDI_PROC RDI_Unit *rdi_unit_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_LineTable *rdi_line_table_from_unit(RDI_Parsed *rdi, RDI_Unit *unit);
|
||||
|
||||
//- line tables
|
||||
RDI_PROC RDI_Line rdi_line_from_voff(RDI_Parsed *rdi, RDI_U64 voff);
|
||||
RDI_PROC RDI_Line rdi_line_from_line_table_voff(RDI_Parsed *rdi, RDI_LineTable *line_table, RDI_U64 voff);
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_line(RDI_Parsed *rdi, RDI_Line *line);
|
||||
|
||||
//- source files
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_normal_path(RDI_Parsed *rdi, RDI_U8 *name, RDI_U64 name_size);
|
||||
RDI_PROC RDI_SourceFile *rdi_source_file_from_normal_path_cstr(RDI_Parsed *rdi, char *cstr);
|
||||
RDI_PROC RDI_U8 *rdi_normal_path_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file, RDI_U64 *len_out);
|
||||
RDI_PROC RDI_FilePathNode *rdi_file_path_node_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file);
|
||||
RDI_PROC RDI_SourceLineMap *rdi_source_line_map_from_source_file(RDI_Parsed *rdi, RDI_SourceFile *src_file);
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_source_file_line_num(RDI_Parsed *rdi, RDI_SourceFile *src_file, RDI_U32 line_num);
|
||||
|
||||
//- source line maps
|
||||
RDI_PROC RDI_U64 rdi_first_voff_from_source_line_map_num(RDI_Parsed *rdi, RDI_SourceLineMap *map, RDI_U32 line_num);
|
||||
|
||||
//- file path nodes
|
||||
RDI_PROC RDI_FilePathNode *rdi_parent_from_file_path_node(RDI_Parsed *rdi, RDI_FilePathNode *node);
|
||||
RDI_PROC RDI_U8 *rdi_name_from_file_path_node(RDI_Parsed *rdi, RDI_FilePathNode *node, RDI_U64 *len_out);
|
||||
|
||||
////////////////////////////////
|
||||
//~ Parser Helpers
|
||||
|
||||
#define rdi_parse__min(a,b) (((a)<(b))?(a):(b))
|
||||
RDI_PROC RDI_U64 rdi_cstring_length(char *cstr);
|
||||
RDI_PROC RDI_U64 rdi_size_from_bytecode_stream(RDI_U8 *ptr, RDI_U8 *opl);
|
||||
|
||||
#endif // RDI_FORMAT_PARSE_H
|
||||
+2
-4
@@ -63,10 +63,8 @@
|
||||
// RDI
|
||||
|
||||
#include "rdi/rdi_overrides.h"
|
||||
#include "lib_rdi_format/rdi_format.h"
|
||||
#include "rdi/rdi.h"
|
||||
#include "lib_rdi_format/rdi_format.c"
|
||||
#include "rdi/rdi.c"
|
||||
#include "lib_rdi/rdi.h"
|
||||
#include "lib_rdi/rdi.c"
|
||||
|
||||
////////////////////////////////
|
||||
// Code Base Extensions
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "linker/hash_table.h"
|
||||
#include "os/os_inc.h"
|
||||
#include "async/async.h"
|
||||
#include "rdi_format/rdi_format_local.h"
|
||||
#include "rdi/rdi_local.h"
|
||||
#include "rdi_make/rdi_make_local.h"
|
||||
#include "coff/coff.h"
|
||||
#include "coff/coff_parse.h"
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "linker/hash_table.c"
|
||||
#include "os/os_inc.c"
|
||||
#include "async/async.c"
|
||||
#include "rdi_format/rdi_format_local.c"
|
||||
#include "rdi/rdi_local.c"
|
||||
#include "rdi_make/rdi_make_local.c"
|
||||
#include "coff/coff.c"
|
||||
#include "coff/coff_parse.c"
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
#include "linker/hash_table.h"
|
||||
#include "os/os_inc.h"
|
||||
#include "async/async.h"
|
||||
#include "rdi_format/rdi_format_local.h"
|
||||
#include "rdi/rdi_local.h"
|
||||
#include "rdi_make/rdi_make_local.h"
|
||||
#include "mdesk/mdesk.h"
|
||||
#include "hash_store/hash_store.h"
|
||||
@@ -264,7 +264,7 @@
|
||||
#include "linker/hash_table.c"
|
||||
#include "os/os_inc.c"
|
||||
#include "async/async.c"
|
||||
#include "rdi_format/rdi_format_local.c"
|
||||
#include "rdi/rdi_local.c"
|
||||
#include "rdi_make/rdi_make_local.c"
|
||||
#include "mdesk/mdesk.c"
|
||||
#include "hash_store/hash_store.c"
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
//~ rjf: Generated File Format
|
||||
|
||||
@option library
|
||||
@gen_folder "lib_rdi_format"
|
||||
@h_name "rdi_format.h"
|
||||
@c_name "rdi_format.c"
|
||||
@gen_folder "lib_rdi"
|
||||
@h_name "rdi.h"
|
||||
@c_name "rdi.c"
|
||||
|
||||
@h_header
|
||||
{
|
||||
"////////////////////////////////////////////////////////////////";
|
||||
"//~ RAD Debug Info, (R)AD(D)BG(I) Format Library";
|
||||
"//~ (R)AD (D)ebug (I)nfo Format Library";
|
||||
"//";
|
||||
"// Defines standard RDI debug information format types and";
|
||||
"// functions.";
|
||||
"";
|
||||
"#ifndef RDI_FORMAT_H";
|
||||
"#define RDI_FORMAT_H";
|
||||
"#ifndef RDI_H";
|
||||
"#define RDI_H";
|
||||
"";
|
||||
"////////////////////////////////////////////////////////////////";
|
||||
"//~ Overridable Procedure Decoration";
|
||||
@@ -71,25 +71,25 @@
|
||||
|
||||
@h_footer
|
||||
{
|
||||
"#endif // RDI_FORMAT_H";
|
||||
"#endif // RDI_H";
|
||||
}
|
||||
|
||||
@c_header
|
||||
{
|
||||
"////////////////////////////////////////////////////////////////";
|
||||
"//~ RAD Debug Info, (R)AD(D)BG(I) Format Library";
|
||||
"//~ (R)AD (D)ebug (I)nfo Format Library";
|
||||
"//";
|
||||
"// Defines standard RDI debug information format types and";
|
||||
"// functions.";
|
||||
"";
|
||||
"#ifndef RDI_FORMAT_C";
|
||||
"#define RDI_FORMAT_C";
|
||||
"#ifndef RDI_C";
|
||||
"#define RDI_C";
|
||||
"";
|
||||
}
|
||||
|
||||
@c_footer
|
||||
{
|
||||
"#endif // RDI_FORMAT_C";
|
||||
"#endif // RDI_C";
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,102 +1,102 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef RDI_FORMAT_LOCAL_H
|
||||
#define RDI_FORMAT_LOCAL_H
|
||||
|
||||
#include "lib_rdi_format/rdi_format.h"
|
||||
#include "lib_rdi_format/rdi_format_parse.h"
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Dumping Flags
|
||||
|
||||
#define RDI_DumpSubset_XList \
|
||||
X(DataSections, data_sections, "DATA SECTIONS")\
|
||||
X(TopLevelInfo, top_level_info, "TOP LEVEL INFO")\
|
||||
X(BinarySections, binary_sections, "BINARY SECTIONS")\
|
||||
X(FilePaths, file_paths, "FILE PATHS")\
|
||||
X(SourceFiles, source_files, "SOURCE FILES")\
|
||||
X(LineTables, line_tables, "LINE TABLES")\
|
||||
X(SourceLineMaps, source_line_maps, "SOURCE LINE MAPS")\
|
||||
X(Units, units, "UNITS")\
|
||||
X(UnitVMap, unit_vmap, "UNIT VMAP")\
|
||||
X(TypeNodes, type_nodes, "TYPE NODES")\
|
||||
X(UserDefinedTypes, user_defined_types, "USER DEFINED TYPES")\
|
||||
X(GlobalVariables, global_variables, "GLOBAL VARIABLES")\
|
||||
X(GlobalVariablesVMap, global_variables_vmap, "GLOBAL VARIABLE VMAP")\
|
||||
X(ThreadVariables, thread_variables, "THREAD VARIABLES")\
|
||||
X(Constants, constants, "CONSTANTS")\
|
||||
X(Procedures, procedures, "PROCEDURES")\
|
||||
X(Scopes, scopes, "SCOPES")\
|
||||
X(ScopeVMap, scope_vmap, "SCOPE VMAP")\
|
||||
X(InlineSites, inline_sites, "INLINE SITES")\
|
||||
X(NameMaps, name_maps, "NAME MAPS")\
|
||||
X(Strings, strings, "STRINGS")\
|
||||
|
||||
typedef enum RDI_DumpSubset
|
||||
{
|
||||
#define X(name, name_lower, title) RDI_DumpSubset_##name,
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
}
|
||||
RDI_DumpSubset;
|
||||
|
||||
typedef U32 RDI_DumpSubsetFlags;
|
||||
enum
|
||||
{
|
||||
#define X(name, name_lower, title) RDI_DumpSubsetFlag_##name = (1<<RDI_DumpSubset_##name),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
RDI_DumpSubsetFlag_All = 0xffffffffu,
|
||||
};
|
||||
|
||||
read_only global String8 rdi_name_lowercase_from_dump_subset_table[] =
|
||||
{
|
||||
#define X(name, name_lower, title) str8_lit_comp(#name_lower),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
};
|
||||
|
||||
read_only global String8 rdi_name_title_from_dump_subset_table[] =
|
||||
{
|
||||
#define X(name, name_lower, title) str8_lit_comp(title),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Decompression
|
||||
|
||||
internal void rdi_decompress_parsed(U8 *decompressed_data, U64 decompressed_size, RDI_Parsed *og_rdi);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Lookup Helpers
|
||||
|
||||
internal String8 str8_from_rdi_string_idx(RDI_Parsed *rdi, U32 idx);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: String <=> Enum
|
||||
|
||||
internal String8 rdi_string_from_data_section_kind(Arena *arena, RDI_SectionKind v);
|
||||
internal String8 rdi_string_from_arch (Arena *arena, RDI_Arch v);
|
||||
internal String8 rdi_string_from_language (Arena *arena, RDI_Language v);
|
||||
internal String8 rdi_string_from_local_kind (Arena *arena, RDI_LocalKind v);
|
||||
#if 0 // TODO(rjf): conflicts with RDI...
|
||||
internal String8 rdi_string_from_type_kind (Arena *arena, RDI_TypeKind v);
|
||||
#endif
|
||||
internal String8 rdi_string_from_member_kind (Arena *arena, RDI_MemberKind v);
|
||||
internal String8 rdi_string_from_name_map_kind(RDI_NameMapKind kind);
|
||||
|
||||
internal String8 rdi_string_from_binary_section_flags(Arena *arena, RDI_BinarySectionFlags flags);
|
||||
internal String8 rdi_string_from_type_modifier (Arena *arena, RDI_TypeModifierFlags flags);
|
||||
internal String8 rdi_string_from_udt_flags (Arena *arena, RDI_UDTFlags flags);
|
||||
internal String8 rdi_string_from_link_flags (Arena *arena, RDI_LinkFlags flags);
|
||||
internal String8 rdi_string_from_bytecode(Arena *arena, RDI_Arch arch, String8 bc);
|
||||
internal String8List rdi_strings_from_locations(Arena *arena, RDI_Parsed *rdi, RDI_Arch arch, Rng1U64 location_block_range);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Dumping
|
||||
|
||||
internal String8List rdi_dump_list_from_parsed(Arena *arena, RDI_Parsed *rdi, RDI_DumpSubsetFlags flags);
|
||||
|
||||
#endif // RDI_FORMAT_LOCAL_H
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef RDI_FORMAT_LOCAL_H
|
||||
#define RDI_FORMAT_LOCAL_H
|
||||
|
||||
#include "lib_rdi/rdi.h"
|
||||
#include "lib_rdi/rdi_parse.h"
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Dumping Flags
|
||||
|
||||
#define RDI_DumpSubset_XList \
|
||||
X(DataSections, data_sections, "DATA SECTIONS")\
|
||||
X(TopLevelInfo, top_level_info, "TOP LEVEL INFO")\
|
||||
X(BinarySections, binary_sections, "BINARY SECTIONS")\
|
||||
X(FilePaths, file_paths, "FILE PATHS")\
|
||||
X(SourceFiles, source_files, "SOURCE FILES")\
|
||||
X(LineTables, line_tables, "LINE TABLES")\
|
||||
X(SourceLineMaps, source_line_maps, "SOURCE LINE MAPS")\
|
||||
X(Units, units, "UNITS")\
|
||||
X(UnitVMap, unit_vmap, "UNIT VMAP")\
|
||||
X(TypeNodes, type_nodes, "TYPE NODES")\
|
||||
X(UserDefinedTypes, user_defined_types, "USER DEFINED TYPES")\
|
||||
X(GlobalVariables, global_variables, "GLOBAL VARIABLES")\
|
||||
X(GlobalVariablesVMap, global_variables_vmap, "GLOBAL VARIABLE VMAP")\
|
||||
X(ThreadVariables, thread_variables, "THREAD VARIABLES")\
|
||||
X(Constants, constants, "CONSTANTS")\
|
||||
X(Procedures, procedures, "PROCEDURES")\
|
||||
X(Scopes, scopes, "SCOPES")\
|
||||
X(ScopeVMap, scope_vmap, "SCOPE VMAP")\
|
||||
X(InlineSites, inline_sites, "INLINE SITES")\
|
||||
X(NameMaps, name_maps, "NAME MAPS")\
|
||||
X(Strings, strings, "STRINGS")\
|
||||
|
||||
typedef enum RDI_DumpSubset
|
||||
{
|
||||
#define X(name, name_lower, title) RDI_DumpSubset_##name,
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
}
|
||||
RDI_DumpSubset;
|
||||
|
||||
typedef U32 RDI_DumpSubsetFlags;
|
||||
enum
|
||||
{
|
||||
#define X(name, name_lower, title) RDI_DumpSubsetFlag_##name = (1<<RDI_DumpSubset_##name),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
RDI_DumpSubsetFlag_All = 0xffffffffu,
|
||||
};
|
||||
|
||||
read_only global String8 rdi_name_lowercase_from_dump_subset_table[] =
|
||||
{
|
||||
#define X(name, name_lower, title) str8_lit_comp(#name_lower),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
};
|
||||
|
||||
read_only global String8 rdi_name_title_from_dump_subset_table[] =
|
||||
{
|
||||
#define X(name, name_lower, title) str8_lit_comp(title),
|
||||
RDI_DumpSubset_XList
|
||||
#undef X
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Decompression
|
||||
|
||||
internal void rdi_decompress_parsed(U8 *decompressed_data, U64 decompressed_size, RDI_Parsed *og_rdi);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Lookup Helpers
|
||||
|
||||
internal String8 str8_from_rdi_string_idx(RDI_Parsed *rdi, U32 idx);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: String <=> Enum
|
||||
|
||||
internal String8 rdi_string_from_data_section_kind(Arena *arena, RDI_SectionKind v);
|
||||
internal String8 rdi_string_from_arch (Arena *arena, RDI_Arch v);
|
||||
internal String8 rdi_string_from_language (Arena *arena, RDI_Language v);
|
||||
internal String8 rdi_string_from_local_kind (Arena *arena, RDI_LocalKind v);
|
||||
#if 0 // TODO(rjf): conflicts with RDI...
|
||||
internal String8 rdi_string_from_type_kind (Arena *arena, RDI_TypeKind v);
|
||||
#endif
|
||||
internal String8 rdi_string_from_member_kind (Arena *arena, RDI_MemberKind v);
|
||||
internal String8 rdi_string_from_name_map_kind(RDI_NameMapKind kind);
|
||||
|
||||
internal String8 rdi_string_from_binary_section_flags(Arena *arena, RDI_BinarySectionFlags flags);
|
||||
internal String8 rdi_string_from_type_modifier (Arena *arena, RDI_TypeModifierFlags flags);
|
||||
internal String8 rdi_string_from_udt_flags (Arena *arena, RDI_UDTFlags flags);
|
||||
internal String8 rdi_string_from_link_flags (Arena *arena, RDI_LinkFlags flags);
|
||||
internal String8 rdi_string_from_bytecode(Arena *arena, RDI_Arch arch, String8 bc);
|
||||
internal String8List rdi_strings_from_locations(Arena *arena, RDI_Parsed *rdi, RDI_Arch arch, Rng1U64 location_block_range);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Dumping
|
||||
|
||||
internal String8List rdi_dump_list_from_parsed(Arena *arena, RDI_Parsed *rdi, RDI_DumpSubsetFlags flags);
|
||||
|
||||
#endif // RDI_FORMAT_LOCAL_H
|
||||
Reference in New Issue
Block a user