gdb/testsuite: fix testing gdb.base/skip-inline.exp with clang
authorBruno Larsen <blarsen@redhat.com>
Tue, 13 Sep 2022 16:56:23 +0000 (18:56 +0200)
committerBruno Larsen <blarsen@redhat.com>
Thu, 22 Sep 2022 09:04:17 +0000 (11:04 +0200)
commit4037b4191a0ed4f8fc51564416519886bc88a1b7
treeb20e15f79d6039e30f158c87730d790eca94a125
parentd5bcff0343ae1a4a8be76fd8646b22f20f9ed94a
gdb/testsuite: fix testing gdb.base/skip-inline.exp with clang

When testing gdb.base/skip-inline.exp using clang, we get failures
when trying to step out of functions, since clang requires one fewer
step when compared to gcc.  The inferior gets increasingly out of sync
as the test continues because of this difference, which generates those
failures.

This commit fixes this by switching those hardcoded steps to
gdb_step_until, to guarantee that the inferior is always synced to what
the test expects.  This approach does not work for the parts that use
step 2 or step 3, so when we identify that clang is being used, those
tests are skipped.
gdb/testsuite/gdb.base/skip-inline.exp