gdb: use gdb_test_multiple in gdb_breakpoint
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 3 Jan 2023 19:22:16 +0000 (14:22 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 4 Jan 2023 16:19:50 +0000 (11:19 -0500)
commit4b9728bec157796478831972fc8d07306dd9dcde
treef91e989aa8a599c156338d09d64dbe152d42b220
parent478eebf831985d4c4aeb4c781e20b0d7ecce5baf
gdb: use gdb_test_multiple in gdb_breakpoint

When running the testsuite in a non-optimized build on a slow machine, I
sometimes get:

    UNTESTED: gdb.gdb/selftest.exp: Cannot set breakpoint at captured_main, skipping testcase.

do_self_tests, in lib/selftest-support.exp, uses `with_timeout_factor
10`, to account for the fact that reading the debug info of the gdb
binary (especially in a non-optimized GDB) can take time.  But then it
ends up calling gdb_breakpoint, which uses gdb_expect with a hard-coded
timeout of 30 seconds.

Fix this by making gdb_breakpoint use gdb_test_multiple, which is a
desired change anyway for this kind of simple command / expected
output case.

Change-Id: I9b06ce991cc584810d8cc231b2b4893980b8be75
Reviewed-By: Lancelot Six <lancelot.six@amd.com>
gdb/testsuite/lib/gdb.exp