d2r2: hook up scope containers to contained types / namespaces; fix address table parsing

This commit is contained in:
Ryan Fleury
2026-05-05 09:42:55 -07:00
parent aee299efe7
commit fb04768002
6 changed files with 170 additions and 34 deletions
+9 -4
View File
@@ -281,10 +281,15 @@ e_interpret(String8 bytecode)
U8 byte_size = (imm.u64&0x00FF00)>>8;
U8 byte_off = (imm.u64&0xFF0000)>>16;
REGS_RegCode base_reg_code = regs_reg_code_from_arch_rdi_code(e_interpret_ctx->reg_arch, rdi_reg_code);
REGS_Rng rng = regs_reg_code_rng_table_from_arch(e_interpret_ctx->reg_arch)[base_reg_code];
U64 off = (U64)rng.byte_off + byte_off;
U64 size = (U64)byte_size;
B32 good_read = e_space_read(e_interpret_ctx->reg_space, &nval, r1u64(off, off+size));
REGS_Rng *rng_table = regs_reg_code_rng_table_from_arch(e_interpret_ctx->reg_arch);
B32 good_read = 0;
if(0 <= rdi_reg_code && rdi_reg_code < regs_reg_code_count_from_arch(e_interpret_ctx->reg_arch))
{
REGS_Rng rng = rng_table[base_reg_code];
U64 off = (U64)rng.byte_off + byte_off;
U64 size = (U64)byte_size;
good_read = e_space_read(e_interpret_ctx->reg_space, &nval, r1u64(off, off+size));
}
if(!good_read)
{
result.code = E_InterpretationCode_BadRegRead;