Blame SOURCES/gdb-6.3-ia64-sigill-20051115.patch

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