Blame SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch

e1d87d
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
e1d87d
===================================================================
e1d87d
--- /dev/null
e1d87d
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
e1d87d
@@ -0,0 +1,26 @@
e1d87d
+/* Copyright (C) 2012 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+   This file is part of GDB.
e1d87d
+
e1d87d
+   This program is free software; you can redistribute it and/or modify
e1d87d
+   it under the terms of the GNU General Public License as published by
e1d87d
+   the Free Software Foundation; either version 3 of the License, or
e1d87d
+   (at your option) any later version.
e1d87d
+
e1d87d
+   This program is distributed in the hope that it will be useful,
e1d87d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+   GNU General Public License for more details.
e1d87d
+
e1d87d
+   You should have received a copy of the GNU General Public License
e1d87d
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
e1d87d
+
e1d87d
+#include <stdio.h>
e1d87d
+#include <stdlib.h>
e1d87d
+
e1d87d
+int
e1d87d
+main (int argc, char *argv[])
e1d87d
+{
e1d87d
+  printf ("Hello, World.\n");
e1d87d
+  abort ();
e1d87d
+}
e1d87d
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
e1d87d
===================================================================
e1d87d
--- /dev/null
e1d87d
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
e1d87d
@@ -0,0 +1,39 @@
e1d87d
+# Copyright 2012 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+# This program is free software; you can redistribute it and/or modify
e1d87d
+# it under the terms of the GNU General Public License as published by
e1d87d
+# the Free Software Foundation; either version 3 of the License, or
e1d87d
+# (at your option) any later version.
e1d87d
+#
e1d87d
+# This program is distributed in the hope that it will be useful,
e1d87d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+# GNU General Public License for more details.
e1d87d
+#
e1d87d
+# You should have received a copy of the GNU General Public License
e1d87d
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
e1d87d
+
e1d87d
+set testfile "set-solib-absolute-prefix"
e1d87d
+set srcfile ${testfile}.c
e1d87d
+
e1d87d
+# It is necessary to verify if the binary is 32-bit, so that the system
e1d87d
+# call `__kernel_vsyscall' originates from vDSO.
e1d87d
+
e1d87d
+if { ![is_ilp32_target] } {
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+if { ![runto_main] } {
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+gdb_test "continue" "Program received signal SIGABRT, Aborted.*" \
e1d87d
+    "continue until abort"
e1d87d
+gdb_test "set solib-absolute-prefix /BOGUS_DIRECT" \
e1d87d
+    ".*warning: Unable to find dynamic linker breakpoint function.*" \
e1d87d
+    "set solib-absolute-prefix"
e1d87d
+gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall"