Flag: Tornado! Hurricane!

Error: You must be logged in to access the printer friendly view.

OpenRCE IDA SDK >> invalidate_dbgmem_contents

invalidate_dbgmem_contents
Category: Debugging

idaman void ida_export
invalidate_dbgmem_contents(ea_t ea, asize_t size)
Invalidate size bytes of memory, starting at ea. If you want to invalidate the whole of a processes memory, set ea to BADADDR and size to 0.

Invalidating memory contents is essentially flushing the IDA kernel's memory cache for a process, which ensures you are accessing the latest memory contents from a processes memory. You should call this function after a process is suspended, or if you suspect the memory contents have changed.

Examples:
#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);


Related: attach_process, continue_process, detach_process, exit_process, get_process_info, get_process_qty, get_process_state, get_reg_val, get_thread_qty, invalidate_dbgmem_config, invalidate_dbgmem_contents, run_requests, run_to, set_reg_val, start_process, step_into, step_over, step_until_ret, suspend_process

Note: You must be logged in to add notes to the IDA SDK reference manual.
Active in Last 5 Minutes
waleedassar

There are 28,229 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit