delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/14/21:21:04

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199605150100.AA037582029@relay1.geis.com>
Date: Wed, 15 May 96 01:02:00 UTC 0000
To: jwelty AT wdni DOT com
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: How do I get a stack trace

Reply to message 7759352    from JWELTY AT WDNI DOT C on 05/14/96 12:38PM


>Warning: I'm a djgpp newbie!

So were we all once.  :)

>While I'm able to get a stack dump after a SIGFPE, symify only
>points back to raise(), not the actual line of source code that
>generated the floating point error.  I have tried trapping the
>error and using asm("int $3") to generate a dump which still doesn't
>help.
>
>Any ideas how I can know which line of code generated the floating
>point error?

I think that you need to compile with the debugging flag (-g).  This
generates complete symbol information for debuggers like gdb,
fsdb, and symify.  Without this, all you'll get using any debugger is
function+offset.

You might also try using gdb to trap the error (by examining in detail
the variable values when the crash occurred), but make sure to run
the program in the same directory as the source code.

John

- Raw text -


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