locked
Program Debug RRS feed

  • Question

  •  

    How do I compile a program to attach to another application to debug it?
    Tuesday, October 23, 2007 4:02 AM

Answers

All replies

  • These are 2 separate processes, what exactly are you trying to do ? Do you mean you want to write a debugger which attaches itself to some other process ?

    Tuesday, October 23, 2007 7:45 AM
  •  

    Yes, that's basically what I want to do.
    Wednesday, October 24, 2007 2:29 AM
  • There are Win32 Debugging APIs you can use to write your own debugger.

     

    Creating a Basic Debugger (Windows)

    Debugging a Running Process (Windows)

    Writing the Debugger's Main Loop (Windows)

     

     

    Wednesday, October 24, 2007 10:44 AM
  •  

    I guess this answers my question, but it's confusing. All I really want is it to attach to a process.
    Wednesday, October 24, 2007 2:14 PM
  • Well, attach what ? your program, isnt it ? In order to attach your program to debug another process, you need to implement a debugger.

     

    BTW Why do you want to attach ? Let us know, there might be another way to do that without writing a debugger.

     

    Wednesday, October 24, 2007 2:23 PM
  • I want to make my program attach to a gaming process such as pinball.exe, but it might be helpful if you knew that the gaming process disappears after loading therfore requiring the use of a process watcher. I was just wondering how to do that, but it looks from what your saying is that it might be hard.

    Wednesday, October 24, 2007 2:27 PM
  • So you just want to watch the process for to know when it ends ?

    Wednesday, October 24, 2007 2:31 PM
  •  

    I want to make it for memory editing. Thanks for helping me man and I have class soon by the way.

    Wednesday, October 24, 2007 2:34 PM
  • Do you know doing so is illegel, it might cause you some serious trouble.

    Wednesday, October 24, 2007 2:39 PM
  •  

    No, basically all I want to do is attach to pinball.exe and use _asm to debug it. Such as going to an address and changing it's value. Nothing I do is illegal. All I want is to attach my program that I'm creating to another already running process, is that so hard?
    Wednesday, October 24, 2007 6:37 PM
  • http://www.codeproject.com/threads/MDumpAll.asp  - To read another processes memory.

    look up the use of WriteProcessMemory for how to change the memory.
    Wednesday, October 24, 2007 9:35 PM
  •  

    Useful link, but how about in simpilar terms? I'm just intermidate not advanced programmer yet.
    Thursday, October 25, 2007 4:39 AM
  • May I ask if you are trying to write a crack for some game ?

    Thursday, October 25, 2007 7:50 AM
  • If he was writing a crack he wouldn't need a program like this...

    From the surface it just looks like a hook for cheating in a game, if it's online then it probably violates the EULA, if not there's no problem with it if he's not modifying the executable or game files..however, this is a pretty advanced thing to do really, if that code baffles you maybe you should learn a bit more first...
    Thursday, October 25, 2007 10:18 AM
  •  

    Offline, I bought it. It's not that it baffles me, but I rarely have the time to sit down and read all through it because parents don't give me much time. I'll give you a code example of what I want to do.

     

    Code Block

    00145464: // health address of game

    dd 00 // opcode

     

     

     

     

    How do I do that?
    Thursday, October 25, 2007 2:35 PM
  • If this is too complicated for you, you should either go download an editor or learn more programming before attempting this.

    It's really his choice what his plan is to do with it.  If he had asked, "how can I hack games to cheat?" in his post, it'd be a different story.
    Thursday, October 25, 2007 5:07 PM
  •  

    It's simply a trainer, nothing at all really hard. Change some values, write some ASM scripts, and done. What I need help on is how to write the code that attaches it to the process.

    Saturday, October 27, 2007 4:19 AM
  •  

    Attach to a process and change value at an address is really this complicated?
    Sunday, October 28, 2007 5:28 AM
  •  nwongfeiying wrote:

     

    Attach to a process and change value at an address is really this complicated?

    At least it is not as easy as someone can provide a complete answer/code in a single post, most articles provided by other posters are helpful, if you are short in time to learn the basic, I would make use of existing tools like cheat engine which does exactly what you are trying to achieve.

    Monday, October 29, 2007 11:46 AM
  • It’s amazing how exact to the point you are because I posted this thread with the intent to make an alternative for the cheat engine, but the cheat engine is coded in Delphi and I don’t know Delphi, only C++. All I want is to make a program similar to the cheat engine, but for a specific process. The only problem I have is that the process disappears from the process list. Are you familiar with the functions of a cheat engine?

    Tuesday, October 30, 2007 5:47 AM
  • The only problem I have is that the process disappears from the process list.

    What do you mean by disappear? How did you get the process list? Make sure the process is actually running, and use process enumeration methods to access them: Process Enumeration, Process, Module and Thread enumeration classes

    Tuesday, October 30, 2007 7:21 AM
  • It would be easier to explain if you knew some functions of the cheat engine. Are you familiar with it?

    Tuesday, October 30, 2007 8:00 PM
  •  nwongfeiying wrote:

    It would be easier to explain if you knew some functions of the cheat engine. Are you familiar with it?

    I am sorry that I could not help, it is really off-topic to discuss the functions of cheat engine here. Why not visite cheat engine web site to learn its functions.

    Wednesday, October 31, 2007 2:18 AM
  •  

    I'm trying to incorporate the functions of the cheat engine into my program such as the process attach. The engine has a unique process attacher called the "process watcher" which Tsearch doesn't have.
    Wednesday, October 31, 2007 4:42 AM