March 18th, 2013, 03:00 PM
How to breakpoint/freeze an external program in cpp?
I am trying to make my own little debugger of sorts. Basically I have an address in an external program that changes 1200+ per second and gets written to by about 300 different instructions.
How can I make that entire program freeze(and unfreeze) when the value hits a certain point? To be clear, I am trying to make a third party program breakpoint/freeze WITH my c++ application when it reads a certain memory value from that third party program
By using ReadProcessMemory and a case, I am able to successfully make it detect when that memory value hits what I am looking for, and then simultaneously output a string reading the value for confirmation... though how can I make that broken breakpoint immediately upon my cpp aplication reading it?
Also, how can I figure out what instruction address wrote to that address when it hits the value I am looking for?
March 19th, 2013, 01:49 AM
if(/*condition is met*/)
std::cout << "Press Enter to continue";
std::cin.ignore(); //this will stop everything until you press enter