Jump to content
  • Advertisement
Sign in to follow this  
webwraith

of EXternal EXecutables

This topic is 4513 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've recently been frequenting the BONA FIDE site,idly flicking through their tutorials and whatnot, when I realised they didn't have a single piece on the opening of other programs from within your own. I know this might seem like an odd place to put this, but I think it could be relevant here, as well, as two cases come to mind of one program opening another; 1. Debuggers 2. Editors( I'm thinking UnrealEd here, but I bet others do it as well) The only problem is that I'm completely clueless as to how it's supposed to be done, and my level of experience in C++ isn't great enough to try this on my own (I'd probably end up with at least 200 partitions of about 1MB each...) Can anyone shine a light on this problem for me?

Share this post


Link to post
Share on other sites
Advertisement
Debuggers don't "open" your program. Most processors have 'breakpoint registers', you write an address in this register and when the CPU reaches that address it generates an interrupt.

A debugger installs an interrupt service routine for the breakpoint interrupt (sort of, sometimes it has to be done indirectly through the OS), puts the address to break at into the breakpoint register (usually it derives the address to break at from where you set a breakpoint in your source code), and asks the OS to run the program just as if you had run it yourself. The CPU hits the address that matches the address in the breakpoint register, generates the interrupt, which the debugger's ISR catches, and the debugger gets notified and in turn shows you the code with a neat little arrow pointing to where execution stopped (if you have a debugger with a GUI that is). If you compiled your code in debug mode, the debugger knows which source file(s) go with your program and can show you roughly where the processor stopped, if you don't compile your code in debug mode the best it can do is show you assembly code and exactly where the processor stopped.

On a side note, this is why you don't have to recompile your code when you set/remove breakpoints, the code isn't affected.

I haven't used UnrealEd so I can't comment on that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!