Count executed instructions

This commit is contained in:
momo5502
2024-09-08 15:18:57 +02:00
parent 4d0d197376
commit 9c5b65b103
2 changed files with 7 additions and 5 deletions

View File

@@ -742,11 +742,11 @@ namespace
const emulator_object<machine_frame> machine_frame_obj{emu, new_sp + combined_size};
machine_frame_obj.access([&](machine_frame& frame)
{
frame.rip = pointers.ContextRecord->Rip;
frame.rsp = pointers.ContextRecord->Rsp;
frame.ss = pointers.ContextRecord->SegSs;
frame.cs = pointers.ContextRecord->SegCs;
frame.eflags = pointers.ContextRecord->EFlags;
frame.rip = pointers.ContextRecord->Rip;
frame.rsp = pointers.ContextRecord->Rsp;
frame.ss = pointers.ContextRecord->SegSs;
frame.cs = pointers.ContextRecord->SegCs;
frame.eflags = pointers.ContextRecord->EFlags;
});
printf("ContextRecord: %llX\n", context_record_obj.value());
@@ -850,6 +850,7 @@ namespace
*/
emu->hook_memory_execution(0, std::numeric_limits<size_t>::max(), [&](const uint64_t address, const size_t)
{
++context.executed_instructions;
if (!context.verbose)
{
return;