-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debuginfo: Allow debuginfo tests to be ignored based on GDB version.
- Loading branch information
1 parent
e34d36b
commit 2eabca9
Showing
6 changed files
with
149 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// This test uses only GDB Python API features which should be available in | ||
// older versions of GDB too. A more extensive test can be found in | ||
// gdb-pretty-struct-and-enums.rs | ||
|
||
// ignore-tidy-linelength | ||
// ignore-lldb | ||
// ignore-android: FIXME(#10381) | ||
// compile-flags:-g | ||
// gdb-use-pretty-printer | ||
|
||
// The following line actually doesn't have to do anything with pretty printing, | ||
// it just tells GDB to print values on one line: | ||
// gdb-command: set print pretty off | ||
|
||
// gdb-command: rbreak zzz | ||
// gdb-command: run | ||
// gdb-command: finish | ||
|
||
// gdb-command: print regular_struct | ||
// gdb-check:$1 = RegularStruct = {the_first_field = 101, the_second_field = 102.5, the_third_field = false} | ||
|
||
// gdb-command: print empty_struct | ||
// gdb-check:$2 = EmptyStruct | ||
|
||
// gdb-command: print c_style_enum1 | ||
// gdb-check:$3 = CStyleEnumVar1 | ||
|
||
// gdb-command: print c_style_enum2 | ||
// gdb-check:$4 = CStyleEnumVar2 | ||
|
||
// gdb-command: print c_style_enum3 | ||
// gdb-check:$5 = CStyleEnumVar3 | ||
|
||
struct RegularStruct { | ||
the_first_field: int, | ||
the_second_field: f64, | ||
the_third_field: bool, | ||
} | ||
|
||
struct EmptyStruct; | ||
|
||
enum CStyleEnum { | ||
CStyleEnumVar1, | ||
CStyleEnumVar2, | ||
CStyleEnumVar3, | ||
} | ||
|
||
fn main() { | ||
|
||
let regular_struct = RegularStruct { | ||
the_first_field: 101, | ||
the_second_field: 102.5, | ||
the_third_field: false | ||
}; | ||
|
||
let empty_struct = EmptyStruct; | ||
|
||
let c_style_enum1 = CStyleEnumVar1; | ||
let c_style_enum2 = CStyleEnumVar2; | ||
let c_style_enum3 = CStyleEnumVar3; | ||
|
||
zzz(); | ||
} | ||
|
||
fn zzz() { () } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters