include asan with debug builds

This commit is contained in:
2026-07-15 17:52:09 +10:00
parent c06f070921
commit f84525fa3a
2 changed files with 9 additions and 2 deletions

View File

@@ -11,13 +11,15 @@ int main() {
Instruction program[] = {
{INST_MVI, {REG_A, 0, 0}, 5, true},
{INST_MVI, {REG_B, 0, 0}, 3, true},
{INST_ADD, {REG_A, REG_B, 0}, 0, false}
{INST_ADD, {REG_A, REG_B, 0}, 0, false},
{INST_HLT, {}, 0, false}
};
memoryLoadProgram(emu->mem, program, sizeof(program)/sizeof(program[0]));
printf("%s\n", instructionToCStr(decodeInstruction(emu->mem, &emu->pc)));
printf("%s\n", instructionToCStr(decodeInstruction(emu->mem, &emu->pc)));
printf("%s\n", instructionToCStr(decodeInstruction(emu->mem, &emu->pc)));
printf("%s\n", instructionToCStr(decodeInstruction(emu->mem, &emu->pc)));
freeEmulator(emu);