diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /tests/debuginfo/thread.rs | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/debuginfo/thread.rs')
-rw-r--r-- | tests/debuginfo/thread.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs new file mode 100644 index 000000000..388d50c5c --- /dev/null +++ b/tests/debuginfo/thread.rs @@ -0,0 +1,31 @@ +// Testing the the display of JoinHandle and Thread in cdb. + +// cdb-only +// min-cdb-version: 10.0.18317.1001 +// compile-flags:-g + +// === CDB TESTS ================================================================================== +// +// cdb-command:g +// +// cdb-command:dx join_handle,d +// cdb-check:join_handle,d [Type: std::thread::JoinHandle<tuple$<> >] +// cdb-check: [...] __0 [Type: std::thread::JoinInner<tuple$<> >] +// +// cdb-command:dx t,d +// cdb-check:t,d : [...] [Type: std::thread::Thread *] +// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner> >] + +use std::thread; + +#[allow(unused_variables)] +fn main() +{ + let join_handle = thread::spawn(|| { + println!("Initialize a thread"); + }); + let t = join_handle.thread(); + zzz(); // #break +} + +fn zzz() {} |