Skip to content

Commit

Permalink
Add more disassembly info during triple faults
Browse files Browse the repository at this point in the history
  • Loading branch information
chp-io committed Feb 22, 2024
1 parent 8c710ea commit b620f98
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vmm/src/hve/arch/intel_x64/vcpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,14 @@ bool vcpu::debug_triple_fault(::bfvmm::intel_x64::vcpu *vcpu)
auto mode = vcpu_cast(vcpu)->insn_mode();
auto insn = disasm()->disasm_single(map.get(), rip, len, mode);

printv("%s: %s %s\n", __func__, insn->mnemonic, insn->op_str);
printv("%s: ", __func__);
printf("%2"PRIx64" ", insn.address);
for (int i = 0; i < insn.size; i++) {
if (i > 0)
putchar(' ');
printf("%02x", insn.bytes[i]);
}
printf(" %s %s\n", insn->mnemonic, insn->op_str);

vcpu->halt("debugging triple fault");

Expand Down

0 comments on commit b620f98

Please sign in to comment.