mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
pass over COFF layer
- updated naming convention on structs, enums, and macros to conform with code base style - moved related structs closer to each other - moved parser code to separate file
This commit is contained in:
+27
-27
@@ -5,31 +5,31 @@ internal RDI_Arch
|
||||
rdi_arch_from_coff_machine(COFF_MachineType machine)
|
||||
{
|
||||
switch (machine) {
|
||||
case COFF_MachineType_X86: return RDI_Arch_X86;
|
||||
case COFF_MachineType_X64: return RDI_Arch_X64;
|
||||
case COFF_Machine_X86: return RDI_Arch_X86;
|
||||
case COFF_Machine_X64: return RDI_Arch_X64;
|
||||
|
||||
case COFF_MachineType_UNKNOWN:
|
||||
case COFF_MachineType_AM33:
|
||||
case COFF_MachineType_ARM:
|
||||
case COFF_MachineType_ARM64:
|
||||
case COFF_MachineType_ARMNT:
|
||||
case COFF_MachineType_EBC:
|
||||
case COFF_MachineType_IA64:
|
||||
case COFF_MachineType_M32R:
|
||||
case COFF_MachineType_MIPS16:
|
||||
case COFF_MachineType_MIPSFPU:
|
||||
case COFF_MachineType_MIPSFPU16:
|
||||
case COFF_MachineType_POWERPC:
|
||||
case COFF_MachineType_POWERPCFP:
|
||||
case COFF_MachineType_R4000:
|
||||
case COFF_MachineType_RISCV32:
|
||||
case COFF_MachineType_RISCV64:
|
||||
case COFF_MachineType_SH3:
|
||||
case COFF_MachineType_SH3DSP:
|
||||
case COFF_MachineType_SH4:
|
||||
case COFF_MachineType_SH5:
|
||||
case COFF_MachineType_THUMB:
|
||||
case COFF_MachineType_WCEMIPSV2:
|
||||
case COFF_Machine_Unknown:
|
||||
case COFF_Machine_Am33:
|
||||
case COFF_Machine_Arm:
|
||||
case COFF_Machine_Arm64:
|
||||
case COFF_Machine_ArmNt:
|
||||
case COFF_Machine_Ebc:
|
||||
case COFF_Machine_Ia64:
|
||||
case COFF_Machine_M32R:
|
||||
case COFF_Machine_Mips16:
|
||||
case COFF_Machine_MipsFpu:
|
||||
case COFF_Machine_MipsFpu16:
|
||||
case COFF_Machine_PowerPc:
|
||||
case COFF_Machine_PowerPcFp:
|
||||
case COFF_Machine_R4000:
|
||||
case COFF_Machine_RiscV32:
|
||||
case COFF_Machine_RiscV64:
|
||||
case COFF_Machine_Sh3:
|
||||
case COFF_Machine_Sh3Dsp:
|
||||
case COFF_Machine_Sh4:
|
||||
case COFF_Machine_Sh5:
|
||||
case COFF_Machine_Thumb:
|
||||
case COFF_Machine_WceMipsV2:
|
||||
NotImplemented;
|
||||
default:
|
||||
return RDI_Arch_NULL;
|
||||
@@ -40,13 +40,13 @@ internal RDI_BinarySectionFlags
|
||||
rdi_binary_section_flags_from_coff_section_flags(COFF_SectionFlags flags)
|
||||
{
|
||||
RDI_BinarySectionFlags result = 0;
|
||||
if (flags & COFF_SectionFlag_MEM_READ) {
|
||||
if (flags & COFF_SectionFlag_MemRead) {
|
||||
result |= RDI_BinarySectionFlag_Read;
|
||||
}
|
||||
if (flags & COFF_SectionFlag_MEM_WRITE) {
|
||||
if (flags & COFF_SectionFlag_MemWrite) {
|
||||
result |= RDI_BinarySectionFlag_Write;
|
||||
}
|
||||
if (flags & COFF_SectionFlag_MEM_EXECUTE) {
|
||||
if (flags & COFF_SectionFlag_MemExecute) {
|
||||
result |= RDI_BinarySectionFlag_Execute;
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user