Gerhard W. Gruber wrote:
I need some app that will produce a crash in order to test winedbg and get used to it. Does anybody have such an application or can tell me a quick way how to create one?
As a naive usr, I would think each of the lines in main of the following should do it:
#include <stdio.h> #include <assert.h> #include <signal.h> #include <stdlib.h> int main(int argc, char **argv) { int *p = 0; *p = 7; abort(); raise(SIGILL); assert(0); }
but in practice, only the bad pointer access does. For some reason, raise(), assert(0), and abort() fail to trigger the debugger.
You can compile this easily with mingw or msvc running under wine. (I did it with msvc.) - Dan