Blame SOURCES/gdb-6.3-ia64-info-frame-fix-20050725.patch

01917d
2005-07-25  Jeff Johnstno  <jjohnstn@redhat.com>
01917d
01917d
	* libunwind-frame.c (libunwind_frame_prev_register): Check valuep
01917d
	is not NULL before copying cursor address into it.
01917d
	
01917d
testsuite:
01917d
2005-07-25  Jeff Johnstno  <jjohnstn@redhat.com>
01917d
01917d
	* gdb.arch/ia64-sigtramp.exp: New test.
01917d
	* gdb.arch/ia64-sigtramp.c: Ditto.
01917d
01917d
2008-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
01917d
01917d
	Port to GDB-6.8pre.  (Only the testcase has remained.)
01917d
01917d
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix	2005-07-25 16:42:46.000000000 -0400
01917d
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c	2005-07-25 16:42:08.000000000 -0400
01917d
@@ -0,0 +1,23 @@
01917d
+#include <stdio.h>
01917d
+#include <signal.h>
01917d
+
01917d
+int *l;
01917d
+
01917d
+void x (int sig)
01917d
+{
01917d
+  printf ("in signal handler for signal %d\n", sig);
01917d
+}
01917d
+
01917d
+int main()
01917d
+{
01917d
+  int k;
01917d
+
01917d
+  signal (SIGSEGV, &x);
01917d
+
01917d
+  k = *l;
01917d
+
01917d
+  printf ("k is %d\n", k);
01917d
+ 
01917d
+  return 0;
01917d
+}
01917d
+
01917d
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix	2005-07-25 16:42:50.000000000 -0400
01917d
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp	2005-07-25 16:42:01.000000000 -0400
01917d
@@ -0,0 +1,63 @@
01917d
+#   Copyright 2005 Free Software Foundation, Inc.
01917d
+
01917d
+# This program is free software; you can redistribute it and/or modify
01917d
+# it under the terms of the GNU General Public License as published by
01917d
+# the Free Software Foundation; either version 2 of the License, or
01917d
+# (at your option) any later version.
01917d
+# 
01917d
+# This program is distributed in the hope that it will be useful,
01917d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
01917d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
01917d
+# GNU General Public License for more details.
01917d
+# 
01917d
+# You should have received a copy of the GNU General Public License
01917d
+# along with this program; if not, write to the Free Software
01917d
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
01917d
+
01917d
+# Please email any bugs, comments, and/or additions to this file to:
01917d
+# bug-gdb@prep.ai.mit.edu
01917d
+
01917d
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
01917d
+
01917d
+if ![istarget "ia64-*-*"] then {
01917d
+    return
01917d
+}
01917d
+
01917d
+set testfile "ia64-sigtramp"
01917d
+set srcfile ${testfile}.c
01917d
+set binfile ${objdir}/${subdir}/${testfile}
01917d
+
01917d
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
01917d
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
01917d
+}
01917d
+
01917d
+if [get_compiler_info ${binfile}] {
01917d
+    return -1
01917d
+}
01917d
+
01917d
+gdb_exit
01917d
+set match_max_old [match_max]
01917d
+match_max -d 1000000
01917d
+gdb_start
01917d
+match_max -d $match_max_old
01917d
+gdb_reinitialize_dir $srcdir/$subdir
01917d
+gdb_load ${binfile}
01917d
+
01917d
+if ![runto_main] then {
01917d
+    fail "Can't run to main"
01917d
+    return 0
01917d
+}
01917d
+
01917d
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
01917d
+gdb_test "next" "" "first next"
01917d
+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV"
01917d
+gdb_breakpoint "x"
01917d
+gdb_test "continue" "Breakpoint.*x.*" "continue to x"
01917d
+
01917d
+gdb_test "f 1" ".*signal handler called.*" "frame 1"
01917d
+
01917d
+# gdb-7.0+ no longer prints the pseudo registers as they are computed.
01917d
+# frame_info says: /* For moment, only display registers that were saved on the
01917d
+#                     stack.  */
01917d
+gdb_test "set debug frame 1"
01917d
+gdb_test "info frame" "Stack level 1, .*frame_unwind_register_value \\(frame=1,regnum=750\\(p63\\),\[^\r\n\]*\r\n\[^\r\n\]*-> computed bytes=.*" "info sigtramp frame"