From b95b5db163adfe24117aa25e42a775c7b5b91dc5 Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Thu, 9 Mar 2017 22:11:23 +0100 Subject: [PATCH] update gdbr tests gdb will now reliably detect the lanugage as rust even before any code is run. --- src/test/debuginfo/c-style-enum.rs | 21 ++++++++++++++------- src/test/debuginfo/limited-debuginfo.rs | 12 ++++++++---- src/test/debuginfo/simple-struct.rs | 3 --- src/test/debuginfo/simple-tuple.rs | 3 --- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/test/debuginfo/c-style-enum.rs b/src/test/debuginfo/c-style-enum.rs index 2452c18f54347..900b0829530f3 100644 --- a/src/test/debuginfo/c-style-enum.rs +++ b/src/test/debuginfo/c-style-enum.rs @@ -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 diff --git a/src/test/debuginfo/limited-debuginfo.rs b/src/test/debuginfo/limited-debuginfo.rs index 3d21def3953b8..e8c3597b8c8dd 100644 --- a/src/test/debuginfo/limited-debuginfo.rs +++ b/src/test/debuginfo/limited-debuginfo.rs @@ -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 diff --git a/src/test/debuginfo/simple-struct.rs b/src/test/debuginfo/simple-struct.rs index 4956313ad2214..ae05bafe5adaa 100644 --- a/src/test/debuginfo/simple-struct.rs +++ b/src/test/debuginfo/simple-struct.rs @@ -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} diff --git a/src/test/debuginfo/simple-tuple.rs b/src/test/debuginfo/simple-tuple.rs index 354a2c26cb36d..b3c2704115095 100644 --- a/src/test/debuginfo/simple-tuple.rs +++ b/src/test/debuginfo/simple-tuple.rs @@ -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}