delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/15/01:36:19

Date: Wed, 15 May 1996 08:30:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jeff Welty <jwelty AT wdni DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: How do I get a stack trace after a SIGFPE?
In-Reply-To: <199605141734.AA08152@interlock.wdni.com>
Message-Id: <Pine.SUN.3.91.960515082557.2056G-100000@is>
Mime-Version: 1.0

On Tue, 14 May 1996, Jeff Welty wrote:

> Any ideas how I can know which line of code generated the floating
> point error?

Compile with -g and run the program under GDB.  I think GDB will tell
you where did the exception happen even if you just run it (without
single-stepping or breakpoints), because GDB gets the exceptions of the
debuggee.  If I'm wrong, you'll have to single-step through the
function(s) that you suspect until you find the line that triggers the
exception. 

- Raw text -


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