Commit | Line | Data |
---|---|---|
ecd75fc8 | 1 | # Copyright 2003-2014 Free Software Foundation, Inc. |
8b7d96c1 MC |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
e22f8b7c | 5 | # the Free Software Foundation; either version 3 of the License, or |
8b7d96c1 | 6 | # (at your option) any later version. |
e22f8b7c | 7 | # |
8b7d96c1 MC |
8 | # This program is distributed in the hope that it will be useful, |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
e22f8b7c | 12 | # |
8b7d96c1 | 13 | # You should have received a copy of the GNU General Public License |
e22f8b7c | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
8b7d96c1 MC |
15 | |
16 | # Test for PR gdb/1056. | |
17 | # 2003-10-18 Michael Chastain <mec@shout.net> | |
18 | ||
8b7d96c1 MC |
19 | # test SIGFPE (such as division by 0) inside gdb itself |
20 | ||
8b7d96c1 MC |
21 | |
22 | gdb_start | |
23 | ||
24 | # When SIGFPE happens, the operating system may restart the | |
25 | # offending instruction after the signal handler returns, | |
26 | # rather than proceeding to the next instruction. This happens | |
27 | # on i686-pc-linux-gnu with a linux kernel. If gdb has a naive | |
28 | # signal handler that just returns, then it will restart the | |
29 | # broken instruction and gdb gets an endless stream of SIGFPE's | |
30 | # and makes no progress. | |
31 | # | |
32 | # On a broken gdb this test will just time out. | |
33 | ||
34 | gdb_test_multiple "print 1/0" "" { | |
35 | -re ".*$gdb_prompt $" { | |
36 | pass "print 1/0" | |
37 | } | |
38 | timeout { | |
39 | kfail "gdb/1056" "print 1/0" | |
40 | } | |
41 | } | |
c55a82bb PM |
42 | gdb_test "print 1U/0" ".*Division by zero.*" "Test unsigned division by zero" |
43 |