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