Add translations for various sub-directories
[binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw5-rnglist-test.exp
bloba7ca334869ffe5fe5b2cb71452ba35787380d15d
1 # Copyright 2020-2024 Free Software Foundation, Inc.
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.
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.
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/>.
16 # Check that GDB can find the variables in a lexical block with a
17 # DW_FORM_rnglistx DW_AT_ranges field.  This test is intended for DWARF-5,
18 # compiled with clang++.
20 standard_testfile .cc
22 # This test is intended for targets which support DWARF-5.
23 # Since we pass an explicit -gdwarf-5 to the compiler,
24 # we let that be the test of whether the target supports it.
26 if { [prepare_for_testing "failed to prepare" "${testfile}" \
27           $srcfile {debug c++ dwarf5 additional_flags=-O0}] } {
28     return -1
31 if ![runto_main] {
32     return -1
35 gdb_breakpoint [gdb_get_line_number "break-here"]
36 gdb_continue_to_breakpoint "break-here" ".* break-here .*"
38 gdb_test "print curr" "\\\(node \\\*\\\) $hex <node_array>"
39 gdb_test "print *curr" "= {id = 35, left = $hex <node_array\\+$decimal>, right = $hex <node_array\\+$decimal>, visited = false}"