]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.dwarf2/fission-base.exp
gdb/doc: don't have .pod targets separate to man page targets
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / fission-base.exp
CommitLineData
1d506c26 1# Copyright 2012-2024 Free Software Foundation, Inc.
2e3cf129
DE
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
16load_lib dwarf.exp
17
6b4646ce 18# We run objcopy locally to split out the .dwo file.
52c0551e 19require {!is_remote host}
6b4646ce 20
2e3cf129 21# This test can only be run on targets which support DWARF-2 and use gas.
ce8d533e 22require dwarf2_support
2e3cf129
DE
23
24# This test can only be run on x86-64 targets.
4fe960e8 25require is_x86_64_m64_target
2e3cf129 26
2e3cf129
DE
27standard_testfile .S
28
61dee722
AB
29set obj [standard_output_file "${testfile}.o"]
30set dwo [standard_output_file "${testfile}.dwo"]
31if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
32 [list $srcfile \
250e8e0d 33 [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
61dee722 34 $obj]] {
2e3cf129
DE
35 return -1
36}
37
c39c8637 38clean_restart $binfile
7a218f88 39
2e3cf129
DE
40if ![runto_main] {
41 return -1
42}
43
44# Do a few basic things to verify we're finding the DWO debug info.
45
46gdb_test "ptype main" "type = int \\(\\)"
47gdb_test "ptype func" "type = int \\(int\\)"
48
49gdb_test "frame" "#0 *main \\(\\) at $testfile\\.c:$decimal.*" \
50 "frame in main"
51
52gdb_test "break func" "Breakpoint.*at.* file .*$testfile\\.c, line .*"
53
54gdb_test "continue" "Breakpoint.* func \\(arg=-1\\).*" \
55 "continue to func"
56
57gdb_test "frame" "#0 *func \\(arg=-1\\) at $testfile\\.c:$decimal.*" \
58 "frame in func"