#include <dbg.hpp> #include <bytes.hpp> // Process must be suspended for this to work // Get the address stored in the ESP register regval_t esp; get_reg_val("ESP", &esp); // Get the value at the address stored in the ESP reg. uchar before = get_byte(esp.ival); // Invalidate memory contents invalidate_dbgmem_contents(BADADDR, 0); // Re-fetch contents of the address stored in ESP uchar after = get_byte(esp.ival); msg("%08a: Before: %a, After: %a\n", esp.ival, before, after);