git normalize all files

This commit is contained in:
Ryan Fleury
2024-07-26 11:13:47 -07:00
parent c13833f74f
commit b18e437337
162 changed files with 54806 additions and 54806 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+102 -102
View File
@@ -1,102 +1,102 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ DWARF Stringize Functions
static char dwarf_spaces[] = " ";
static void
dwarf_stringize_info(Arena *arena, String8List *out, DWARF_InfoUnit *unit, U32 indent){
String8 unit_type_string = dwarf_string_from_unit_type((DWARF_UnitType)unit->unit_type);
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces,
unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*sunit_type=%.*s\n", indent, dwarf_spaces,
str8_varg(unit_type_string));
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*sabbrev_off=0x%llx\n", indent, dwarf_spaces,
unit->abbrev_off);
switch (unit->unit_type){
case DWARF_UnitType_skeleton: case DWARF_UnitType_split_compile:
{
str8_list_pushf(arena, out, "%.*sdwo_id=%llu\n", indent, dwarf_spaces, unit->dwo_id);
}break;
case DWARF_UnitType_type: case DWARF_UnitType_split_type:
{
str8_list_pushf(arena, out, "%.*stype_signature=%llu\n", indent, dwarf_spaces,
unit->type_signature);
str8_list_pushf(arena, out, "%.*stype_offset=%llu\n", indent, dwarf_spaces,
unit->type_offset);
}break;
}
}
static void
dwarf_stringize_pubnames(Arena *arena, String8List *out, DWARF_PubNamesUnit *unit,
U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces, unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*sinfo_off=0x%llx\n", indent, dwarf_spaces, unit->info_off);
str8_list_pushf(arena, out, "%.*sinfo_length=0x%llx\n", indent, dwarf_spaces,
unit->info_length);
}
static void
dwarf_stringize_names(Arena *arena, String8List *out, DWARF_NamesUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*scomp_unit_count=%u\n", indent, dwarf_spaces,
unit->comp_unit_count);
str8_list_pushf(arena, out, "%.*slocal_type_unit_count=%u\n", indent, dwarf_spaces,
unit->local_type_unit_count);
str8_list_pushf(arena, out, "%.*sforeign_type_unit_count=%u\n", indent, dwarf_spaces,
unit->foreign_type_unit_count);
str8_list_pushf(arena, out, "%.*sbucket_count=%u\n", indent, dwarf_spaces,
unit->bucket_count);
str8_list_pushf(arena, out, "%.*sname_count=%u\n", indent, dwarf_spaces, unit->name_count);
str8_list_pushf(arena, out, "%.*sabbrev_table_size=%u\n", indent, dwarf_spaces,
unit->abbrev_table_size);
str8_list_pushf(arena, out, "%.*saugmentation_string=%.*s\n", indent, dwarf_spaces,
str8_varg(unit->augmentation_string));
}
static void
dwarf_stringize_aranges(Arena *arena, String8List *out, DWARF_ArangesUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*ssegment_selector_size=%u\n", indent, dwarf_spaces,
unit->segment_selector_size);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces, unit->offset_size);
str8_list_pushf(arena, out, "%.*sinfo_off=0x%llx\n", indent, dwarf_spaces, unit->info_off);
}
static void
dwarf_stringize_addr(Arena *arena, String8List *out, DWARF_AddrUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces,
unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->dwarf_version);
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*ssegment_selector_size=%u\n", indent, dwarf_spaces,
unit->segment_selector_size);
}
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ DWARF Stringize Functions
static char dwarf_spaces[] = " ";
static void
dwarf_stringize_info(Arena *arena, String8List *out, DWARF_InfoUnit *unit, U32 indent){
String8 unit_type_string = dwarf_string_from_unit_type((DWARF_UnitType)unit->unit_type);
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces,
unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*sunit_type=%.*s\n", indent, dwarf_spaces,
str8_varg(unit_type_string));
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*sabbrev_off=0x%llx\n", indent, dwarf_spaces,
unit->abbrev_off);
switch (unit->unit_type){
case DWARF_UnitType_skeleton: case DWARF_UnitType_split_compile:
{
str8_list_pushf(arena, out, "%.*sdwo_id=%llu\n", indent, dwarf_spaces, unit->dwo_id);
}break;
case DWARF_UnitType_type: case DWARF_UnitType_split_type:
{
str8_list_pushf(arena, out, "%.*stype_signature=%llu\n", indent, dwarf_spaces,
unit->type_signature);
str8_list_pushf(arena, out, "%.*stype_offset=%llu\n", indent, dwarf_spaces,
unit->type_offset);
}break;
}
}
static void
dwarf_stringize_pubnames(Arena *arena, String8List *out, DWARF_PubNamesUnit *unit,
U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces, unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*sinfo_off=0x%llx\n", indent, dwarf_spaces, unit->info_off);
str8_list_pushf(arena, out, "%.*sinfo_length=0x%llx\n", indent, dwarf_spaces,
unit->info_length);
}
static void
dwarf_stringize_names(Arena *arena, String8List *out, DWARF_NamesUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*scomp_unit_count=%u\n", indent, dwarf_spaces,
unit->comp_unit_count);
str8_list_pushf(arena, out, "%.*slocal_type_unit_count=%u\n", indent, dwarf_spaces,
unit->local_type_unit_count);
str8_list_pushf(arena, out, "%.*sforeign_type_unit_count=%u\n", indent, dwarf_spaces,
unit->foreign_type_unit_count);
str8_list_pushf(arena, out, "%.*sbucket_count=%u\n", indent, dwarf_spaces,
unit->bucket_count);
str8_list_pushf(arena, out, "%.*sname_count=%u\n", indent, dwarf_spaces, unit->name_count);
str8_list_pushf(arena, out, "%.*sabbrev_table_size=%u\n", indent, dwarf_spaces,
unit->abbrev_table_size);
str8_list_pushf(arena, out, "%.*saugmentation_string=%.*s\n", indent, dwarf_spaces,
str8_varg(unit->augmentation_string));
}
static void
dwarf_stringize_aranges(Arena *arena, String8List *out, DWARF_ArangesUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->version);
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*ssegment_selector_size=%u\n", indent, dwarf_spaces,
unit->segment_selector_size);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces, unit->offset_size);
str8_list_pushf(arena, out, "%.*sinfo_off=0x%llx\n", indent, dwarf_spaces, unit->info_off);
}
static void
dwarf_stringize_addr(Arena *arena, String8List *out, DWARF_AddrUnit *unit, U32 indent){
str8_list_pushf(arena, out, "%.*shdr_off=0x%llx\n", indent, dwarf_spaces, unit->hdr_off);
str8_list_pushf(arena, out, "%.*sbase_off=0x%llx\n", indent, dwarf_spaces, unit->base_off);
str8_list_pushf(arena, out, "%.*sopl_off=0x%llx\n", indent, dwarf_spaces, unit->opl_off);
str8_list_pushf(arena, out, "%.*soffset_size=%u\n", indent, dwarf_spaces,
unit->offset_size);
str8_list_pushf(arena, out, "%.*sversion=%u\n", indent, dwarf_spaces, unit->dwarf_version);
str8_list_pushf(arena, out, "%.*saddress_size=%u\n", indent, dwarf_spaces,
unit->address_size);
str8_list_pushf(arena, out, "%.*ssegment_selector_size=%u\n", indent, dwarf_spaces,
unit->segment_selector_size);
}
+28 -28
View File
@@ -1,28 +1,28 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#ifndef RDI_DWARF_STRINGIZE_H
#define RDI_DWARF_STRINGIZE_H
////////////////////////////////
//~ DWARF Stringize Functions
static void
dwarf_stringize_info(Arena *arena, String8List *out, DWARF_InfoUnit *unit, U32 indent);
static void
dwarf_stringize_pubnames(Arena *arena, String8List *out, DWARF_PubNamesUnit *unit,
U32 indent);
static void
dwarf_stringize_names(Arena *arena, String8List *out, DWARF_NamesUnit *unit, U32 indent);
static void
dwarf_stringize_aranges(Arena *arena, String8List *out, DWARF_ArangesUnit *unit, U32 indent);
static void
dwarf_stringize_addr(Arena *arena, String8List *out, DWARF_AddrUnit *unit, U32 indent);
#endif //RDI_DWARF_STRINGIZE_H
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#ifndef RDI_DWARF_STRINGIZE_H
#define RDI_DWARF_STRINGIZE_H
////////////////////////////////
//~ DWARF Stringize Functions
static void
dwarf_stringize_info(Arena *arena, String8List *out, DWARF_InfoUnit *unit, U32 indent);
static void
dwarf_stringize_pubnames(Arena *arena, String8List *out, DWARF_PubNamesUnit *unit,
U32 indent);
static void
dwarf_stringize_names(Arena *arena, String8List *out, DWARF_NamesUnit *unit, U32 indent);
static void
dwarf_stringize_aranges(Arena *arena, String8List *out, DWARF_ArangesUnit *unit, U32 indent);
static void
dwarf_stringize_addr(Arena *arena, String8List *out, DWARF_AddrUnit *unit, U32 indent);
#endif //RDI_DWARF_STRINGIZE_H
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+50 -50
View File
@@ -1,50 +1,50 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#ifndef RDI_FROM_DWARF_H
#define RDI_FROM_DWARF_H
////////////////////////////////
//~ Program Parameters Type
typedef struct DWARFCONV_Params{
String8 input_elf_name;
String8 input_elf_data;
String8 output_name;
U64 unit_idx_min;
U64 unit_idx_max;
struct{
B8 input;
} hide_errors;
B8 dump;
B8 dump__first;
B8 dump_header;
B8 dump_sections;
B8 dump_segments;
B8 dump_symtab;
B8 dump_dynsym;
B8 dump_debug_sections;
B8 dump_debug_info;
B8 dump_debug_abbrev;
B8 dump_debug_pubnames;
B8 dump_debug_pubtypes;
B8 dump_debug_names;
B8 dump_debug_aranges;
B8 dump_debug_addr;
B8 dump__last;
String8List errors;
} DWARFCONV_Params;
////////////////////////////////
//~ Program Parameters Parser
static DWARFCONV_Params *dwarf_convert_params_from_cmd_line(Arena *arena, CmdLine *cmdline);
#endif //RDI_FROM_DWARF_H
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#ifndef RDI_FROM_DWARF_H
#define RDI_FROM_DWARF_H
////////////////////////////////
//~ Program Parameters Type
typedef struct DWARFCONV_Params{
String8 input_elf_name;
String8 input_elf_data;
String8 output_name;
U64 unit_idx_min;
U64 unit_idx_max;
struct{
B8 input;
} hide_errors;
B8 dump;
B8 dump__first;
B8 dump_header;
B8 dump_sections;
B8 dump_segments;
B8 dump_symtab;
B8 dump_dynsym;
B8 dump_debug_sections;
B8 dump_debug_info;
B8 dump_debug_abbrev;
B8 dump_debug_pubnames;
B8 dump_debug_pubtypes;
B8 dump_debug_names;
B8 dump_debug_aranges;
B8 dump_debug_addr;
B8 dump__last;
String8List errors;
} DWARFCONV_Params;
////////////////////////////////
//~ Program Parameters Parser
static DWARFCONV_Params *dwarf_convert_params_from_cmd_line(Arena *arena, CmdLine *cmdline);
#endif //RDI_FROM_DWARF_H