Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw5-rnglist-test.exp
CommitLineData
88b9d363 1# Copyright 2020-2022 Free Software Foundation, Inc.
d0ce17d8
CT
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# 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++.
19
20standard_testfile .cc
21
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.
25
26if { [prepare_for_testing "failed to prepare" "${testfile}" \
27 $srcfile {debug c++ additional_flags=-gdwarf-5 \
28 additional_flags=-O0}] } {
29 return -1
30}
31
32if ![runto_main] {
33 return -1
34}
35
36gdb_breakpoint [gdb_get_line_number "break-here"]
37gdb_continue_to_breakpoint "break-here" ".* break-here .*"
38
39gdb_test "print curr" "\\\(node \\\*\\\) $hex <node_array>"
40gdb_test "print *curr" "= {id = 35, left = $hex <node_array\\+$decimal>, right = $hex <node_array\\+$decimal>, visited = false}"
This page took 0.166696 seconds and 4 git commands to generate.