Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3430532a
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3430532a
编写于
8月 05, 2015
作者:
A
Alex Crichton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "debuginfo: Bring back some GDB pretty printing autotests that are not actually broken."
This reverts commit
354cf4b5
.
上级
d0345618
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
188 deletion
+0
-188
src/test/debuginfo/gdb-pretty-struct-and-enums.rs
src/test/debuginfo/gdb-pretty-struct-and-enums.rs
+0
-188
未找到文件。
src/test/debuginfo/gdb-pretty-struct-and-enums.rs
已删除
100644 → 0
浏览文件 @
d0345618
// 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.
// ignore-windows failing on win32 bot
// ignore-freebsd: output doesn't match
// ignore-tidy-linelength
// ignore-lldb
// ignore-android: FIXME(#10381)
// compile-flags:-g
// This test uses some GDB Python API features (e.g. accessing anonymous fields)
// which are only available in newer GDB version. The following directive will
// case the test runner to ignore this test if an older GDB version is used:
// min-gdb-version 7.7
// gdb-command: run
// gdb-command: print regular_struct
// gdb-check:$1 = RegularStruct = {the_first_field = 101, the_second_field = 102.5, the_third_field = false, the_fourth_field = "I'm so pretty, oh so pretty..."}
// gdb-command: print tuple
// gdb-check:$2 = {true, 103, "blub"}
// gdb-command: print tuple_struct
// gdb-check:$3 = TupleStruct = {-104.5, 105}
// gdb-command: print empty_struct
// gdb-check:$4 = EmptyStruct
// gdb-command: print c_style_enum1
// gdb-check:$5 = CStyleEnumVar1
// gdb-command: print c_style_enum2
// gdb-check:$6 = CStyleEnumVar2
// gdb-command: print c_style_enum3
// gdb-check:$7 = CStyleEnumVar3
// gdb-command: print mixed_enum_c_style_var
// gdb-check:$8 = MixedEnumCStyleVar
// gdb-command: print mixed_enum_tuple_var
// gdb-check:$9 = MixedEnumTupleVar = {106, 107, false}
// gdb-command: print mixed_enum_struct_var
// gdb-check:$10 = MixedEnumStructVar = {field1 = 108.5, field2 = 109}
// gdb-command: print some
// gdb-check:$11 = Some = {110}
// gdb-command: print none
// gdb-check:$12 = None
// gdb-command: print some_fat
// gdb-check:$13 = Some = {"abc"}
// gdb-command: print none_fat
// gdb-check:$14 = None
// gdb-command: print nested_variant1
// gdb-check:$15 = NestedVariant1 = {NestedStruct = {regular_struct = RegularStruct = {the_first_field = 111, the_second_field = 112.5, the_third_field = true, the_fourth_field = "NestedStructString1"}, tuple_struct = TupleStruct = {113.5, 114}, empty_struct = EmptyStruct, c_style_enum = CStyleEnumVar2, mixed_enum = MixedEnumTupleVar = {115, 116, false}}}
// gdb-command: print nested_variant2
// gdb-check:$16 = NestedVariant2 = {abc = NestedStruct = {regular_struct = RegularStruct = {the_first_field = 117, the_second_field = 118.5, the_third_field = false, the_fourth_field = "NestedStructString10"}, tuple_struct = TupleStruct = {119.5, 120}, empty_struct = EmptyStruct, c_style_enum = CStyleEnumVar3, mixed_enum = MixedEnumStructVar = {field1 = 121.5, field2 = -122}}}
// gdb-command: print none_check1
// gdb-check:$17 = None
// gdb-command: print none_check2
// gdb-check:$18 = None
#![allow(dead_code,
unused_variables)]
use
self
::
CStyleEnum
::{
CStyleEnumVar1
,
CStyleEnumVar2
,
CStyleEnumVar3
};
use
self
::
MixedEnum
::{
MixedEnumCStyleVar
,
MixedEnumTupleVar
,
MixedEnumStructVar
};
use
self
::
NestedEnum
::{
NestedVariant1
,
NestedVariant2
};
struct
RegularStruct
{
the_first_field
:
isize
,
the_second_field
:
f64
,
the_third_field
:
bool
,
the_fourth_field
:
&
'static
str
,
}
struct
TupleStruct
(
f64
,
i16
);
struct
EmptyStruct
;
enum
CStyleEnum
{
CStyleEnumVar1
,
CStyleEnumVar2
,
CStyleEnumVar3
,
}
enum
MixedEnum
{
MixedEnumCStyleVar
,
MixedEnumTupleVar
(
u32
,
u16
,
bool
),
MixedEnumStructVar
{
field1
:
f64
,
field2
:
i32
}
}
struct
NestedStruct
{
regular_struct
:
RegularStruct
,
tuple_struct
:
TupleStruct
,
empty_struct
:
EmptyStruct
,
c_style_enum
:
CStyleEnum
,
mixed_enum
:
MixedEnum
,
}
enum
NestedEnum
{
NestedVariant1
(
NestedStruct
),
NestedVariant2
{
abc
:
NestedStruct
}
}
fn
main
()
{
let
regular_struct
=
RegularStruct
{
the_first_field
:
101
,
the_second_field
:
102.5
,
the_third_field
:
false
,
the_fourth_field
:
"I'm so pretty, oh so pretty..."
};
let
tuple
=
(
true
,
103u32
,
"blub"
);
let
tuple_struct
=
TupleStruct
(
-
104.5
,
105
);
let
empty_struct
=
EmptyStruct
;
let
c_style_enum1
=
CStyleEnumVar1
;
let
c_style_enum2
=
CStyleEnumVar2
;
let
c_style_enum3
=
CStyleEnumVar3
;
let
mixed_enum_c_style_var
=
MixedEnumCStyleVar
;
let
mixed_enum_tuple_var
=
MixedEnumTupleVar
(
106
,
107
,
false
);
let
mixed_enum_struct_var
=
MixedEnumStructVar
{
field1
:
108.5
,
field2
:
109
};
let
some
=
Some
(
110_u
size
);
let
none
:
Option
<
isize
>
=
None
;
let
some_fat
=
Some
(
"abc"
);
let
none_fat
:
Option
<&
'static
str
>
=
None
;
let
nested_variant1
=
NestedVariant1
(
NestedStruct
{
regular_struct
:
RegularStruct
{
the_first_field
:
111
,
the_second_field
:
112.5
,
the_third_field
:
true
,
the_fourth_field
:
"NestedStructString1"
,
},
tuple_struct
:
TupleStruct
(
113.5
,
114
),
empty_struct
:
EmptyStruct
,
c_style_enum
:
CStyleEnumVar2
,
mixed_enum
:
MixedEnumTupleVar
(
115
,
116
,
false
)
}
);
let
nested_variant2
=
NestedVariant2
{
abc
:
NestedStruct
{
regular_struct
:
RegularStruct
{
the_first_field
:
117
,
the_second_field
:
118.5
,
the_third_field
:
false
,
the_fourth_field
:
"NestedStructString10"
,
},
tuple_struct
:
TupleStruct
(
119.5
,
120
),
empty_struct
:
EmptyStruct
,
c_style_enum
:
CStyleEnumVar3
,
mixed_enum
:
MixedEnumStructVar
{
field1
:
121.5
,
field2
:
-
122
}
}
};
let
none_check1
:
Option
<
(
usize
,
Vec
<
usize
>
)
>
=
None
;
let
none_check2
:
Option
<
String
>
=
None
;
zzz
();
// #break
}
fn
zzz
()
{
()
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录