delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/26/10:21:45

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).



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019