diff options
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.c | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp | 10 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.c index 5e69e4a..e3d70f4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.c @@ -29,8 +29,15 @@ foo (int a) } int +quux (int a) +{ + asm ("quux_label: .globl quux_label"); + return foo (a); +} + +int main (void) { asm ("main_label: .globl main_label"); - return foo (5) + 1; + return quux (5) + 1; } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp index 972ab76..5da60bf 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp @@ -44,10 +44,10 @@ Dwarf::assemble $asm_file { declare_labels ranges_label # Find start address and length for our functions. - set main_func \ - [function_range main [list ${srcdir}/${subdir}/$srcfile]] set foo_func \ [function_range foo [list ${srcdir}/${subdir}/$srcfile]] + set quux_func \ + [function_range quux [list ${srcdir}/${subdir}/$srcfile]] set bar_func \ [function_range bar [list ${srcdir}/${subdir}/$srcfile]] @@ -59,15 +59,15 @@ Dwarf::assemble $asm_file { } { subprogram { {external 1 flag} - {name main} + {name quux} } } } ranges {is_64 [is_64_target]} { ranges_label: sequence { - base [lindex $main_func 0] - range 0 [lindex $main_func 1] + base [lindex $quux_func 0] + range 0 [lindex $quux_func 1] base [lindex $bar_func 0] range 0 [lindex $bar_func 1] } |