Skip to content

Commit 17c0796

Browse files
committed
tests/debuginfo/basic-stepping.rs: Add cdb test
1 parent 0e4bafc commit 17c0796

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

tests/debuginfo/basic-stepping.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,45 @@
8888
//@ lldb-command: frame select
8989
//@ lldb-check: [...]let m: *const() = &a;[...]
9090

91+
// === CDB TESTS ===================================================================================
92+
93+
// Enable source line support. See
94+
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/-lines--toggle-source-line-support-.
95+
//@ cdb-command: .lines -e
96+
// Display source lines and source line numbers at the command prompt. See
97+
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/l---l---set-source-options-.
98+
//@ cdb-command: l+s
99+
// Enter "source mode" so `p` steps source lines and not assembly instructions.
100+
//@ cdb-command: l+t
101+
102+
// `g` means "go". See
103+
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/g--go-.
104+
//@ cdb-command: g
105+
// `p` means "step". See
106+
// https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/p--step-.
107+
//@ cdb-command: p
108+
//@ cdb-check: [...]: let mut c = 27;
109+
//@ cdb-command: p
110+
//@ cdb-check: [...]: let d = c = 99;
111+
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
112+
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let e = "hi bob";
113+
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
114+
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let f = b"hi bob";
115+
//@ [no-SingleUseConsts-mir-pass] cdb-command: p
116+
//@ [no-SingleUseConsts-mir-pass] cdb-check: [...]: let g = b'9';
117+
//@ cdb-command: p
118+
//@ cdb-check: [...]: let h = ["whatever"; 8];
119+
//@ cdb-command: p
120+
//@ cdb-check: [...]: let i = [1,2,3,4];
121+
//@ cdb-command: p
122+
//@ cdb-check: [...]: let j = (23, "hi");
123+
//@ cdb-command: p
124+
//@ cdb-check: [...]: let k = 2..3;
125+
//@ cdb-command: p
126+
//@ cdb-check: [...]: let l = &i[k];
127+
//@ cdb-command: p
128+
//@ cdb-check: [...]: let m: *const() = &a;
129+
91130
#![allow(unused_assignments, unused_variables)]
92131

93132
fn main () {

0 commit comments

Comments
 (0)