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