]>
Commit | Line | Data |
---|---|---|
a7de96f0 PS |
1 | Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c |
2 | =================================================================== | |
3 | --- /dev/null | |
4 | +++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c | |
5 | @@ -0,0 +1,26 @@ | |
6 | +/* Copyright (C) 2012 Free Software Foundation, Inc. | |
7 | + | |
8 | + This file is part of GDB. | |
9 | + | |
10 | + This program is free software; you can redistribute it and/or modify | |
11 | + it under the terms of the GNU General Public License as published by | |
12 | + the Free Software Foundation; either version 3 of the License, or | |
13 | + (at your option) any later version. | |
14 | + | |
15 | + This program is distributed in the hope that it will be useful, | |
16 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | + GNU General Public License for more details. | |
19 | + | |
20 | + You should have received a copy of the GNU General Public License | |
21 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
22 | + | |
23 | +#include <stdio.h> | |
24 | +#include <stdlib.h> | |
25 | + | |
26 | +int | |
27 | +main (int argc, char *argv[]) | |
28 | +{ | |
29 | + printf ("Hello, World.\n"); | |
30 | + abort (); | |
31 | +} | |
32 | Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp | |
33 | =================================================================== | |
34 | --- /dev/null | |
35 | +++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp | |
36 | @@ -0,0 +1,39 @@ | |
37 | +# Copyright 2012 Free Software Foundation, Inc. | |
38 | + | |
39 | +# This program is free software; you can redistribute it and/or modify | |
40 | +# it under the terms of the GNU General Public License as published by | |
41 | +# the Free Software Foundation; either version 3 of the License, or | |
42 | +# (at your option) any later version. | |
43 | +# | |
44 | +# This program is distributed in the hope that it will be useful, | |
45 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
46 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
47 | +# GNU General Public License for more details. | |
48 | +# | |
49 | +# You should have received a copy of the GNU General Public License | |
50 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
51 | + | |
52 | +set testfile "set-solib-absolute-prefix" | |
53 | +set srcfile ${testfile}.c | |
54 | + | |
55 | +# It is necessary to verify if the binary is 32-bit, so that the system | |
56 | +# call `__kernel_vsyscall' originates from vDSO. | |
57 | + | |
58 | +if { ![is_ilp32_target] } { | |
59 | + return -1 | |
60 | +} | |
61 | + | |
62 | +if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { | |
63 | + return -1 | |
64 | +} | |
65 | + | |
66 | +if { ![runto_main] } { | |
67 | + return -1 | |
68 | +} | |
69 | + | |
70 | +gdb_test "continue" "Program received signal SIGABRT, Aborted.*" \ | |
71 | + "continue until abort" | |
72 | +gdb_test "set solib-absolute-prefix /BOGUS_DIRECT" \ | |
73 | + ".*warning: Unable to find dynamic linker breakpoint function.*" \ | |
74 | + "set solib-absolute-prefix" | |
75 | +gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall" |