-# Copyright 1997, 1998, 1999, 2003, 2004, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 1997-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... etc. (you get the idea)
# Mostly with char and unsigned char.
-if $tracelevel then {
- strace $tracelevel
- }
-
#
# test running programs
#
-set prms_id 0
-set bug_id 0
# Use the same test program constvars.c.
# Create and source the file that provides information about the compiler
# used to compile the test case.
-if [get_compiler_info not-used] {
- return -1;
+if [get_compiler_info] {
+ return -1
}
#
}
}
-send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
-
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "up from marker1" }
- }
- }
- -re "Break.* marker1__.* \\(\\) at .*:$decimal.*$gdb_prompt $" {
- fail "continue to marker1 (demangling)"
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "up from marker1" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
+gdb_test "break marker1" ".*" ""
+
+gdb_test_multiple "cont" "continue to marker1" {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ pass "continue to marker1"
+ }
+ -re "Break.* marker1__.* \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ fail "continue to marker1 (demangling)"
}
+}
+gdb_test "up" " in main .*" "up from marker1"
# As of Feb 1999, GCC does not issue info about volatility of vars, so
# these tests are all expected to fail if GCC is the compiler. -sts
gdb_test "ptype veneer" "type = volatile short( int)? \\* volatile.*"
local_compiler_xfail_check
-gdb_test "ptype video" "type = volatile (unsigned short|short unsigned)( int) \\* volatile.*"
+gdb_test "ptype video" "type = volatile (unsigned short|short unsigned) \\* volatile.*"
local_compiler_xfail_check
gdb_test "ptype vacuum" "type = volatile long( int)? \\* volatile.*"
# test function parameters
local_compiler_xfail_check
local_compiler_xfail_check_2
-send_gdb "ptype qux2\n"
-gdb_expect {
- -re "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\).*$gdb_prompt $" {
- pass "ptype qux2"
- }
- -re ".*$gdb_prompt $" { fail "ptype qux2" }
- timeout { fail "(timeout) ptype qux2" }
- }
+
+gdb_test "ptype qux2" \
+ "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\)" \
+ "ptype qux2"