@Pelle, what do you think about
I - Back-Trace-Log
Could be useful - but would probably need a lot of work to be fast enough. Maybe need to single-step the processor for this. I have to think some more about this...
surely, if you want to have a backtrace log into all system-dll's or even an assembler-mnemonic-level backtrace like in a real ICE ...
But in most cases it'll be sufficient, to have a function-call backtrace log for your own debug-coded functions and libraries. In this case you only have to maintain a function call table somewhere in the debuggers protected address-space, where one can look after a crash which have been the last called functions before the app crashed.
This system is implemented in a Hitachi SH8 IDDE and works great !
No big overhead, only one extra call inside every function (if it's a debug version), which evaluetes to nothing if compiled as Release.
III - debug-log (user defined debug messages, logged into a file where the time & function name.line# is stamped too )
Well, you can do it "manually". Use OutputDebugString(), and after the debugger is finished, you still have a log in the Debug tab. Use Select all and Copy from the context menu, paste into a source window, and save as a text file. See - that wasn't so difficult...? :-)
Pelle
well you're right, but think of an integrated debug-log where you provide as example the above backtrace-log too. all in one place and you can distribute your source code to other compilers too without have to mess with compiler specific stuff and macros.
Maybe you know the wxwidgets framwork - there the debuglog is a widely accepted and very well working thing for debug versions of an app.