Skip to content

Commit 8c328c2

Browse files
committed
gdb/lldb: Trim output of vec/slice/array (testcase)
See #29467
1 parent 8aee582 commit 8c328c2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/test/debuginfo/huge-vec.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// min-lldb-version: 310
12+
// ignore-tidy-linelength
13+
14+
// compile-flags:-g
15+
16+
// gdb-command:set print elements 10
17+
// gdb-command:run
18+
// gdb-command:print a
19+
// gdb-check:$1 = Vec<i32>(len: 200, cap: 200) = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1...}
20+
21+
// === LLDB TESTS ==================================================================================
22+
23+
// lldb-command:run
24+
// lldb-command:print a
25+
// lldb-check:[...]$0 = vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ..]
26+
27+
#![allow(unused_variables)]
28+
29+
fn main() {
30+
let a = vec![1; 200];
31+
32+
() // #break
33+
}

0 commit comments

Comments
 (0)