mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-03 04:28:12 +00:00
added printer for .res files
This commit is contained in:
@@ -214,6 +214,35 @@ coff_string_from_section_flags(Arena *arena, COFF_SectionFlags flags)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
coff_string_from_resource_memory_flags(Arena *arena, COFF_ResourceMemoryFlags flags)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
|
||||
String8List list = {0};
|
||||
|
||||
if (flags & COFF_ResourceMemoryFlag_Moveable) {
|
||||
flags &= COFF_ResourceMemoryFlag_Moveable;
|
||||
str8_list_pushf(scratch.arena, &list, "Moveable");
|
||||
}
|
||||
if (flags & COFF_ResourceMemoryFlag_Pure) {
|
||||
flags &= COFF_ResourceMemoryFlag_Pure;
|
||||
str8_list_pushf(scratch.arena, &list, "Pure");
|
||||
}
|
||||
if (flags & COFF_ResourceMemoryFlag_Discardable) {
|
||||
flags &= COFF_ResourceMemoryFlag_Discardable;
|
||||
str8_list_pushf(scratch.arena, &list, "Discardable");
|
||||
}
|
||||
if (flags != 0) {
|
||||
str8_list_pushf(scratch.arena, &list, "%#x", flags);
|
||||
}
|
||||
|
||||
String8 result = str8_list_join(arena, &list, &(StringJoin){.sep=str8_lit(", ")});
|
||||
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
coff_string_from_import_header_type(COFF_ImportType type)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ internal String8 coff_string_from_comdat_select_type(COFF_ComdatSelectType type)
|
||||
internal String8 coff_string_from_machine_type(COFF_MachineType machine);
|
||||
internal String8 coff_string_from_flags(Arena *arena, COFF_FileHeaderFlags flags);
|
||||
internal String8 coff_string_from_section_flags(Arena *arena, COFF_SectionFlags flags);
|
||||
internal String8 coff_string_from_resource_memory_flags(Arena *arena, COFF_ResourceMemoryFlags flags);
|
||||
internal String8 coff_string_from_import_header_type(COFF_ImportType type);
|
||||
internal String8 coff_string_from_sym_dtype(COFF_SymDType x);
|
||||
internal String8 coff_string_from_sym_type(COFF_SymType x);
|
||||
|
||||
Reference in New Issue
Block a user