1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Rep Power

    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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Rep Power
    if(/*condition is met*/)
       std::cout << "Press Enter to continue";
       std::cin.ignore(); //this will stop everything until you press enter

IMN logo majestic logo threadwatch logo seochat tools logo