From: Tom Tromey Date: Tue, 5 Aug 2025 18:10:34 +0000 (-0600) Subject: Use '.rs' extension for Rust in gdb_simple_compile X-Git-Tag: gdb-17-branchpoint~379 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dd189d3ed6ea239247637656bf2990f6dfb4522;p=thirdparty%2Fbinutils-gdb.git Use '.rs' extension for Rust in gdb_simple_compile While trying out gccrs, I noticed that gdb_simple_compile does not use the ".rs" extension for Rust sources. This patch fixes the problem, which lets gccrs get a little further in the test suite. --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0a582aac354..98691dfce25 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5729,6 +5729,10 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} set ext "d" break } + if { "$flag" eq "rust" } { + set ext "rs" + break + } } set src [standard_temp_file $name.$ext] set obj [standard_temp_file $name.$postfix]