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

01917d
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
01917d
===================================================================
01917d
--- /dev/null
01917d
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
01917d
@@ -0,0 +1,26 @@
01917d
+/* Copyright (C) 2012 Free Software Foundation, Inc.
01917d
+
01917d
+   This file is part of GDB.
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 3 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, see <http://www.gnu.org/licenses/>.  */
01917d
+
01917d
+#include <stdio.h>
01917d
+#include <stdlib.h>
01917d
+
01917d
+int
01917d
+main (int argc, char *argv[])
01917d
+{
01917d
+  printf ("Hello, World.\n");
01917d
+  abort ();
01917d
+}
01917d
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
01917d
===================================================================
01917d
--- /dev/null
01917d
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
01917d
@@ -0,0 +1,39 @@
01917d
+# Copyright 2012 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 3 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, see <http://www.gnu.org/licenses/>.
01917d
+
01917d
+set testfile "set-solib-absolute-prefix"
01917d
+set srcfile ${testfile}.c
01917d
+
01917d
+# It is necessary to verify if the binary is 32-bit, so that the system
01917d
+# call `__kernel_vsyscall' originates from vDSO.
01917d
+
01917d
+if { ![is_ilp32_target] } {
01917d
+    return -1
01917d
+}
01917d
+
01917d
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
01917d
+    return -1
01917d
+}
01917d
+
01917d
+if { ![runto_main] } {
01917d
+    return -1
01917d
+}
01917d
+
01917d
+gdb_test "continue" "Program received signal SIGABRT, Aborted.*" \
01917d
+    "continue until abort"
01917d
+gdb_test "set solib-absolute-prefix /BOGUS_DIRECT" \
01917d
+    ".*warning: Unable to find dynamic linker breakpoint function.*" \
01917d
+    "set solib-absolute-prefix"
01917d
+gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall"