* gdb.base/call-signal-resume.exp, gdb.base/unwindonsignal.exp: Skip
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / fixsection.exp
CommitLineData
4c38e0a4 1# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
907fc202
UW
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
16if $tracelevel then {
17 strace $tracelevel
18}
19
20set prms_id 0
21set bug_id 0
22
23if {[skip_shlib_tests]} {
24 return 0
25}
26
27set testfile "fixsection"
28set srcfile ${srcdir}/${subdir}/${testfile}.c
29set binfile ${objdir}/${subdir}/${testfile}
30
31set libfile "fixsectshr"
32set libsrc ${srcdir}/${subdir}/${libfile}.c
33set lib_sl ${objdir}/${subdir}/${libfile}.sl
34
35set lib_opts [list debug nowarnings]
36set exec_opts [list debug nowarnings shlib=$lib_sl]
37
38if [get_compiler_info ${binfile}] {
39 return -1
40}
41
42if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
43 || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
44 untested "Could not compile either $libsrc or $srcfile."
45 return -1
46}
47
48# Start with a fresh gdb.
49
50gdb_exit
51gdb_start
52gdb_reinitialize_dir $srcdir/$subdir
53gdb_load ${binfile}
54gdb_load_shlibs ${lib_sl}
55
56if ![runto_main] then {
57 fail "Can't run to main"
58 return 1;
59}
60
61#
62# set breakpoint at static function static_fun
63#
64gdb_test "break static_fun" \
65 "Breakpoint.*at.* file .*${srcfile}, line.*" \
66 "breakpoint at static_fun"
67
68#
69# exit gdb
70#
71gdb_exit
This page took 0.21189 seconds and 4 git commands to generate.