]>
Commit | Line | Data |
---|---|---|
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 | ||
16 | load_lib dwarf.exp | |
17 | ||
6b4646ce | 18 | # We run objcopy locally to split out the .dwo file. |
52c0551e | 19 | require {!is_remote host} |
6b4646ce | 20 | |
2e3cf129 | 21 | # This test can only be run on targets which support DWARF-2 and use gas. |
ce8d533e | 22 | require dwarf2_support |
2e3cf129 DE |
23 | |
24 | # This test can only be run on x86-64 targets. | |
4fe960e8 | 25 | require is_x86_64_m64_target |
2e3cf129 | 26 | |
2e3cf129 DE |
27 | standard_testfile .S |
28 | ||
61dee722 AB |
29 | set obj [standard_output_file "${testfile}.o"] |
30 | set dwo [standard_output_file "${testfile}.dwo"] | |
31 | if [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 | 38 | clean_restart $binfile |
7a218f88 | 39 | |
2e3cf129 DE |
40 | if ![runto_main] { |
41 | return -1 | |
42 | } | |
43 | ||
44 | # Do a few basic things to verify we're finding the DWO debug info. | |
45 | ||
46 | gdb_test "ptype main" "type = int \\(\\)" | |
47 | gdb_test "ptype func" "type = int \\(int\\)" | |
48 | ||
49 | gdb_test "frame" "#0 *main \\(\\) at $testfile\\.c:$decimal.*" \ | |
50 | "frame in main" | |
51 | ||
52 | gdb_test "break func" "Breakpoint.*at.* file .*$testfile\\.c, line .*" | |
53 | ||
54 | gdb_test "continue" "Breakpoint.* func \\(arg=-1\\).*" \ | |
55 | "continue to func" | |
56 | ||
57 | gdb_test "frame" "#0 *func \\(arg=-1\\) at $testfile\\.c:$decimal.*" \ | |
58 | "frame in func" |