delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/17/20:01:08

Date: Fri, 17 May 1996 19:55:19 -0400
From: Andrew Szymkowiak <aes AT solia DOT gsfc DOT nasa DOT gov>
Message-Id: <199605172355.TAA09438@solia.gsfc.nasa.gov>
To: djgpp AT delorie DOT com
Subject: Routine to print a stack trace?

   Is there a routine I can call to get a stack trace?  I want to be
able to have some documentation for unusual errors conditions, without
having to have my end-users run my codes under GDB.  (When I have
needed to do this in the past, with other compilers, I would raise an
error condition, perhaps by intentionally dividing by zero.  With the
recent thread about the stack trace for SIGFPE's only showing 
exception handling routines, I am not sure that that old technique
will always give me what I want.  And besides, I want my own message,
without the register contents.)
   I found the code that produces the list of "Call frame traceback EIPs"
(in dpmiexcp.c), but that function appears to start the trace based on
info filled into a structure by the exception handler.
   A truly deluxe version of the routine I desire would do the
equivalent of symify, too.
   Thanks,
     Andy S.

- Raw text -


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