Skip to content

Commit

Permalink
Rollup merge of rust-lang#40400 - TimNN:gdbr-updates, r=alexcrichton
Browse files Browse the repository at this point in the history
Update gdbr tests

gdb will now reliably detect the lanugage as rust even before any code is run.
  • Loading branch information
alexcrichton committed Mar 10, 2017
2 parents e50254d + b95b5db commit 7f67a48
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
21 changes: 14 additions & 7 deletions src/test/debuginfo/c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,38 @@

// === GDB TESTS ===================================================================================

// gdb-command:print 'c_style_enum::SINGLE_VARIANT'
// gdbg-command:print 'c_style_enum::SINGLE_VARIANT'
// gdbr-command:print c_style_enum::SINGLE_VARIANT
// gdbg-check:$1 = TheOnlyVariant
// gdbr-check:$1 = c_style_enum::SingleVariant::TheOnlyVariant

// gdb-command:print 'c_style_enum::AUTO_ONE'
// gdbg-command:print 'c_style_enum::AUTO_ONE'
// gdbr-command:print c_style_enum::AUTO_ONE
// gdbg-check:$2 = One
// gdbr-check:$2 = c_style_enum::AutoDiscriminant::One

// gdb-command:print 'c_style_enum::AUTO_TWO'
// gdbg-command:print 'c_style_enum::AUTO_TWO'
// gdbr-command:print c_style_enum::AUTO_TWO
// gdbg-check:$3 = One
// gdbr-check:$3 = c_style_enum::AutoDiscriminant::One

// gdb-command:print 'c_style_enum::AUTO_THREE'
// gdbg-command:print 'c_style_enum::AUTO_THREE'
// gdbr-command:print c_style_enum::AUTO_THREE
// gdbg-check:$4 = One
// gdbr-check:$4 = c_style_enum::AutoDiscriminant::One

// gdb-command:print 'c_style_enum::MANUAL_ONE'
// gdbg-command:print 'c_style_enum::MANUAL_ONE'
// gdbr-command:print c_style_enum::MANUAL_ONE
// gdbg-check:$5 = OneHundred
// gdbr-check:$5 = c_style_enum::ManualDiscriminant::OneHundred

// gdb-command:print 'c_style_enum::MANUAL_TWO'
// gdbg-command:print 'c_style_enum::MANUAL_TWO'
// gdbr-command:print c_style_enum::MANUAL_TWO
// gdbg-check:$6 = OneHundred
// gdbr-check:$6 = c_style_enum::ManualDiscriminant::OneHundred

// gdb-command:print 'c_style_enum::MANUAL_THREE'
// gdbg-command:print 'c_style_enum::MANUAL_THREE'
// gdbr-command:print c_style_enum::MANUAL_THREE
// gdbg-check:$7 = OneHundred
// gdbr-check:$7 = c_style_enum::ManualDiscriminant::OneHundred

Expand Down
12 changes: 8 additions & 4 deletions src/test/debuginfo/limited-debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@

// Make sure functions have proper names
// gdb-command:info functions
// gdb-check:[...]void[...]main([...]);
// gdb-check:[...]void[...]some_function([...]);
// gdb-check:[...]void[...]some_other_function([...]);
// gdb-check:[...]void[...]zzz([...]);
// gdbg-check:[...]void[...]main([...]);
// gdbr-check:fn limited_debuginfo::main();
// gdbg-check:[...]void[...]some_function([...]);
// gdbr-check:fn limited_debuginfo::some_function();
// gdbg-check:[...]void[...]some_other_function([...]);
// gdbr-check:fn limited_debuginfo::some_other_function();
// gdbg-check:[...]void[...]zzz([...]);
// gdbr-check:fn limited_debuginfo::zzz();

// gdb-command:run

Expand Down
3 changes: 0 additions & 3 deletions src/test/debuginfo/simple-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

// === GDB TESTS ===================================================================================

// there's no frame yet for gdb to reliably detect the language, set it explicitly
// gdbr-command:set language rust

// gdbg-command:print 'simple_struct::NO_PADDING_16'
// gdbr-command:print simple_struct::NO_PADDING_16
// gdbg-check:$1 = {x = 1000, y = -1001}
Expand Down
3 changes: 0 additions & 3 deletions src/test/debuginfo/simple-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

// === GDB TESTS ===================================================================================

// there's no frame yet for gdb to reliably detect the language, set it explicitly
// gdbr-command:set language rust

// gdbg-command:print/d 'simple_tuple::NO_PADDING_8'
// gdbr-command:print simple_tuple::NO_PADDING_8
// gdbg-check:$1 = {__0 = -50, __1 = 50}
Expand Down

0 comments on commit 7f67a48

Please sign in to comment.