GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / vdso-warning.exp
1 # Copyright 2012-2016 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 standard_testfile
17
18 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
19 return -1
20 }
21
22 gdb_breakpoint "main"
23
24 # At least some versions of Fedora/RHEL glibc have local patches that
25 # hide the vDSO. This lines re-exposes it. See PR libc/13097,
26 # comment 2. There's no support for passing environment variables in
27 # the remote protocol, but that's OK -- if we're testing against a
28 # glibc that doesn't list the vDSO without this, the test should still
29 # pass.
30 gdb_test_no_output "set environment LD_DEBUG=unused"
31
32 gdb_run_cmd
33
34 set test "stop without warning"
35 gdb_test_multiple "" $test {
36 -re "Could not load shared library symbols .*\r\n$gdb_prompt $" {
37 fail $test
38 }
39 -re "\r\nBreakpoint \[0-9\]+, main .*\r\n$gdb_prompt $" {
40 pass $test
41 }
42 }
43
44 # Extra testing in case the warning changes and we miss updating the
45 # above.
46 set test "no vdso without symbols is listed"
47 gdb_test_multiple "info shared" $test {
48 -re "No\[^\r\n\]+linux-(vdso|gate).*$gdb_prompt $" {
49 fail $test
50 }
51 -re "$gdb_prompt $" {
52 pass $test
53 }
54 }
This page took 0.046373 seconds and 4 git commands to generate.