|
|
2c2fa1 |
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
* libunwind-frame.c (libunwind_frame_prev_register): Check valuep
|
|
|
2c2fa1 |
is not NULL before copying cursor address into it.
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
testsuite:
|
|
|
2c2fa1 |
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
* gdb.arch/ia64-sigtramp.exp: New test.
|
|
|
2c2fa1 |
* gdb.arch/ia64-sigtramp.c: Ditto.
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
Port to GDB-6.8pre. (Only the testcase has remained.)
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix 2005-07-25 16:42:46.000000000 -0400
|
|
|
2c2fa1 |
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c 2005-07-25 16:42:08.000000000 -0400
|
|
|
2c2fa1 |
@@ -0,0 +1,23 @@
|
|
|
2c2fa1 |
+#include <stdio.h>
|
|
|
2c2fa1 |
+#include <signal.h>
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+int *l;
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+void x (int sig)
|
|
|
2c2fa1 |
+{
|
|
|
2c2fa1 |
+ printf ("in signal handler for signal %d\n", sig);
|
|
|
2c2fa1 |
+}
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+int main()
|
|
|
2c2fa1 |
+{
|
|
|
2c2fa1 |
+ int k;
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+ signal (SIGSEGV, &x);
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+ k = *l;
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+ printf ("k is %d\n", k);
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+ return 0;
|
|
|
2c2fa1 |
+}
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix 2005-07-25 16:42:50.000000000 -0400
|
|
|
2c2fa1 |
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp 2005-07-25 16:42:01.000000000 -0400
|
|
|
2c2fa1 |
@@ -0,0 +1,63 @@
|
|
|
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-sigtramp"
|
|
|
2c2fa1 |
+set srcfile ${testfile}.c
|
|
|
2c2fa1 |
+set binfile ${objdir}/${subdir}/${testfile}
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+if { [gdb_compile "${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 |
+set match_max_old [match_max]
|
|
|
2c2fa1 |
+match_max -d 1000000
|
|
|
2c2fa1 |
+gdb_start
|
|
|
2c2fa1 |
+match_max -d $match_max_old
|
|
|
2c2fa1 |
+gdb_reinitialize_dir $srcdir/$subdir
|
|
|
2c2fa1 |
+gdb_load ${binfile}
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+if ![runto_main] then {
|
|
|
2c2fa1 |
+ fail "Can't run to main"
|
|
|
2c2fa1 |
+ return 0
|
|
|
2c2fa1 |
+}
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
|
|
|
2c2fa1 |
+gdb_test "next" "" "first next"
|
|
|
2c2fa1 |
+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV"
|
|
|
2c2fa1 |
+gdb_breakpoint "x"
|
|
|
2c2fa1 |
+gdb_test "continue" "Breakpoint.*x.*" "continue to x"
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+gdb_test "f 1" ".*signal handler called.*" "frame 1"
|
|
|
2c2fa1 |
+
|
|
|
2c2fa1 |
+# gdb-7.0+ no longer prints the pseudo registers as they are computed.
|
|
|
2c2fa1 |
+# frame_info says: /* For moment, only display registers that were saved on the
|
|
|
2c2fa1 |
+# stack. */
|
|
|
2c2fa1 |
+gdb_test "set debug frame 1"
|
|
|
2c2fa1 |
+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"
|