diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.cc b/gdb/testsuite/gdb.cp/step-and-next-inline.cc index 26b29d01777..71b93e844f4 100644 --- a/gdb/testsuite/gdb.cp/step-and-next-inline.cc +++ b/gdb/testsuite/gdb.cp/step-and-next-inline.cc @@ -61,6 +61,6 @@ tree xx; int main() { - get_alias_set (&xx); + get_alias_set (&xx); /* Beginning of main */ return 0; } // main diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.exp b/gdb/testsuite/gdb.cp/step-and-next-inline.exp index 4997abb9b1b..9f30f537bd3 100644 --- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp +++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp @@ -58,7 +58,9 @@ proc do_test { use_header } { with_test_prefix $prefix { - if ![runto_main] { + set main_location [gdb_get_line_number "Beginning of main" $srcfile] + + if ![runto $main_location qualified] { return }