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

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