Skip to content

Commit af60d7c

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of rust-lang#40400 - TimNN:gdbr-updates, r=alexcrichton
Update gdbr tests gdb will now reliably detect the lanugage as rust even before any code is run.
2 parents 1b81660 + b95b5db commit af60d7c

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

src/test/debuginfo/c-style-enum.rs

+14-7
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,38 @@
1515

1616
// === GDB TESTS ===================================================================================
1717

18-
// gdb-command:print 'c_style_enum::SINGLE_VARIANT'
18+
// gdbg-command:print 'c_style_enum::SINGLE_VARIANT'
19+
// gdbr-command:print c_style_enum::SINGLE_VARIANT
1920
// gdbg-check:$1 = TheOnlyVariant
2021
// gdbr-check:$1 = c_style_enum::SingleVariant::TheOnlyVariant
2122

22-
// gdb-command:print 'c_style_enum::AUTO_ONE'
23+
// gdbg-command:print 'c_style_enum::AUTO_ONE'
24+
// gdbr-command:print c_style_enum::AUTO_ONE
2325
// gdbg-check:$2 = One
2426
// gdbr-check:$2 = c_style_enum::AutoDiscriminant::One
2527

26-
// gdb-command:print 'c_style_enum::AUTO_TWO'
28+
// gdbg-command:print 'c_style_enum::AUTO_TWO'
29+
// gdbr-command:print c_style_enum::AUTO_TWO
2730
// gdbg-check:$3 = One
2831
// gdbr-check:$3 = c_style_enum::AutoDiscriminant::One
2932

30-
// gdb-command:print 'c_style_enum::AUTO_THREE'
33+
// gdbg-command:print 'c_style_enum::AUTO_THREE'
34+
// gdbr-command:print c_style_enum::AUTO_THREE
3135
// gdbg-check:$4 = One
3236
// gdbr-check:$4 = c_style_enum::AutoDiscriminant::One
3337

34-
// gdb-command:print 'c_style_enum::MANUAL_ONE'
38+
// gdbg-command:print 'c_style_enum::MANUAL_ONE'
39+
// gdbr-command:print c_style_enum::MANUAL_ONE
3540
// gdbg-check:$5 = OneHundred
3641
// gdbr-check:$5 = c_style_enum::ManualDiscriminant::OneHundred
3742

38-
// gdb-command:print 'c_style_enum::MANUAL_TWO'
43+
// gdbg-command:print 'c_style_enum::MANUAL_TWO'
44+
// gdbr-command:print c_style_enum::MANUAL_TWO
3945
// gdbg-check:$6 = OneHundred
4046
// gdbr-check:$6 = c_style_enum::ManualDiscriminant::OneHundred
4147

42-
// gdb-command:print 'c_style_enum::MANUAL_THREE'
48+
// gdbg-command:print 'c_style_enum::MANUAL_THREE'
49+
// gdbr-command:print c_style_enum::MANUAL_THREE
4350
// gdbg-check:$7 = OneHundred
4451
// gdbr-check:$7 = c_style_enum::ManualDiscriminant::OneHundred
4552

src/test/debuginfo/limited-debuginfo.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515

1616
// Make sure functions have proper names
1717
// gdb-command:info functions
18-
// gdb-check:[...]void[...]main([...]);
19-
// gdb-check:[...]void[...]some_function([...]);
20-
// gdb-check:[...]void[...]some_other_function([...]);
21-
// gdb-check:[...]void[...]zzz([...]);
18+
// gdbg-check:[...]void[...]main([...]);
19+
// gdbr-check:fn limited_debuginfo::main();
20+
// gdbg-check:[...]void[...]some_function([...]);
21+
// gdbr-check:fn limited_debuginfo::some_function();
22+
// gdbg-check:[...]void[...]some_other_function([...]);
23+
// gdbr-check:fn limited_debuginfo::some_other_function();
24+
// gdbg-check:[...]void[...]zzz([...]);
25+
// gdbr-check:fn limited_debuginfo::zzz();
2226

2327
// gdb-command:run
2428

src/test/debuginfo/simple-struct.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
// === GDB TESTS ===================================================================================
1616

17-
// there's no frame yet for gdb to reliably detect the language, set it explicitly
18-
// gdbr-command:set language rust
19-
2017
// gdbg-command:print 'simple_struct::NO_PADDING_16'
2118
// gdbr-command:print simple_struct::NO_PADDING_16
2219
// gdbg-check:$1 = {x = 1000, y = -1001}

src/test/debuginfo/simple-tuple.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
// === GDB TESTS ===================================================================================
1616

17-
// there's no frame yet for gdb to reliably detect the language, set it explicitly
18-
// gdbr-command:set language rust
19-
2017
// gdbg-command:print/d 'simple_tuple::NO_PADDING_8'
2118
// gdbr-command:print simple_tuple::NO_PADDING_8
2219
// gdbg-check:$1 = {__0 = -50, __1 = 50}

0 commit comments

Comments
 (0)