Getting exception data

Started by
2 comments, last by chollida1 18 years, 11 months ago
You know in games and other programs how sometimes they collect data and stuff when there's an exception? How do you collect this data, like the stack, and memory?
Advertisement
In which language?

For Java their Exception class has all of the stuff.

VB.NET has them as well (i think).

C++ i think you might be able to use GetLastError or something.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                          
Looking for video game music? Check out some of my samples at http://www.youtube.c...ser/cminortunes            
                                                          
I'm currently looking to create music for a project, if you are interested e-mail me at cminortunes@gmail.com    
                                                          
Please only message me for hobby projects, I am not looking to create music for anything serious.
When an application encounters an exception, the OS will get info on the thread using the GetThreadContext() function. That includes the esp and ebp registers, and you can use ReadProcessMemory() to read the top few values off the stack.
jon robbins has released dll called bugslayer that will do this for you.

Cheers
Chris
CheersChris

This topic is closed to new replies.

Advertisement