Skip to content

Commit cd1f782

Browse files
committed
Auto merge of rust-lang#104470 - ehuss:cdb-dupe-last-command, r=jyn514
Don't duplicate last cdb debuginfo test command cdb scripts interpret a blank line to mean "repeat the last command", similar to what happens when running the debugger from a console. The code for compiletest that constructs the debugger script was inserting a blank line between the last command and the "quit" command. This caused the last command to be executed twice. This can cause some confusion since the `-check` lines are expecting the output in a certain order. But printing the last command twice causes that order-assumption to fail, and that can cause confusion. This fixes it by removing the blank line. AFAICT, gdb and lldb scripts don't have the same behavior with blank lines (and the gdb code doesn't add any blank lines anyways).
2 parents c5d82ed + 425a7af commit cd1f782

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/debuginfo/function-names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
// Const generic parameter
7777
// cdb-command:x a!function_names::const_generic_fn*
7878
// cdb-check:[...] a!function_names::const_generic_fn_bool<false> (void)
79-
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST$6348c650c7b26618> (void)
8079
// cdb-check:[...] a!function_names::const_generic_fn_unsigned_int<14> (void)
8180
// cdb-check:[...] a!function_names::const_generic_fn_signed_int<-7> (void)
81+
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST$6348c650c7b26618> (void)
8282

8383
#![allow(unused_variables)]
8484
#![feature(omit_gdb_pretty_printer_section)]

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ impl<'test> TestCx<'test> {
711711
script_str.push_str("\n");
712712
}
713713

714-
script_str.push_str("\nqq\n"); // Quit the debugger (including remote debugger, if any)
714+
script_str.push_str("qq\n"); // Quit the debugger (including remote debugger, if any)
715715

716716
// Write the script into a file
717717
debug!("script_str = {}", script_str);

0 commit comments

Comments
 (0)