rpms/gdb/FC-4 gdb-6.3-ia64-sigill-20051115.patch, NONE, 1.1 gdb.spec, 1.163, 1.164

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Nov 16 19:12:22 UTC 2005


Author: jjohnstn

Update of /cvs/dist/rpms/gdb/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv27724

Modified Files:
	gdb.spec 
Added Files:
	gdb-6.3-ia64-sigill-20051115.patch 
Log Message:

* Tue Nov 15 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.88
- Bump up release number.

* Tue Nov 15 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.86
- Fix ia64 user-specified SIGILL handling error.
- Bugzilla 165038.




gdb-6.3-ia64-sigill-20051115.patch:
 linux-nat.c                        |    7 +++-
 testsuite/gdb.arch/ia64-sigill.c   |    8 +++++
 testsuite/gdb.arch/ia64-sigill.exp |   59 +++++++++++++++++++++++++++++++++++++
 thread-db.c                        |    3 +
 4 files changed, 74 insertions(+), 3 deletions(-)

--- NEW FILE gdb-6.3-ia64-sigill-20051115.patch ---
2005-11-15  Jeff Johnston  <jjohnstn at redhat.com>

	* thread-db.c (thread_db_wait): Don't bother continuing if
	the wait result indicates the program terminated with a signal.
	* linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't
	throw away the event if the user has specified nostop noprint.

gdb/testsuite:

2005-11-15  Jeff Johnston  <jjohnstn at redhat.com>

	* gdb.arch/ia64-sigill.c: New test.
	* gdb.arch/ia64-sigill.exp: Ditto.

--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigill.exp.fix	2005-11-15 17:52:56.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigill.exp	2005-11-15 17:52:10.000000000 -0500
@@ -0,0 +1,59 @@
+#   Copyright 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb at prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn at redhat.com)
+
+if $tracelevel then {
+    strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+    return
+}
+
+set testfile "ia64-sigill"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Deliberately compile with pthreads, even though test is single-threaded.
+# We want to force gdb thread code to be exercised.
+if  { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+    return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We set up SIGILL nostop, noprint, pass and then run the program.
+# We expect to just see a normal run.
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
+ 
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigill.c.fix	2005-11-15 17:53:02.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigill.c	2005-11-15 17:52:05.000000000 -0500
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main()
+{
+  printf ("hello world\n");
+  return 0;
+}
+
--- gdb-6.3/gdb/thread-db.c.fix	2005-11-15 17:51:09.000000000 -0500
+++ gdb-6.3/gdb/thread-db.c	2005-11-15 17:51:50.000000000 -0500
@@ -930,7 +930,8 @@ thread_db_wait (ptid_t ptid, struct targ
        post-processing and bail out early.  */
     return ptid;
 
-  if (ourstatus->kind == TARGET_WAITKIND_EXITED)
+  if (ourstatus->kind == TARGET_WAITKIND_EXITED
+      || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
     return pid_to_ptid (-1);
 
   if (ourstatus->kind == TARGET_WAITKIND_STOPPED
--- gdb-6.3/gdb/linux-nat.c.fix	2005-11-15 17:51:14.000000000 -0500
+++ gdb-6.3/gdb/linux-nat.c	2005-11-15 17:51:46.000000000 -0500
@@ -2216,7 +2216,8 @@ retry:
      threads can be a bit time-consuming so if we want decent
      performance with heavily multi-threaded programs, especially when
      they're using a high frequency timer, we'd better avoid it if we
-     can.  */
+     can.  For possible trap signals like SIGTRAP and SIGILL, don't
+     avoid reporting.  */
 
   if (WIFSTOPPED (status))
     {
@@ -2224,7 +2225,9 @@ retry:
 
       if (signal_stop_state (signo) == 0
 	  && signal_print_state (signo) == 0
-	  && signal_pass_state (signo) == 1)
+	  && signal_pass_state (signo) == 1
+	  && signo != TARGET_SIGNAL_ILL
+	  && signo != TARGET_SIGNAL_TRAP)
 	{
 	  /* FIMXE: kettenis/2001-06-06: Should we resume all threads
 	     here?  It is not clear we should.  GDB may not expect


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/FC-4/gdb.spec,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- gdb.spec	20 Oct 2005 15:42:43 -0000	1.163
+++ gdb.spec	16 Nov 2005 19:12:18 -0000	1.164
@@ -11,7 +11,7 @@
 Version: 6.3.0.0
 
 # The release always contains a leading reserved number, start it at 0.
-Release: 1.84
+Release: 1.88
 
 License: GPL
 Group: Development/Debuggers
@@ -255,6 +255,9 @@
 # Support gdb attaching to a stopped process
 Patch168: gdb-6.3-attach-stop-20051011.patch
 
+# Fix ia64 gdb problem with user-specified SIGILL handling
+Patch169: gdb-6.3-ia64-sigill-20051115.patch
+
 %ifarch ia64
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
 %else
@@ -355,6 +358,7 @@
 %patch166 -p1
 %patch167 -p1
 %patch168 -p1
+%patch169 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -523,7 +527,14 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
-* Tue Oct 18 2005 Jeff Johnston	<jjohnstn at redhat.com>	6.3.0.0-1.84
+* Tue Nov 15 2005 Jeff Johnston	<jjohnstn at redhat.com>	6.3.0.0-1.88
+- Bump up release number.
+
+* Tue Nov 15 2005 Jeff Johnston	<jjohnstn at redhat.com>	6.3.0.0-1.86
+- Fix ia64 user-specified SIGILL handling error.
+- Bugzilla 165038.
+
+* Tue Oct 18 2005 Jeff Johnston	<jjohnstn at redhat.com>	6.3.0.0-1.85
 - Bump up release number.
 
 * Tue Oct 18 2005 Jeff Johnston	<jjohnstn at redhat.com>	6.3.0.0-1.82




More information about the fedora-cvs-commits mailing list