Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: gdb/testsuite/gdb.base/return-nodebug.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/return.c ('k') | gdb/testsuite/gdb.base/return2.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/return-nodebug.exp
diff --git a/gdb/testsuite/gdb.base/return-nodebug.exp b/gdb/testsuite/gdb.base/return-nodebug.exp
index 105808866b80277ab56e57ccaf7236358cb6aceb..1802862c3b46a117256190a4a2fc4477b5324300 100644
--- a/gdb/testsuite/gdb.base/return-nodebug.exp
+++ b/gdb/testsuite/gdb.base/return-nodebug.exp
@@ -16,35 +16,32 @@
proc do_test {type} {
set typenospace [string map {{ } -} $type]
- global pf_prefix
- set old_prefix $pf_prefix
- lappend pf_prefix "$typenospace:"
-
- if {[runto "func"]} {
- # Verify that we do not crash when using "return" from a function with
- # no debugging info. Such function has no `struct symbol'. It may
- # still have an associated `struct minimal_symbol'.
-
- gdb_test "return -1" \
- "Return value type not available for selected stack frame\\.\r\nPlease use an explicit cast of the value to return\\." \
- "return from function with no debug info without a cast"
-
- # Cast of the result to the proper width must be done explicitely.
- gdb_test "return ($type) -1" "#0 .* main \\(.*" \
- "return from function with no debug info with a cast" \
- "Make selected stack frame return now\\? \\(y or n\\) " "y"
-
- gdb_test "advance marker" "marker \\(.*" \
- "advance to marker"
-
- # And if it returned the full width of the result.
- gdb_test "print /d t" " = -1" "full width of the returned result"
+ with_test_prefix "$typenospace" {
+ if {[runto "func"]} {
+ # Verify that we do not crash when using "return" from a
+ # function with no debugging info. Such function has no
+ # `struct symbol'. It may still have an associated
+ # `struct minimal_symbol'.
+
+ gdb_test "return -1" \
+ "Return value type not available for selected stack frame\\.\r\nPlease use an explicit cast of the value to return\\." \
+ "return from function with no debug info without a cast"
+
+ # Cast of the result to the proper width must be done explicitely.
+ gdb_test "return ($type) -1" "#0 .* main \\(.*" \
+ "return from function with no debug info with a cast" \
+ "Make selected stack frame return now\\? \\(y or n\\) " "y"
+
+ gdb_test "advance marker" "marker \\(.*" \
+ "advance to marker"
+
+ # And if it returned the full width of the result.
+ gdb_test "print /d t" " = -1" "full width of the returned result"
+ }
}
-
- set pf_prefix $old_prefix
}
-foreach type {{signed char} {short} {int} {long} {long long}} {
+foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} {
set typeesc [string map {{ } {\ }} $type]
set typenospace [string map {{ } -} $type]
« no previous file with comments | « gdb/testsuite/gdb.base/return.c ('k') | gdb/testsuite/gdb.base/return2.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698