Date: Mon, 26 Dec 94 10:05:27 -0500 From: dj AT stealth DOT ctron DOT com (DJ Delorie) To: OKRA AT max DOT tiac DOT net Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: stack-trace on purpose? > Is there a way to make go32 print a stack trace on purpose? It does it > when something goes wrong, can I do it by calling some function or > other? It seems like it might be useful for letting me know how a > program got into a sticky situation. I'm pretty sure I'll never use it, > but it just occured to as something that might come in handy sometime. :) A couple of things to try: asm("int $3"); *(int *)(-1) = 0; These cause various faults that in turn cause stack dumps or debugger traps (the first one *is* a debugger trap).