From 9ae253078db33ebf1bed807c5f9efbed8fafce8b Mon Sep 17 00:00:00 2001 From: xtremegamer1 Date: Tue, 1 Nov 2022 02:38:26 -0600 Subject: [PATCH] changed variable name and disabled warning --- include/vmemu_t.hpp | 2 +- src/vmemu_t.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/vmemu_t.hpp b/include/vmemu_t.hpp index a6e184a..5a72e40 100644 --- a/include/vmemu_t.hpp +++ b/include/vmemu_t.hpp @@ -26,7 +26,7 @@ class emu_t { ~emu_t(); bool init(); bool emulate(std::uint32_t vmenter_rva, vm::instrs::vrtn_t& vrtn); - static const bool s_log_instructions = false; + const bool m_log_instructions = false; private: uc_engine* uc; diff --git a/src/vmemu_t.cpp b/src/vmemu_t.cpp index fb675a1..91bb16c 100644 --- a/src/vmemu_t.cpp +++ b/src/vmemu_t.cpp @@ -2,6 +2,10 @@ #include #include +#ifdef _WIN32 +#pragma warning(disable : 4477) +#endif() + int g_new_delete_tracker; namespace vm { emu_t::emu_t(vm::vmctx_t* vm_ctx) : m_vm(vm_ctx) {}; @@ -434,7 +438,7 @@ bool emu_t::code_exec_callback(uc_engine* uc, uint64_t address, uint32_t size, } else { const auto vinstr = vm::instrs::determine(obj->cc_trace); if (vinstr.mnemonic != vm::instrs::mnemonic_t::unknown) { - if (s_log_instructions) { + if (obj->m_log_instructions) { std::printf("%p: ", obj->cc_trace.m_begin + obj->m_vm->m_image_base - obj->m_vm->m_module_base); if (vinstr.imm.has_imm) if (vinstr.mnemonic == instrs::mnemonic_t::lreg || vinstr.mnemonic == instrs::mnemonic_t::sreg)