From: Tom de Vries Date: Thu, 28 Aug 2025 09:36:29 +0000 (+0200) Subject: [gdb/testsuite] Use build_executable in gdb.tui/tui-missing-src.exp X-Git-Tag: gdb-17-branchpoint~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1bc13149815f14c5e0fee8eb304dff5209b6de1;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Use build_executable in gdb.tui/tui-missing-src.exp While looking at test-case gdb.tui/tui-missing-src.exp I noticed that gdb_compile is used to compile multiple sources: ... if { [gdb_compile "${srcfiles}" "${binfile}" \ executable {debug additional_flags=-O0}] != "" } { ... meaning there are no separate compile and link steps, as is required for fission [1]. Fix this by using build_executable instead. Tested on aarch64-linux. [1] https://gcc.gnu.org/wiki/DebugFission --- diff --git a/gdb/testsuite/gdb.tui/tui-missing-src.exp b/gdb/testsuite/gdb.tui/tui-missing-src.exp index f29ec8c2ce8..aca417c3cd8 100644 --- a/gdb/testsuite/gdb.tui/tui-missing-src.exp +++ b/gdb/testsuite/gdb.tui/tui-missing-src.exp @@ -64,10 +64,8 @@ f2 (int x) close $fd # Step 3: Compile the source files. -if { [gdb_compile "${srcfiles}" "${binfile}" \ - executable {debug additional_flags=-O0}] != "" } { - untested "failed to compile" - return -1 +if { [build_executable "failed to prepare" $testfile $srcfiles] == -1 } { + return } # Step 4: Remove the main.c file.