Bug 10004 - gdb cannot continue after SIGFPE or SIGSEGV happen on windows
Summary: gdb cannot continue after SIGFPE or SIGSEGV happen on windows
Status: ASSIGNED
Alias: None
Product: gdb
Classification: Unclassified
Component: win32 (show other bugs)
Version: 6.8
: P2 normal
Target Milestone: ---
Assignee: Pierre Muller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 14:20 UTC by Paul Ishenin
Modified: 2014-05-29 06:51 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
compiled executable (253.25 KB, application/octet-stream)
2009-03-25 14:22 UTC, Paul Ishenin
Details
free pascal source file (239 bytes, text/pascal)
2009-03-25 14:23 UTC, Paul Ishenin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Ishenin 2009-03-25 14:20:50 UTC
I'm using free pascal compiler on windows xp to compile example application.
This is a simple program which handles division by zero (EDivByZero) exception 
and writes to the console when this happen.
Run without debugger gives next output:
Exception is handled
1

When I run it with gdb I cannot continue usual execution after SIGFPE happen.

(gdb) run
Starting program: C:\programming\mytest\debugger_exceptions/test_exception.exe
[New thread 6100.0x13e4]

Program received signal SIGFPE, Arithmetic exception.
0x00401502 in EXCEPTION1 () at test_exception.lpr:15
15          a := a div (a - 1); // EDivByZero
(gdb) continue
Continuing.

Program received signal SIGFPE, Arithmetic exception.
0x00401502 in EXCEPTION1 () at test_exception.lpr:15
15          a := a div (a - 1); // EDivByZero
(gdb) continue
Continuing.

Program exited with code 030000000224.

Ok, tried "info signals" and found that gdb handles SIGFPE. I changed behavior:

(gdb) handle SIGFPE noprint
Signal        Stop      Print   Pass to program Description
SIGFPE        No        No      Yes             Arithmetic exception
(gdb) handle SIGFPE nostop
Signal        Stop      Print   Pass to program Description
SIGFPE        No        No      Yes             Arithmetic exception
(gdb) run
Starting program: C:\programming\mytest\debugger_exceptions/test_exception.exe
[New thread 5912.0xa3c]

Program exited with code 030000000224. 

In this mail thread (http://lists.freepascal.org/lists/fpc-devel/2009-
March/016625.html) I've got a suggestion to create a bug report here.
Comment 1 Paul Ishenin 2009-03-25 14:22:39 UTC
Created attachment 3843 [details]
compiled executable
Comment 2 Paul Ishenin 2009-03-25 14:23:44 UTC
Created attachment 3844 [details]
free pascal source file
Comment 3 Pierre Muller 2009-03-27 08:51:55 UTC
This is a Microsoft bug:
please see
http://support.microsoft.com/kb/173652
Comment 4 Tom Tromey 2009-03-27 15:18:29 UTC
Unsetting target milestone.
Comment 5 Jackie Rosen 2014-02-16 18:27:41 UTC Comment hidden (spam)
Comment 6 pierre.muller 2014-05-29 06:51:49 UTC
  Hi Andreas,

  would it be also possible to completely removed
comment #5?

  Thanks in advance,

Pierre Muller

> -----Message d'origine-----
> De : schwab at sourceware dot org [mailto:sourceware-
> bugzilla@sourceware.org]
> Envoyé : mercredi 28 mai 2014 21:42
> À : muller@sourceware.org
> Objet : [Bug win32/10004] gdb cannot continue after SIGFPE or SIGSEGV
> happen on windows
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=10004
> 
> Andreas Schwab <schwab at sourceware dot org> changed:
> 
>            What    |Removed                     |Added
> -----------------------------------------------------------------------
> -----
>                  CC|jackie.rosen at hushmail dot com   |
> 
> --
> You are receiving this mail because:
> You are the assignee for the bug.