1 2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
3 * linux-thread-db.c (thread_db_wait): Don't bother continuing if
4 the wait result indicates the program terminated with a signal.
5 * linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't
6 throw away the event if the user has specified nostop noprint.
10 2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
12 * gdb.arch/ia64-sigill.c: New test.
13 * gdb.arch/ia64-sigill.exp: Ditto.
15 Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp
16 ===================================================================
17 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
18 +++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-07-22 19:16:13.000000000 +0200
20 +# Copyright 2005 Free Software Foundation, Inc.
22 +# This program is free software; you can redistribute it and/or modify
23 +# it under the terms of the GNU General Public License as published by
24 +# the Free Software Foundation; either version 2 of the License, or
25 +# (at your option) any later version.
27 +# This program is distributed in the hope that it will be useful,
28 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
29 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 +# GNU General Public License for more details.
32 +# You should have received a copy of the GNU General Public License
33 +# along with this program; if not, write to the Free Software
34 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 +# Please email any bugs, comments, and/or additions to this file to:
37 +# bug-gdb@prep.ai.mit.edu
39 +# This file was written by Jeff Johnston (jjohnstn@redhat.com)
41 +if ![istarget "ia64-*-*"] then {
45 +set testfile "ia64-sigill"
46 +set srcfile ${testfile}.c
47 +set binfile ${objdir}/${subdir}/${testfile}
49 +# Deliberately compile with pthreads, even though test is single-threaded.
50 +# We want to force gdb thread code to be exercised.
51 +if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
52 + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
55 +if [get_compiler_info ${binfile}] {
61 +gdb_reinitialize_dir $srcdir/$subdir
64 +# We set up SIGILL nostop, noprint, pass and then run the program.
65 +# We expect to just see a normal run.
66 +gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
67 +gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
69 Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c
70 ===================================================================
71 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
72 +++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-07-22 19:16:13.000000000 +0200
78 + printf ("hello world\n");
82 Index: gdb-7.3.50.20110722/gdb/linux-nat.c
83 ===================================================================
84 --- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:15:05.000000000 +0200
85 +++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:16:13.000000000 +0200
86 @@ -3733,7 +3733,8 @@ retry:
87 threads can be a bit time-consuming so if we want decent
88 performance with heavily multi-threaded programs, especially when
89 they're using a high frequency timer, we'd better avoid it if we
91 + can. For possible trap signals like SIGTRAP and SIGILL, don't
94 if (WIFSTOPPED (status))