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

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