mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-09-24 02:00:05 +00:00
eliminate os_core, move into base; eliminate regs, move into arch abstraction layer, define x64 regs in x64 layer; move win32 backend for os core (now base) functionality to top-level win32 layer
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "lib_rdi/rdi.c"
|
||||
#include "lib_rdi/rdi_parse.c"
|
||||
#if defined(X64_H)
|
||||
# include "rdi/x64/rdi_x64.c"
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Enum <=> Base Enum
|
||||
@@ -20,6 +23,22 @@ arch_from_rdi_arch(RDI_Arch arch)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal RDI_Arch
|
||||
rdi_arch_from_arch(Arch arch)
|
||||
{
|
||||
RDI_Arch result = RDI_Arch_NULL;
|
||||
switch(arch)
|
||||
{
|
||||
case Arch_COUNT:
|
||||
case Arch_Null:{}break;
|
||||
case Arch_x86:{result = RDI_Arch_X86;}break;
|
||||
case Arch_x64:{result = RDI_Arch_X64;}break;
|
||||
case Arch_arm64:{}break;
|
||||
case Arch_arm32:{}break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Lookup Helpers
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
#include "lib_rdi/rdi.h"
|
||||
#include "lib_rdi/rdi_parse.h"
|
||||
#if defined(X64_H)
|
||||
# include "rdi/x64/rdi_x64.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: RDI Dumping Flags
|
||||
@@ -70,6 +73,7 @@ read_only global String8 rdi_name_title_from_dump_subset_table[] =
|
||||
//~ rjf: RDI Enum <=> Base Enum
|
||||
|
||||
internal Arch arch_from_rdi_arch(RDI_Arch arch);
|
||||
internal RDI_Arch rdi_arch_from_arch(Arch arch);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Lookup Helpers
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
U8 rdi_reg_code_from_x64_table[189] =
|
||||
{
|
||||
RDI_RegCodeX64_nil,
|
||||
RDI_RegCodeX64_rax,
|
||||
RDI_RegCodeX64_rcx,
|
||||
RDI_RegCodeX64_rdx,
|
||||
RDI_RegCodeX64_rbx,
|
||||
RDI_RegCodeX64_rsp,
|
||||
RDI_RegCodeX64_rbp,
|
||||
RDI_RegCodeX64_rsi,
|
||||
RDI_RegCodeX64_rdi,
|
||||
RDI_RegCodeX64_r8,
|
||||
RDI_RegCodeX64_r9,
|
||||
RDI_RegCodeX64_r10,
|
||||
RDI_RegCodeX64_r11,
|
||||
RDI_RegCodeX64_r12,
|
||||
RDI_RegCodeX64_r13,
|
||||
RDI_RegCodeX64_r14,
|
||||
RDI_RegCodeX64_r15,
|
||||
RDI_RegCodeX64_fsbase,
|
||||
RDI_RegCodeX64_gsbase,
|
||||
RDI_RegCodeX64_rip,
|
||||
RDI_RegCodeX64_rflags,
|
||||
RDI_RegCodeX64_dr0,
|
||||
RDI_RegCodeX64_dr1,
|
||||
RDI_RegCodeX64_dr2,
|
||||
RDI_RegCodeX64_dr3,
|
||||
RDI_RegCodeX64_dr4,
|
||||
RDI_RegCodeX64_dr5,
|
||||
RDI_RegCodeX64_dr6,
|
||||
RDI_RegCodeX64_dr7,
|
||||
RDI_RegCodeX64_st0,
|
||||
RDI_RegCodeX64_st1,
|
||||
RDI_RegCodeX64_st2,
|
||||
RDI_RegCodeX64_st3,
|
||||
RDI_RegCodeX64_st4,
|
||||
RDI_RegCodeX64_st5,
|
||||
RDI_RegCodeX64_st6,
|
||||
RDI_RegCodeX64_st7,
|
||||
RDI_RegCodeX64_fcw,
|
||||
RDI_RegCodeX64_fsw,
|
||||
RDI_RegCodeX64_ftw,
|
||||
RDI_RegCodeX64_fop,
|
||||
RDI_RegCodeX64_fcs,
|
||||
RDI_RegCodeX64_fds,
|
||||
RDI_RegCodeX64_fip,
|
||||
RDI_RegCodeX64_fdp,
|
||||
RDI_RegCodeX64_mxcsr,
|
||||
RDI_RegCodeX64_mxcsr_mask,
|
||||
RDI_RegCodeX64_ss,
|
||||
RDI_RegCodeX64_cs,
|
||||
RDI_RegCodeX64_ds,
|
||||
RDI_RegCodeX64_es,
|
||||
RDI_RegCodeX64_fs,
|
||||
RDI_RegCodeX64_gs,
|
||||
RDI_RegCodeX64_zmm0,
|
||||
RDI_RegCodeX64_zmm1,
|
||||
RDI_RegCodeX64_zmm2,
|
||||
RDI_RegCodeX64_zmm3,
|
||||
RDI_RegCodeX64_zmm4,
|
||||
RDI_RegCodeX64_zmm5,
|
||||
RDI_RegCodeX64_zmm6,
|
||||
RDI_RegCodeX64_zmm7,
|
||||
RDI_RegCodeX64_zmm8,
|
||||
RDI_RegCodeX64_zmm9,
|
||||
RDI_RegCodeX64_zmm10,
|
||||
RDI_RegCodeX64_zmm11,
|
||||
RDI_RegCodeX64_zmm12,
|
||||
RDI_RegCodeX64_zmm13,
|
||||
RDI_RegCodeX64_zmm14,
|
||||
RDI_RegCodeX64_zmm15,
|
||||
RDI_RegCodeX64_zmm16,
|
||||
RDI_RegCodeX64_zmm17,
|
||||
RDI_RegCodeX64_zmm18,
|
||||
RDI_RegCodeX64_zmm19,
|
||||
RDI_RegCodeX64_zmm20,
|
||||
RDI_RegCodeX64_zmm21,
|
||||
RDI_RegCodeX64_zmm22,
|
||||
RDI_RegCodeX64_zmm23,
|
||||
RDI_RegCodeX64_zmm24,
|
||||
RDI_RegCodeX64_zmm25,
|
||||
RDI_RegCodeX64_zmm26,
|
||||
RDI_RegCodeX64_zmm27,
|
||||
RDI_RegCodeX64_zmm28,
|
||||
RDI_RegCodeX64_zmm29,
|
||||
RDI_RegCodeX64_zmm30,
|
||||
RDI_RegCodeX64_zmm31,
|
||||
RDI_RegCodeX64_k0,
|
||||
RDI_RegCodeX64_k1,
|
||||
RDI_RegCodeX64_k2,
|
||||
RDI_RegCodeX64_k3,
|
||||
RDI_RegCodeX64_k4,
|
||||
RDI_RegCodeX64_k5,
|
||||
RDI_RegCodeX64_k6,
|
||||
RDI_RegCodeX64_k7,
|
||||
RDI_RegCodeX64_cetmsr,
|
||||
RDI_RegCodeX64_cetssp,
|
||||
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,
|
||||
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,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
C_LINKAGE_END
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
//- GENERATED CODE
|
||||
|
||||
#ifndef RDI_X64_META_H
|
||||
#define RDI_X64_META_H
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
extern U8 rdi_reg_code_from_x64_table[189];
|
||||
|
||||
C_LINKAGE_END
|
||||
|
||||
#endif // RDI_X64_META_H
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#include "rdi/x64/generated/rdi_x64.meta.c"
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef RDI_X64_H
|
||||
#define RDI_X64_H
|
||||
|
||||
#include "rdi/x64/generated/rdi_x64.meta.h"
|
||||
|
||||
#endif // RDI_X64_H
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
@data(U8) rdi_reg_code_from_x64_table:
|
||||
{
|
||||
@expand(X64_RegTable a) `$(a.has_rdi == 'x' -> "RDI_RegCodeX64_" .. a.name)$(a.has_rdi != 'x' -> 0)`
|
||||
}
|
||||
Reference in New Issue
Block a user