Hi,
Sometimes I need to work on code that dynamically unpacks itself to VirtualAlloc'd memory and I can't find any way to keep the database of breakpoints, labels, etc in sync, nor can I reliably force the OS to map the allocated memory to a repeatable address. So every time I restart the debugging session my database is invalidated.
First of all if anybody has tips for working around this problem I would love to hear them. The best I've been able to do so far is debug in a virtual machine so I can export my database, rewind the VM to an earlier point, then re-import the database. It works but it's tedious and wasteful.
I've been thinking it would be really useful to be able to rebase address ranges of the database once I know the allocation. Something like "rebasedb oldbase, newbase" and it would infer the size from the current allocation. Then all the breakpoints, labels, comments, etc. would be usable again without resorting to a VM.
Is this a sane idea? Is it best done with a plugin and do plugins have API for iterating over database items?