Adv: How does e.g. Dr Watson hook into an exception
-
Hello fellow programmers, I was wondering how a program like Dr.Watson is hooked into the exception handling mechanism. This question actually has a background: For my next project, they've asked me to do some bug-hunting in a HUGE (multi threaded) service process (netto > 1 mil. lines of code over 10.000 files). This peace of code (telecommunication related) has been ported from embedded system, and NO active usage of structured exception handling is used (more C than C++ oriented). The problem is that in some situations an exception occures, and we want to be able to produce *any* possible kind of info. But since the Windows NT exception handling mechanism is taking over everything, no way of getting some runtime-info. And also: it is a service process, so no interface to user exists. My idea was to implement a kind of 'general exception handling' function within our application, dumping possible information to a file. Other suggestions are also welcome, or links to site/topics regarding this topic. Cheers, EiSl
-
Hello fellow programmers, I was wondering how a program like Dr.Watson is hooked into the exception handling mechanism. This question actually has a background: For my next project, they've asked me to do some bug-hunting in a HUGE (multi threaded) service process (netto > 1 mil. lines of code over 10.000 files). This peace of code (telecommunication related) has been ported from embedded system, and NO active usage of structured exception handling is used (more C than C++ oriented). The problem is that in some situations an exception occures, and we want to be able to produce *any* possible kind of info. But since the Windows NT exception handling mechanism is taking over everything, no way of getting some runtime-info. And also: it is a service process, so no interface to user exists. My idea was to implement a kind of 'general exception handling' function within our application, dumping possible information to a file. Other suggestions are also welcome, or links to site/topics regarding this topic. Cheers, EiSl
Buy John Robbins Debugging Applications (Microsoft Press). I've read it once, so I know it covers everything you want to know and more, but I've not had enough time to read it often enough to actually answer the question without looking it up. I doubt I could do it justice in any case, you need this book. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
-
Hello fellow programmers, I was wondering how a program like Dr.Watson is hooked into the exception handling mechanism. This question actually has a background: For my next project, they've asked me to do some bug-hunting in a HUGE (multi threaded) service process (netto > 1 mil. lines of code over 10.000 files). This peace of code (telecommunication related) has been ported from embedded system, and NO active usage of structured exception handling is used (more C than C++ oriented). The problem is that in some situations an exception occures, and we want to be able to produce *any* possible kind of info. But since the Windows NT exception handling mechanism is taking over everything, no way of getting some runtime-info. And also: it is a service process, so no interface to user exists. My idea was to implement a kind of 'general exception handling' function within our application, dumping possible information to a file. Other suggestions are also welcome, or links to site/topics regarding this topic. Cheers, EiSl
> I was wondering how a program like Dr.Watson > is hooked into the exception handling mechanism. It's actually a debugger. I suggest reading April 1997 issue of MSJ; there's a column titled 'Under The Hood' by Matt Pietrek. The article presents a way to set the default exception filter per-thread basis. It should be in your VC++ help (look in the 'Periodicals' section), if it's not there, go to MSDN Online. Tomasz Sowinski -- http://www.shooltz.com