Skip to content

Commit 35ebdf9

Browse files
committed
Auto merge of rust-lang#147728 - Enselic:gdbt-check-typo, r=Zalathar
tests: activate misspelled `gdb-check` in `function-arg-initialization.rs` In 9253e12 a bunch of `gdbr-check` (for `rust-gdb`) directives and `gdbg-check` (for plain `gdb`) directives were added. But in two places the author accidentally wrote `gdbt-check` instead (`t` is next to `r` on the keyboard). This commit fixes that typo. rust-lang#129218 later renamed `gdbr-check` to just `gdb-check` which is why we rename to `gdb-check` directly. The test still passes locally for me after the change, but fails if I change the `gdb-check` checks to check for some other string, so the check seems to still perform its intended function. Note that we need to add a `std::hint::black_box()` to avoid $4 = <optimized out> prints on at least `aarch64-gnu-llvm-20-1`. After this there are no more instances of the string `gdbt` in the code base: ```console $ git grep gdbt ``` try-job: dist-i586-gnu-i586-i686-musl
2 parents f2bae99 + 192f862 commit 35ebdf9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/debuginfo/function-arg-initialization.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
// NON IMMEDIATE ARGS
2828
// gdb-command:print a
29-
// gdbt-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10}
29+
// gdb-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10}
3030
// gdb-command:print b
31-
// gdbt-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18}
31+
// gdb-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18}
3232
// gdb-command:continue
3333

3434
// BINDING
@@ -234,6 +234,9 @@ struct BigStruct {
234234

235235
fn non_immediate_args(a: BigStruct, b: BigStruct) {
236236
zzz(); // #break
237+
238+
// FIXME(#128973): Needed to avoid `<optimized out>` prints before #128973 has been fixed.
239+
std::hint::black_box(|| { let _ = (a, b);});
237240
}
238241

239242
fn binding(a: i64, b: u64, c: f64) {

0 commit comments

Comments
 (0)