[gdb/testsuite] Use function_range in gdb.dwarf2/dw2-ref-missing-frame.exp
authorBhuvanendra Kumar N <Bhuvanendra.KumarN@amd.com>
Tue, 5 Oct 2021 11:10:16 +0000 (13:10 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 5 Oct 2021 11:10:16 +0000 (13:10 +0200)
commita5ea23036d8a85d2ef133458a4c54a339857c152
tree74fbc63e0edb067f2869caaf12a5882131cb415a
parentb1f0f2841871f407d116e3e7f0dfca3e410633d4
[gdb/testsuite] Use function_range in gdb.dwarf2/dw2-ref-missing-frame.exp

Following 2 test points are failing with clang compiler

(gdb) FAIL: gdb.dwarf2/dw2-ref-missing-frame.exp: func_nofb print
(gdb) FAIL: gdb.dwarf2/dw2-ref-missing-frame.exp: func_loopfb print

As in commit f677852bbda "[gdb/testsuite] Use function_range in
gdb.dwarf2/dw2-abs-hi-pc.exp", the problem is that the CU and functions
have an empty address range, due to using asm labels in global scope,
which is a known source of problems, as explained in the comment of proc
function_range in gdb/testsuite/lib/dwarf.exp.  Hence fix this also by
using function_range.

Tested on x86_64-linux with gcc and clang.
gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c
gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.S
gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp