tests/debuginfo/basic-stepping.rs: Add cdb test

This commit is contained in:
Martin Nordholts
2026-03-14 00:03:43 +01:00
parent 0e4bafc47c
commit 17c079625c
+39
View File
@@ -88,6 +88,45 @@
//@ lldb-command: frame select
//@ lldb-check: [...]let m: *const() = &a;[...]
// === CDB TESTS ===================================================================================
// Enable source line support. See
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/-lines--toggle-source-line-support-.
//@ cdb-command: .lines -e
// Display source lines and source line numbers at the command prompt. See
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/l---l---set-source-options-.
//@ cdb-command: l+s
// Enter "source mode" so `p` steps source lines and not assembly instructions.
//@ cdb-command: l+t
// `g` means "go". See
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/g--go-.
//@ cdb-command: g
// `p` means "step". See
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/p--step-.
//@ cdb-command: p
//@ cdb-check: [...]: let mut c = 27;
//@ cdb-command: p
//@ cdb-check: [...]: let d = c = 99;
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let e = "hi bob";
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let f = b"hi bob";
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let g = b'9';
//@ cdb-command: p
//@ cdb-check: [...]: let h = ["whatever"; 8];
//@ cdb-command: p
//@ cdb-check: [...]: let i = [1,2,3,4];
//@ cdb-command: p
//@ cdb-check: [...]: let j = (23, "hi");
//@ cdb-command: p
//@ cdb-check: [...]: let k = 2..3;
//@ cdb-command: p
//@ cdb-check: [...]: let l = &i[k];
//@ cdb-command: p
//@ cdb-check: [...]: let m: *const() = &a;
#![allow(unused_assignments, unused_variables)]
fn main () {