diff options
Diffstat (limited to 'gdb/testsuite/gdb.base')
32 files changed, 352 insertions, 369 deletions
diff --git a/gdb/testsuite/gdb.base/assign.exp b/gdb/testsuite/gdb.base/assign.exp index 675ded4..38c2b2e 100644 --- a/gdb/testsuite/gdb.base/assign.exp +++ b/gdb/testsuite/gdb.base/assign.exp @@ -60,7 +60,7 @@ gdb_test_multiple "print v_int+=57" "v_int+=57" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (2)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 2" gdb_test_multiple "print v_int-=57" "v_int-=57" { -re " = -51.*$gdb_prompt $" { @@ -68,7 +68,7 @@ gdb_test_multiple "print v_int-=57" "v_int-=57" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (3)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 3" gdb_test_multiple "print v_int*=5" "v_int*=5" { -re " = 30.*$gdb_prompt $" { @@ -76,7 +76,7 @@ gdb_test_multiple "print v_int*=5" "v_int*=5" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (4)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 4" gdb_test_multiple "print v_int/=4" "v_int/=4" { -re " = 1.*$gdb_prompt $" { @@ -84,7 +84,7 @@ gdb_test_multiple "print v_int/=4" "v_int/=4" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (5)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 5" gdb_test_multiple "print v_int%=4" "v_int%=4" { -re " = 2.*$gdb_prompt $" { @@ -92,7 +92,7 @@ gdb_test_multiple "print v_int%=4" "v_int%=4" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (6)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 6" gdb_test_multiple "print v_int+=v_char" "v_int+=char" { -re " = 71.*$gdb_prompt $" { @@ -100,7 +100,7 @@ gdb_test_multiple "print v_int+=v_char" "v_int+=char" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (7)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 7" gdb_test_multiple "print v_int+=v_signed_char" "v_int+=signed_char" { -re " = 72.*$gdb_prompt $" { @@ -108,7 +108,7 @@ gdb_test_multiple "print v_int+=v_signed_char" "v_int+=signed_char" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (8)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 8" gdb_test_multiple "print v_int+=v_unsigned_char" "v_int+=unsigned_char" { -re " = 73.*$gdb_prompt $" { @@ -116,7 +116,7 @@ gdb_test_multiple "print v_int+=v_unsigned_char" "v_int+=unsigned_char" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (9)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 9" gdb_test_multiple "print v_int+=v_short" "v_int+=short" { -re " = 9.*$gdb_prompt $" { @@ -124,7 +124,7 @@ gdb_test_multiple "print v_int+=v_short" "v_int+=short" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (10)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 10" gdb_test_multiple "print v_int+=v_signed_short" "v_int+=signed_short" { -re " = 10.*$gdb_prompt $" { @@ -132,7 +132,7 @@ gdb_test_multiple "print v_int+=v_signed_short" "v_int+=signed_short" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (11)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 11" gdb_test_multiple "print v_int+=v_unsigned_short" "v_int=+unsigned_short" { -re " = 11.*$gdb_prompt $" { @@ -140,7 +140,7 @@ gdb_test_multiple "print v_int+=v_unsigned_short" "v_int=+unsigned_short" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (12)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 12" gdb_test_multiple "print v_int+=v_signed_int" "v_int+=signed_int" { -re " = 13.*$gdb_prompt $" { @@ -148,7 +148,7 @@ gdb_test_multiple "print v_int+=v_signed_int" "v_int+=signed_int" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (13)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 13" gdb_test_multiple "print v_int+=v_unsigned_int" "v_int+=unsigned_int" { -re " = 14.*$gdb_prompt $" { @@ -156,7 +156,7 @@ gdb_test_multiple "print v_int+=v_unsigned_int" "v_int+=unsigned_int" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (14)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 14" gdb_test_multiple "print v_int+=v_long" "v_int+=long" { -re " = 15.*$gdb_prompt $" { @@ -164,7 +164,7 @@ gdb_test_multiple "print v_int+=v_long" "v_int+=long" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (15)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 15" gdb_test_multiple "print v_int+=v_signed_long" "v_int+=signed_long" { -re " = 16.*$gdb_prompt $" { @@ -172,7 +172,7 @@ gdb_test_multiple "print v_int+=v_signed_long" "v_int+=signed_long" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (16)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 16" gdb_test_multiple "print v_int+=v_unsigned_long" "v_int+=unsigned_long" { -re " = 17.*$gdb_prompt $" { @@ -180,7 +180,7 @@ gdb_test_multiple "print v_int+=v_unsigned_long" "v_int+=unsigned_long" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (17)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 17" gdb_test_multiple "print v_int+=v_float" "v_int+=v_float" { -re " = 106.*$gdb_prompt $" { @@ -188,7 +188,7 @@ gdb_test_multiple "print v_int+=v_float" "v_int+=v_float" { } } -gdb_test_no_output "set variable v_int = 6" "set v_int to 6 (18)" +gdb_test_no_output "set variable v_int = 6" "set v_int to 6, 18" gdb_test_multiple "print v_int+=v_double" "v_int+=double" { -re " = 206.*$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/bitfields.exp b/gdb/testsuite/gdb.base/bitfields.exp index ce420fa..6954a35 100644 --- a/gdb/testsuite/gdb.base/bitfields.exp +++ b/gdb/testsuite/gdb.base/bitfields.exp @@ -45,23 +45,23 @@ proc bitfield_uniqueness {} { # treat it correctly as a signed 1bit field (values 0 or -1) while # printing its value does not cause a spurious failure. We do the # signedness preservation test later. - gdb_test "print flags" ".*uc = 0 .*, s1 = (1|-1), u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s1)" + gdb_test "print flags" ".*uc = 0 .*, s1 = (1|-1), u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, s1" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #2" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u1)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, u1" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #3" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s2)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, s2" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #4" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 1, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u2)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 1, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, u2" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #5" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 1, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s3)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 1, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, s3" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #6" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 1, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u3)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 1, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness, u3" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #7" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 1, u9 = 0, sc = 0.*" "bitfield uniqueness (s9)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 1, u9 = 0, sc = 0.*" "bitfield uniqueness, s9" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #8" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 1, sc = 0.*" "bitfield uniqueness (u9)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 1, sc = 0.*" "bitfield uniqueness, u9" gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #9" - gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 1.*" "bitfield uniqueness (sc)" + gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 1.*" "bitfield uniqueness, sc" } diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 075498a..431bfd5 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -171,7 +171,7 @@ proc insert_catch_syscall_with_arg { syscall } { global decimal # Trying to set the catchpoint - set thistest "catch syscall with arguments ($syscall)" + set thistest "catch syscall with arguments, $syscall" gdb_test "catch syscall $syscall" "Catchpoint $decimal \\(syscall \'?${syscall}\'?( \[${decimal}\])?\\)" $thistest check_info_bp_specific_syscall $syscall diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 3dbdd0f..4a0a373 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -543,10 +543,10 @@ gdb_test_multiple "" "$test" { # Eat the prompt gdb_expect { -re "$gdb_prompt " { - pass "$test (eat prompt)" + pass "$test, eat prompt" } timeout { - fail "(timeout) $test (eat prompt)" + fail "$test, eat prompt (timeout)" } } @@ -572,10 +572,10 @@ gdb_test_multiple "" "$test" { # Eat the prompt gdb_expect { -re "$gdb_prompt " { - pass "$test (eat prompt)" + pass "$test, eat prompt" } timeout { - fail "(timeout) $test (eat prompt)" + fail "$test, eat prompt (timeout)" } } diff --git a/gdb/testsuite/gdb.base/cond-expr.exp b/gdb/testsuite/gdb.base/cond-expr.exp index 5956d68..67918cf 100644 --- a/gdb/testsuite/gdb.base/cond-expr.exp +++ b/gdb/testsuite/gdb.base/cond-expr.exp @@ -47,22 +47,22 @@ if {![runto_main]} { } gdb_test "print (2 ? 3 : 4)" "\[0-9\]* = 3" \ - "print value of cond expr (const true)" + "print value of cond expr, const true" gdb_test "print (0 ? 3 : 4)" "\[0-9\]* = 4" \ - "print value of cond expr (const false)" + "print value of cond expr, const false" gdb_test_no_output "set variable x=14" "set variable x=14" gdb_test_no_output "set variable y=2" "set variable y=2" gdb_test_no_output "set variable z=3" "set variable z=3" gdb_test "print (x ? y : z)" "\[0-9\]* = 2" \ - "print value of cond expr (var true)" + "print value of cond expr, var true" gdb_test_no_output "set variable x=0" "set variable x=0" gdb_test "print (x ? y : z)" "\[0-9\]* = 3" \ - "print value of cond expr (var false)" + "print value of cond expr, var false" gdb_test "whatis (0 ? 3 : 4)" "type = int" \ "print whatis of cond expr" diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 28b723e..79363c5 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -195,7 +195,7 @@ gdb_test "x/wx buf3" "$hex:\[ \t\]+0x00000000" \ # test reinit_frame_cache gdb_load ${binfile} -gdb_test "up" "#\[0-9\]* *(\[0-9xa-fH'\]* in)? .* \\(.*\\).*" "up (reinit)" +gdb_test "up" "#\[0-9\]* *(\[0-9xa-fH'\]* in)? .* \\(.*\\).*" "up, reinit" gdb_test "core" "No core file now." diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp index fd15efe..439bf71 100644 --- a/gdb/testsuite/gdb.base/cvexpr.exp +++ b/gdb/testsuite/gdb.base/cvexpr.exp @@ -47,55 +47,55 @@ proc do_test {dir options} { gdb_test "whatis (const char) v_char" \ "type = const char" \ - "(const char)" + "cast to const char" gdb_test "whatis (const signed char) v_signed_char" \ "type = const signed char" \ - "(const signed char)" + "cast to const signed char" gdb_test "whatis (const unsigned char) v_unsigned_char" \ "type = const (unsigned char|char)" \ - "(const unsigned char)" + "cast to const unsigned char" gdb_test "whatis (const short) v_short" \ "type = const (short|short int)" \ - "(const short)" + "cast to const short" gdb_test "whatis (const signed short) v_signed_short" \ "type = const (short|short int|signed short|signed short int)" \ - "(const signed short)" + "cast to const signed short" gdb_test "whatis (const unsigned short) v_unsigned_short" \ "type = const (unsigned short|short unsigned int)" \ - "(const unsigned short)" + "cast to const unsigned short" gdb_test "whatis (const int) v_int" \ "type = const int" \ - "(const int)" + "cast to const int" gdb_test "whatis (const signed int) v_signed_int" \ "type = const (signed int|int)" \ - "(const signed int)" + "cast to const signed int" gdb_test "whatis (const unsigned int) v_unsigned_int" \ "type = const unsigned int" \ - "(const unsigned int)" + "cast to const unsigned int" gdb_test "whatis (const long) v_long" \ "type = const (long|long int)" \ - "(const long)" + "cast to const long" gdb_test "whatis (const signed long) v_signed_long" \ "type = const (signed |)long( int|)" \ - "(const signed long)" + "cast to const signed long" gdb_test "whatis (const unsigned long) v_unsigned_long" \ "type = const (unsigned long|long unsigned int)" \ - "(const unsigned long)" + "cast to const unsigned long" gdb_test "whatis (const long long) v_long_long" \ "type = const long long( int|)" \ - "(const long long)" + "cast to const long long" gdb_test "whatis (const signed long long) v_signed_long_long" \ "type = const (signed |)long long( int|)" \ - "(const signed long long)" + "cast to const signed long long" gdb_test "whatis (const unsigned long long) v_unsigned_long_long" \ "type = const (unsigned long long|long long unsigned int)" \ - "(const unsigned long long)" + "cast to const unsigned long long" gdb_test "whatis (const float) v_float" \ "type = const float" \ - "(const float)" + "cast to const float" gdb_test "whatis (const double) v_double" \ "type = const double" \ - "(const double)" + "cast to const double" # # Test casting a scalar to volatile @@ -103,55 +103,55 @@ proc do_test {dir options} { gdb_test "whatis (volatile char) v_char" \ "type = volatile char" \ - "(volatile char)" + "cast to volatile char" gdb_test "whatis (volatile signed char) v_signed_char" \ "type = volatile signed char" \ - "(volatile signed char)" + "cast to volatile signed char" gdb_test "whatis (volatile unsigned char) v_unsigned_char" \ "type = volatile (unsigned char|char)" \ - "(volatile unsigned char)" + "cast to volatile unsigned char" gdb_test "whatis (volatile short) v_short" \ "type = volatile (short|short int)" \ - "(volatile short)" + "cast to volatile short" gdb_test "whatis (volatile signed short) v_signed_short" \ "type = volatile (short|short int|signed short|signed short int)" \ - "(volatile signed short)" + "cast to volatile signed short" gdb_test "whatis (volatile unsigned short) v_unsigned_short" \ "type = volatile (unsigned short|short unsigned int)" \ - "(volatile unsigned short)" + "cast to volatile unsigned short" gdb_test "whatis (volatile int) v_int" \ "type = volatile int" \ - "(volatile int)" + "cast to volatile int" gdb_test "whatis (volatile signed int) v_signed_int" \ "type = volatile (signed int|int)" \ - "(volatile signed int)" + "cast to volatile signed int" gdb_test "whatis (volatile unsigned int) v_unsigned_int" \ "type = volatile unsigned int" \ - "(volatile unsigned int)" + "cast to volatile unsigned int" gdb_test "whatis (volatile long) v_long" \ "type = volatile (long|long int)" \ - "(volatile long)" + "cast to volatile long" gdb_test "whatis (volatile signed long) v_signed_long" \ "type = volatile (signed |)long( int|)" \ - "(volatile signed long)" + "cast to volatile signed long" gdb_test "whatis (volatile unsigned long) v_unsigned_long" \ "type = volatile (unsigned long|long unsigned int)" \ - "(volatile unsigned long)" + "cast to volatile unsigned long" gdb_test "whatis (volatile long long) v_long_long" \ "type = volatile long long( int|)" \ - "(volatile long long)" + "cast to volatile long long" gdb_test "whatis (volatile signed long long) v_signed_long_long" \ "type = volatile (signed |)long long( int|)" \ - "(volatile signed long long)" + "cast to volatile signed long long" gdb_test "whatis (volatile unsigned long long) v_unsigned_long_long" \ "type = volatile (unsigned long long|long long unsigned int)" \ - "(volatile unsigned long long)" + "cast to volatile unsigned long long" gdb_test "whatis (volatile float) v_float" \ "type = volatile float" \ - "(volatile float)" + "cast to volatile float" gdb_test "whatis (volatile double) v_double" \ "type = volatile double" \ - "(volatile double)" + "cast to volatile double" # # Combine const and volatile @@ -159,47 +159,47 @@ proc do_test {dir options} { gdb_test "whatis (const volatile int) v_int" \ "type = const volatile int" \ - "(const volatile int)" + "cast to const volatile int" gdb_test "whatis (volatile const int) v_int" \ "type = const volatile int" \ - "(volatile const int)" + "cast to volatile const int" gdb_test "whatis (const int volatile) v_int" \ "type = const volatile int" \ - "(const int volatile)" + "cast to const int volatile" gdb_test "whatis (volatile int const) v_int" \ "type = const volatile int" \ - "(volatile int const)" + "cast to volatile int const" gdb_test "whatis (int const volatile) v_int" \ "type = const volatile int" \ - "(int const volatile)" + "cast to int const volatile" gdb_test "whatis (int volatile const) v_int" \ "type = const volatile int" \ - "(int volatile const)" + "cast to int volatile const" gdb_test "whatis (const volatile int *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(const volatile int *)" + "cast to const volatile int *" gdb_test "whatis (volatile const int *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(volatile const int *)" + "cast to volatile const int *" gdb_test "whatis (const int volatile *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(const int volatile *)" + "cast to const int volatile *" gdb_test "whatis (volatile int const *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(volatile int const *)" + "cast to volatile int const *" gdb_test "whatis (int const volatile *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(int const volatile *)" + "cast to int const volatile *" gdb_test "whatis (int volatile const *) v_int_pointer" \ "type = const volatile int${ws}\\*" \ - "(int volatile const *)" + "cast to int volatile const *" gdb_test "whatis (int * const volatile) v_int_pointer" \ "type = int${ws}\\*${ws}const volatile" \ - "(int * const volatile)" + "cast to int * const volatile" gdb_test "whatis (int * volatile const) v_int_pointer" \ "type = int${ws}\\*${ws}const volatile" \ - "(int * volatile const)" + "cast to int * volatile const" # @@ -208,65 +208,65 @@ proc do_test {dir options} { #gdb_test "whatis (signed const char) v_signed_char" \ # "type = const char" \ - # "(signed const char)" + # "cast to signed const char" #gdb_test "whatis (unsigned const char) v_unsigned_char" \ # "type = const (unsigned char|char)" \ - # "(unsigned const char)" + # "cast to unsigned const char" #gdb_test "whatis (signed const short) v_signed_short" \ # "type = const (short|short int|signed short|signed short int)" \ - # "(signed const short)" + # "cast to signed const short" #gdb_test "whatis (unsigned const short) v_unsigned_short" \ # "type = const (unsigned short|short unsigned int)" \ - # "(unsigned const short)" + # "cast to unsigned const short" #gdb_test "whatis (signed const int) v_signed_int" \ # "type = const (signed int|int)" \ - # "(signed const int)" + # "cast to signed const int" #gdb_test "whatis (unsigned const int) v_unsigned_int" \ # "type = const unsigned int" \ - # "(unsigned const int)" + # "cast to unsigned const int" #gdb_test "whatis (signed const long) v_signed_long" \ # "type = const (signed |)long( int|)" \ - # "(signed const long)" + # "cast to signed const long" #gdb_test "whatis (unsigned const long) v_unsigned_long" \ # "type = const (unsigned long|long unsigned int)" \ - # "(unsigned const long)" + # "cast to unsigned const long" #gdb_test "whatis (signed const long long) v_signed_long_long" \ # "type = const (signed |)long long( int|)" \ - # "(signed const long long)" + # "cast to signed const long long" #gdb_test "whatis (unsigned const long long) v_unsigned_long_long" \ # "type = const (unsigned long long|long long unsigned int)" \ - # "(const unsigned long long)" + # "cast to const unsigned long long" #gdb_test "whatis (signed volatile char) v_signed_char" \ # "type = volatile char" \ - # "(signed volatile char)" + # "cast to signed volatile char" #gdb_test "whatis (unsigned volatile char) v_unsigned_char" \ # "type = volatile (unsigned char|char)" \ - # "(unsigned volatile char)" + # "cast to unsigned volatile char" #gdb_test "whatis (signed volatile short) v_signed_short" \ # "type = volatile (short|short int|signed short|signed short int)" \ - # "(signed volatile short)" + # "cast to signed volatile short" #gdb_test "whatis (unsigned volatile short) v_unsigned_short" \ # "type = volatile (unsigned short|short unsigned int)" \ - # "(unsigned volatile short)" + # "cast to unsigned volatile short" #gdb_test "whatis (signed volatile int) v_signed_int" \ # "type = volatile (signed int|int)" \ - # "(signed volatile int)" + # "cast to signed volatile int" #gdb_test "whatis (unsigned volatile int) v_unsigned_int" \ # "type = volatile unsigned int" \ - # "(unsigned volatile int)" + # "cast to unsigned volatile int" #gdb_test "whatis (signed volatile long) v_signed_long" \ # "type = volatile (signed |)long( int|)" \ - # "(signed volatile long)" + # "cast to signed volatile long" #gdb_test "whatis (unsigned volatile long) v_unsigned_long" \ # "type = volatile (unsigned long|long unsigned int)" \ - # "(unsigned volatile long)" + # "cast to unsigned volatile long" #gdb_test "whatis (signed volatile long long) v_signed_long_long" \ # "type = volatile (signed |)long long( int|)" \ - # "(signed volatile long long)" + # "cast to signed volatile long long" #gdb_test "whatis (unsigned volatile long long) v_unsigned_long_long" \ # "type = volatile (unsigned long long|long long unsigned int)" \ - # "(unsigned volatile long long)" + # "cast to unsigned volatile long long" # # Now put the 'const' and 'volatile' keywords after the base type. @@ -274,107 +274,107 @@ proc do_test {dir options} { gdb_test "whatis (char const) v_char" \ "type = const char" \ - "(char const)" + "cast to char const" gdb_test "whatis (signed char const) v_signed_char" \ "type = const signed char" \ - "(signed char const)" + "cast to signed char const" gdb_test "whatis (unsigned char const) v_unsigned_char" \ "type = const (unsigned char|char)" \ - "(unsigned char const)" + "cast to unsigned char const" gdb_test "whatis (short const) v_short" \ "type = const (short|short int)" \ - "(short const)" + "cast to short const" gdb_test "whatis (signed short const) v_signed_short" \ "type = const (short|short int|signed short|signed short int)" \ - "(signed short const)" + "cast to signed short const" gdb_test "whatis (unsigned short const) v_unsigned_short" \ "type = const (unsigned short|short unsigned int)" \ - "(unsigned short const)" + "cast to unsigned short const" gdb_test "whatis (int const) v_int" \ "type = const int" \ - "(int const)" + "cast to int const" gdb_test "whatis (signed int const) v_signed_int" \ "type = const (signed int|int)" \ - "(signed int const)" + "cast to signed int const" gdb_test "whatis (unsigned int const) v_unsigned_int" \ "type = const unsigned int" \ - "(unsigned int const)" + "cast to unsigned int const" gdb_test "whatis (long const) v_long" \ "type = const (long|long int)" \ - "(long const)" + "cast to long const" gdb_test "whatis (signed long const) v_signed_long" \ "type = const (signed |)long( int|)" \ - "(signed long const)" + "cast to signed long const" gdb_test "whatis (unsigned long const) v_unsigned_long" \ "type = const (unsigned long|long unsigned int)" \ - "(unsigned long const)" + "cast to unsigned long const" gdb_test "whatis (long long const) v_long_long" \ "type = const long long( int|)" \ - "(long long const)" + "cast to long long const" gdb_test "whatis (signed long long const) v_signed_long_long" \ "type = const (signed |)long long( int|)" \ - "(signed long long const)" + "cast to signed long long const" gdb_test "whatis (unsigned long long const) v_unsigned_long_long" \ "type = const (unsigned long long|long long unsigned int)" \ - "(unsigned long long const)" + "cast to unsigned long long const" gdb_test "whatis (float const) v_float" \ "type = const float" \ - "(float const)" + "cast to float const" gdb_test "whatis (double const) v_double" \ "type = const double" \ - "(double const)" + "cast to double const" gdb_test "whatis (char volatile) v_char" \ "type = volatile char" \ - "(char volatile)" + "cast to char volatile" gdb_test "whatis (signed char volatile) v_signed_char" \ "type = volatile signed char" \ - "(signed char volatile)" + "cast to signed char volatile" gdb_test "whatis (unsigned char volatile) v_unsigned_char" \ "type = volatile (unsigned char|char)" \ - "(unsigned char volatile)" + "cast to unsigned char volatile" gdb_test "whatis (short volatile) v_short" \ "type = volatile (short|short int)" \ - "(short volatile)" + "cast to short volatile" gdb_test "whatis (signed short volatile) v_signed_short" \ "type = volatile (short|short int|signed short|signed short int)" \ - "(signed short volatile)" + "cast to signed short volatile" gdb_test "whatis (unsigned short volatile) v_unsigned_short" \ "type = volatile (unsigned short|short unsigned int)" \ - "(unsigned short volatile)" + "cast to unsigned short volatile" gdb_test "whatis (int volatile) v_int" \ "type = volatile int" \ - "(int volatile)" + "cast to int volatile" gdb_test "whatis (signed int volatile) v_signed_int" \ "type = volatile (signed int|int)" \ - "(signed int volatile)" + "cast to signed int volatile" gdb_test "whatis (unsigned int volatile) v_unsigned_int" \ "type = volatile unsigned int" \ - "(unsigned int volatile)" + "cast to unsigned int volatile" gdb_test "whatis (long volatile) v_long" \ "type = volatile (long|long int)" \ - "(long volatile)" + "cast to long volatile" gdb_test "whatis (signed long volatile) v_signed_long" \ "type = volatile (signed |)long( int|)" \ - "(signed long volatile)" + "cast to signed long volatile" gdb_test "whatis (unsigned long volatile) v_unsigned_long" \ "type = volatile (unsigned long|long unsigned int)" \ - "(unsigned long volatile)" + "cast to unsigned long volatile" gdb_test "whatis (long long volatile) v_long_long" \ "type = volatile long long( int|)" \ - "(long long volatile)" + "cast to long long volatile" gdb_test "whatis (signed long long volatile) v_signed_long_long" \ "type = volatile (signed |)long long( int|)" \ - "(signed long long volatile)" + "cast to signed long long volatile" gdb_test "whatis (unsigned long long volatile) v_unsigned_long_long" \ "type = volatile (unsigned long long|long long unsigned int)" \ - "(unsigned long long volatile)" + "cast to unsigned long long volatile" gdb_test "whatis (float volatile) v_float" \ "type = volatile float" \ - "(float volatile)" + "cast to float volatile" gdb_test "whatis (double volatile) v_double" \ "type = volatile double" \ - "(double volatile)" + "cast to double volatile" # # enums @@ -382,16 +382,16 @@ proc do_test {dir options} { gdb_test "whatis (const enum misordered) v_misordered" \ "type = const enum misordered" \ - "(const enum misordered)" + "cast to const enum misordered" gdb_test "whatis (enum misordered const) v_misordered" \ "type = const enum misordered" \ - "(enum misordered const)" + "cast to enum misordered const" gdb_test "whatis (volatile enum misordered) v_misordered" \ "type = volatile enum misordered" \ - "(volatile enum misordered)" + "cast to volatile enum misordered" gdb_test "whatis (enum misordered volatile) v_misordered" \ "type = volatile enum misordered" \ - "(enum misordered volatile)" + "cast to enum misordered volatile" # # Pointers @@ -399,41 +399,41 @@ proc do_test {dir options} { gdb_test "whatis (const int *) v_int_pointer" \ "type = const int${ws}\\*" \ - "(const int *)" + "cast to const int *" gdb_test "whatis (int const *) v_int_pointer" \ "type = const int${ws}\\*" \ - "(int const *)" + "cast to int const *" gdb_test "whatis (int * const) v_int_pointer" \ "type = int \\*${ws}const" \ - "(int * const)" + "cast to int * const" gdb_test "whatis (const int * const) v_int_pointer" \ "type = const int${ws}\\*${ws}const" \ - "(const int * const)" + "cast to const int * const" gdb_test "whatis (int const * const) v_int_pointer" \ "type = const int${ws}\\*${ws}const" \ - "(int const * const)" + "cast to int const * const" gdb_test "whatis (const int **) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}\\*" \ - "(const int **)" + "cast to const int **" gdb_test "whatis (int const **) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}\\*" \ - "(int const **)" + "cast to int const **" gdb_test "whatis (int ** const) v_int_pointer_pointer" \ "type = int \\*${ws}\\*${ws}const" \ - "(int ** const)" + "cast to int ** const" gdb_test "whatis (const int * const *) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}const${ws}\\*" \ - "(const int * const *)" + "cast to const int * const *" gdb_test "whatis (int const * const *) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}const${ws}\\*" \ - "(int const * const *)" + "cast to int const * const *" gdb_test "whatis (const int * const * const) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}const${ws}\\*${ws}const" \ - "(const int * const * const)" + "cast to const int * const * const" gdb_test "whatis (int const * const * const) v_int_pointer_pointer" \ "type = const int${ws}\\*${ws}const${ws}\\*${ws}const" \ - "(int const * const * const)" + "cast to int const * const * const" # # Arrays TODO @@ -449,46 +449,46 @@ proc do_test {dir options} { gdb_test "whatis (const struct t_struct) v_struct1" \ "type = const struct t_struct" \ - "(const struct t_struct)" + "cast to const struct t_struct" gdb_test "whatis (const union t_union) v_union" \ "type = const union t_union" \ - "(const union t_union)" + "cast to const union t_union" gdb_test "whatis (struct t_struct const) v_struct1" \ "type = const struct t_struct" \ - "(struct t_struct const)" + "cast to struct t_struct const" gdb_test "whatis (union t_union const) v_union" \ "type = const union t_union" \ - "(union t_union const)" + "cast to union t_union const" gdb_test "whatis (const struct t_struct *) &v_struct1" \ "type = const struct t_struct${ws}\\*" \ - "(const struct t_struct *)" + "cast to const struct t_struct *" gdb_test "whatis (const union t_union *) &v_union" \ "type = const union t_union${ws}\\*" \ - "(const union t_union *)" + "cast to const union t_union *" gdb_test "whatis (struct t_struct const *) &v_struct1" \ "type = const struct t_struct${ws}\\*" \ - "(struct t_struct const *)" + "cast to struct t_struct const *" gdb_test "whatis (union t_union const *) &v_union" \ "type = const union t_union${ws}\\*" \ - "(union t_union const *)" + "cast to union t_union const *" gdb_test "whatis (struct t_struct * const) &v_struct1" \ "type = struct t_struct${ws}\\*${ws}const" \ - "(struct t_struct * const)" + "cast to struct t_struct * const" gdb_test "whatis (union t_union * const) &v_union" \ "type = union t_union${ws}\\*${ws}const" \ - "(union t_union * const)" + "cast to union t_union * const" gdb_test "whatis (const struct t_struct * const) &v_struct1" \ "type = const struct t_struct${ws}\\*${ws}const" \ - "(const struct t_struct * const)" + "cast to const struct t_struct * const" gdb_test "whatis (const union t_union * const) &v_union" \ "type = const union t_union${ws}\\*${ws}const" \ - "(const union t_union * const)" + "cast to const union t_union * const" gdb_test "whatis (struct t_struct const * const) &v_struct1" \ "type = const struct t_struct${ws}\\*${ws}const" \ - "(struct t_struct const * const)" + "cast to struct t_struct const * const" gdb_test "whatis (union t_union const * const) &v_union" \ "type = const union t_union${ws}\\*${ws}const" \ - "(union t_union const * const)" + "cast to union t_union const * const" # # Function pointers TODO diff --git a/gdb/testsuite/gdb.base/eval-skip.exp b/gdb/testsuite/gdb.base/eval-skip.exp index 7b28513..e8f766e 100644 --- a/gdb/testsuite/gdb.base/eval-skip.exp +++ b/gdb/testsuite/gdb.base/eval-skip.exp @@ -54,86 +54,63 @@ gdb_test_no_output "set variable y=2" "set variable y=2" gdb_test_no_output "set variable z=2" "set variable z=2" gdb_test_no_output "set variable w=3" "set variable w=3" -gdb_test "print (0 && (x+y))" ".$decimal = $false" \ - "print value of (0 && (x+y))" +proc test { val re } { + gdb_test "print $val" $re "print value of $val value" +} + +test "(0 && (x+y))" ".$decimal = $false" -gdb_test "print (0 && (x-y))" ".$decimal = $false" \ - "print value of (0 && (x-y))" +test "(0 && (x-y))" ".$decimal = $false" -gdb_test "print (0 && (x*y))" ".$decimal = $false" \ - "print value of (0 && (x*y))" +test "(0 && (x*y))" ".$decimal = $false" -gdb_test "print (0 && (x/y))" ".$decimal = $false" \ - "print value of (0 && (x/y))" +test "(0 && (x/y))" ".$decimal = $false" -gdb_test "print (0 && (x%y))" ".$decimal = $false" \ - "print value of (0 && (x%y))" +test "(0 && (x%y))" ".$decimal = $false" -gdb_test "print (0 && (x&&y))" ".$decimal = $false" \ - "print value of (0 && (x&&y))" +test "(0 && (x&&y))" ".$decimal = $false" -gdb_test "print (0 && (x||y))" ".$decimal = $false" \ - "print value of (0 && (x||y))" +test "(0 && (x||y))" ".$decimal = $false" -gdb_test "print (0 && (x&y))" ".$decimal = $false" \ - "print value of (0 && (x&y))" +test "(0 && (x&y))" ".$decimal = $false" -gdb_test "print (0 && (x|y))" ".$decimal = $false" \ - "print value of (0 && (x|y))" +test "(0 && (x|y))" ".$decimal = $false" -gdb_test "print (0 && (x^y))" ".$decimal = $false" \ - "print value of (0 && (x^y))" +test "(0 && (x^y))" ".$decimal = $false" -gdb_test "print (0 && (x < y))" ".$decimal = $false" \ - "print value of (0 && (x < y))" +test "(0 && (x < y))" ".$decimal = $false" -gdb_test "print (0 && (x <= y))" ".$decimal = $false" \ - "print value of (0 && (x <= y))" +test "(0 && (x <= y))" ".$decimal = $false" -gdb_test "print (0 && (x>y))" ".$decimal = $false" \ - "print value of (0 && (x>y))" +test "(0 && (x>y))" ".$decimal = $false" -gdb_test "print (0 && (x>=y))" ".$decimal = $false" \ - "print value of (0 && (x>=y))" +test "(0 && (x>=y))" ".$decimal = $false" -gdb_test "print (0 && (x==y))" ".$decimal = $false" \ - "print value of (0 && (x==y))" +test "(0 && (x==y))" ".$decimal = $false" -gdb_test "print (0 && (x!=y))" ".$decimal = $false" \ - "print value of (0 && (x!=y))" +test "(0 && (x!=y))" ".$decimal = $false" -gdb_test "print (0 && (x<<31))" ".$decimal = $false" \ - "print value of (0 && (x<<31))" +test "(0 && (x<<31))" ".$decimal = $false" -gdb_test "print (0 && (x>>31))" ".$decimal = $false" \ - "print value of (0 && (x>>31))" +test "(0 && (x>>31))" ".$decimal = $false" -gdb_test "print (0 && (!x))" ".$decimal = $false" \ - "print value of (0 && (!x))" +test "(0 && (!x))" ".$decimal = $false" -gdb_test "print (0 && (~x))" ".$decimal = $false" \ - "print value of (0 && (~x))" +test "(0 && (~x))" ".$decimal = $false" -gdb_test "print (0 && (-x))" ".$decimal = $false" \ - "print value of (0 && (-x))" +test "(0 && (-x))" ".$decimal = $false" -gdb_test "print (0 && (x++))" ".$decimal = $false" \ - "print value of (0 && (x++))" +test "(0 && (x++))" ".$decimal = $false" -gdb_test "print (0 && (++x))" ".$decimal = $false" \ - "print value of (0 && (++x))" +test "(0 && (++x))" ".$decimal = $false" -gdb_test "print (0 && (x--))" ".$decimal = $false" \ - "print value of (0 && (x--))" +test "(0 && (x--))" ".$decimal = $false" -gdb_test "print (0 && (--x))" ".$decimal = $false" \ - "print value of (0 && (--x))" +test "(0 && (--x))" ".$decimal = $false" -gdb_test "print (0 && (x+=7))" ".$decimal = $false" \ - "print value of (0 && (x+=7))" +test "(0 && (x+=7))" ".$decimal = $false" -gdb_test "print (0 && (x=y))" ".$decimal = $false" \ - "print value of (0 && (x=y))" +test "(0 && (x=y))" ".$decimal = $false" gdb_exit diff --git a/gdb/testsuite/gdb.base/examine-backward.exp b/gdb/testsuite/gdb.base/examine-backward.exp index dcb1371..fe3d13e 100644 --- a/gdb/testsuite/gdb.base/examine-backward.exp +++ b/gdb/testsuite/gdb.base/examine-backward.exp @@ -172,17 +172,17 @@ with_test_prefix "char-width=1, print-max=20" { } gdb_test "x/-xb" "0x39" "take 1 char backward again" gdb_test "x/-s" "\"01234567890123456789\"\.\.\." \ - "take 1 string backward (1/6)" + "take 1 string backward, 1/6" gdb_test "x/-s" "\".+\"" \ - "take 1 string backward (2/6)" + "take 1 string backward, 2/6" gdb_test "x/-s" "\"\"" \ - "take 1 string backward (3/6)" + "take 1 string backward, 3/6" gdb_test "x/-s" "\"\"" \ - "take 1 string backward (4/6)" + "take 1 string backward, 4/6" gdb_test "x/-s" "\"GHIJKLMNOPQRSTUVWXYZ\"" \ - "take 1 string backward (5/6)" + "take 1 string backward, 5/6" gdb_test "x/-s" "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \ - "take 1 string backward (6/6)" + "take 1 string backward, 6/6" } with_test_prefix "char-width=2, print-max=20" { @@ -214,17 +214,17 @@ with_test_prefix "char-width=2, print-max=20" { } gdb_test "x/-xh" "0x0039" "take 1 char backward again" gdb_test "x/-sh" "u\"01234567890123456789\"\.\.\." \ - "take 1 string backward (1/6)" + "take 1 string backward, 1/6" gdb_test "x/-sh" "u\".+\"" \ - "take 1 string backward (2/6)" + "take 1 string backward, 2/6" gdb_test "x/-sh" "u\"\"" \ - "take 1 string backward (3/6)" + "take 1 string backward, 3/6" gdb_test "x/-sh" "u\"\"" \ - "take 1 string backward (4/6)" + "take 1 string backward, 4/6" gdb_test "x/-sh" "u\"GHIJKLMNOPQRSTUVWXYZ\"" \ - "take 1 string backward (5/6)" + "take 1 string backward, 5/6" gdb_test "x/-sh" "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \ - "take 1 string backward (6/6)" + "take 1 string backward, 6/6" } with_test_prefix "char-width=4, print-max=20" { @@ -256,17 +256,17 @@ with_test_prefix "char-width=4, print-max=20" { } gdb_test "x/-xw" "0x00000039" "take 1 char backward again" gdb_test "x/-sw" "U\"01234567890123456789\"\.\.\." \ - "take 1 string backward (1/6)" + "take 1 string backward, 1/6" gdb_test "x/-sw" "U\".+\"" \ - "take 1 string backward (2/6)" + "take 1 string backward, 2/6" gdb_test "x/-sw" "U\"\"" \ - "take 1 string backward (3/6)" + "take 1 string backward, 3/6" gdb_test "x/-sw" "U\"\"" \ - "take 1 string backward (4/6)" + "take 1 string backward, 4/6" gdb_test "x/-sw" "U\"GHIJKLMNOPQRSTUVWXYZ\"" \ - "take 1 string backward (5/6)" + "take 1 string backward, 5/6" gdb_test "x/-sw" "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \ - "take 1 string backward (6/6)" + "take 1 string backward, 6/6" } with_test_prefix "char-width=2, print-max=0" { @@ -299,17 +299,17 @@ with_test_prefix "char-width=2, print-max=0" { } gdb_test "x/-xh" "0x0000" "take 1 char backward" gdb_test "x/-sh" "u\"!!!!!!\"" \ - "take 1 string backward (1/6)" + "take 1 string backward, 1/6" gdb_test "x/-sh" "u\"012345678901234567890123456789\"" \ - "take 1 string backward (2/6)" + "take 1 string backward, 2/6" gdb_test "x/-sh" "u\".+\"" \ - "take 1 string backward (3/6)" + "take 1 string backward, 3/6" gdb_test "x/-sh" "u\"\"" \ - "take 1 string backward (4/6)" + "take 1 string backward, 4/6" gdb_test "x/-sh" "u\"\"" \ - "take 1 string backward (5/6)" + "take 1 string backward, 5/6" gdb_test "x/-sh" "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" \ - "take 1 string backward (6/6)" + "take 1 string backward, 6/6" } with_test_prefix "char-width=1, print-max=4" { @@ -326,13 +326,13 @@ with_test_prefix "char-width=1, print-max=4" { "\"\"" } gdb_test "x/-xb" "0x00" "take 1 byte backward" - gdb_test_sequence "x/-4s" "take 4 strings backward (1/2)" { + gdb_test_sequence "x/-4s" "take 4 strings backward, 1/2" { "\"TUVW\"\.\.\." "\"XYZ\"" "\"\"" "\"\"" } - gdb_test_sequence "x/-4s" "take 4 strings backward (2/2)" { + gdb_test_sequence "x/-4s" "take 4 strings backward, 2/2" { "\"CDEF\"\.\.\." "\"GHIJ\"\.\.\." "\"KLMN\"\.\.\." @@ -348,9 +348,9 @@ with_test_prefix "backward disassemble general" { set main_re "main(\\(\\))?" gdb_test "x/i main" "0x\[0-9a-fA-F\]+ <$main_re>:\t.*" \ - "move the current position to main (x/i)" + "move the current position to main, x/i" gdb_test "x/-i" "0x\[0-9a-fA-F\]+ <$main_re>:\t.*" \ - "move the current position to main (x/-i)" + "move the current position to main, x/-i" for {set i 0} {$i < [llength $length_to_examine]} {incr i} { set len [lindex $length_to_examine $i] set instructions [capture_command_output "x/${len}i" ""] diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp index 0f8c53b..375af6b 100644 --- a/gdb/testsuite/gdb.base/exprs.exp +++ b/gdb/testsuite/gdb.base/exprs.exp @@ -46,9 +46,9 @@ proc test_expr { args } { } set last_ent [expr [llength $args] - 1] set testname [lindex $args $last_ent] - gdb_test [lindex $args 0] ".*" "$testname (setup)" + gdb_test [lindex $args 0] ".*" "$testname, setup" for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} { - gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])" + gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname, [lindex $args $x]" } } # diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp index 4b01248..f31a775 100644 --- a/gdb/testsuite/gdb.base/fileio.exp +++ b/gdb/testsuite/gdb.base/fileio.exp @@ -149,23 +149,23 @@ gdb_test continue \ gdb_test continue \ "Continuing\\..*isatty 1:.*OK$stop_msg" \ -"Isatty (stdin)" +"Isatty, stdin" gdb_test continue \ "Continuing\\..*isatty 2:.*OK$stop_msg" \ -"Isatty (stdout)" +"Isatty, stdout" gdb_test continue \ "Continuing\\..*isatty 3:.*OK$stop_msg" \ -"Isatty (stderr)" +"Isatty, stderr" gdb_test continue \ "Continuing\\..*isatty 4:.*OK$stop_msg" \ -"Isatty (invalid fd)" +"Isatty, invalid fd" gdb_test continue \ "Continuing\\..*isatty 5:.*OK$stop_msg" \ -"Isatty (open file)" +"Isatty, open file" gdb_test_no_output "set debug remote 1" set msg "System says shell is not available" diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp index e162cdf..206e713 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp +++ b/gdb/testsuite/gdb.base/foll-exec.exp @@ -139,23 +139,23 @@ proc do_exec_tests {} { send_gdb "print global_i\n" gdb_expect { -re ".* = 0.*$gdb_prompt $"\ - {pass "print execd-program/global_i (after execlp)"} - -re "$gdb_prompt $" {fail "print execd-program/global_i (after execlp)"} - timeout {fail "(timeout) print execd-program/global_i (after execlp)"} + {pass "print execd-program/global_i, after execlp"} + -re "$gdb_prompt $" {fail "print execd-program/global_i, after execlp"} + timeout {fail "(timeout) print execd-program/global_i, after execlp"} } send_gdb "print local_j\n" gdb_expect { -re ".* = 2.*$gdb_prompt $"\ - {pass "print execd-program/local_j (after execlp)"} - -re "$gdb_prompt $" {fail "print execd-program/local_j (after execlp)"} - timeout {fail "(timeout) print execd-program/local_j (after execlp)"} + {pass "print execd-program/local_j, after execlp"} + -re "$gdb_prompt $" {fail "print execd-program/local_j, after execlp"} + timeout {fail "(timeout) print execd-program/local_j, after execlp"} } send_gdb "print local_k\n" gdb_expect { -re "No symbol \"local_k\" in current context.*$gdb_prompt $"\ - {pass "print follow-exec/local_k (after execlp)"} - -re "$gdb_prompt $" {fail "print follow-exec/local_k (after execlp)"} - timeout {fail "(timeout) print follow-exec/local_k (after execlp)"} + {pass "print follow-exec/local_k, after execlp"} + -re "$gdb_prompt $" {fail "print follow-exec/local_k, after execlp"} + timeout {fail "(timeout) print follow-exec/local_k, after execlp"} } # Explicitly kill this program, or a subsequent rerun actually runs @@ -288,9 +288,9 @@ proc do_exec_tests {} { send_gdb "print local_j\n" gdb_expect { -re ".* = 3.*$gdb_prompt $"\ - {pass "print execd-program/local_j (after execl)"} - -re "$gdb_prompt $" {fail "print execd-program/local_j (after execl)"} - timeout {fail "(timeout) print execd-program/local_j (after execl)"} + {pass "print execd-program/local_j, after execl"} + -re "$gdb_prompt $" {fail "print execd-program/local_j, after execl"} + timeout {fail "(timeout) print execd-program/local_j, after execl"} } # Explicitly kill this program, or a subsequent rerun actually runs @@ -349,9 +349,9 @@ proc do_exec_tests {} { send_gdb "print local_j\n" gdb_expect { -re ".* = 2.*$gdb_prompt $"\ - {pass "print execd-program/local_j (after execv)"} - -re "$gdb_prompt $" {fail "print execd-program/local_j (after execv)"} - timeout {fail "(timeout) print execd-program/local_j (after execv)"} + {pass "print execd-program/local_j, after execv"} + -re "$gdb_prompt $" {fail "print execd-program/local_j, after execv"} + timeout {fail "(timeout) print execd-program/local_j, after execv"} } # Explicitly kill this program, or a subsequent rerun actually runs diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp index 8f5735b..d22b363 100644 --- a/gdb/testsuite/gdb.base/hbreak2.exp +++ b/gdb/testsuite/gdb.base/hbreak2.exp @@ -150,7 +150,7 @@ delete_breakpoints # gdb_test "hbreak -q main" \ "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \ - "hardware breakpoint function (2)" + "hardware breakpoint function, 2" gdb_run_cmd gdb_test "" \ "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*" \ @@ -162,7 +162,7 @@ delete_breakpoints # gdb_test "hbreak $bp_location1" \ "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \ - "hardware breakpoint line number (2)" + "hardware breakpoint line number, 2" gdb_test "continue" \ "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \ "run until breakpoint set at a line number" @@ -173,7 +173,7 @@ delete_breakpoints # gdb_test "hbreak $srcfile:factorial" \ "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \ - "hardware breakpoint function in file (2)" + "hardware breakpoint function in file, 2" for {set i 6} {$i >= 1} {incr i -1} { gdb_test "continue" \ "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:$bp_location7.*$bp_location7\[\t \]+.*if .value > 1. \{.*" \ @@ -186,7 +186,7 @@ delete_breakpoints # gdb_test "hbreak \"marker2\"" \ "Hardware assisted breakpoint.*at.* file .*$srcfile1, line.*" \ - "hardware breakpoint quoted function (2)" + "hardware breakpoint quoted function, 2" gdb_test "continue" \ "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:$bp_location8.*" \ "run until quoted breakpoint" @@ -196,7 +196,7 @@ delete_breakpoints # gdb_test "hbreak $srcfile:$bp_location2" \ "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \ - "hardware breakpoint line number in file (2)" + "hardware breakpoint line number in file, 2" gdb_test "continue" \ "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location2.*$bp_location2\[\t \]+argc = \\(argc == 12345\\);.*" \ "run until file:linenum breakpoint" diff --git a/gdb/testsuite/gdb.base/history-duplicates.exp b/gdb/testsuite/gdb.base/history-duplicates.exp index b2f30e6..5ac4a35 100644 --- a/gdb/testsuite/gdb.base/history-duplicates.exp +++ b/gdb/testsuite/gdb.base/history-duplicates.exp @@ -46,7 +46,7 @@ proc run_print_on_each_thing { things } { set index 0 foreach thing $things { - gdb_test "print $thing" "" "printing $thing (item #$index)" + gdb_test "print $thing" "" "printing $thing, item #$index" incr index } } @@ -90,8 +90,8 @@ with_test_prefix "remove-duplicates=1" { check_prev_history_entry "print 1" check_prev_history_entry "print 2" check_prev_history_entry "print 0" - check_prev_history_entry "print 1" "(again)" - check_prev_history_entry "print 0" "(again)" + check_prev_history_entry "print 1" ", again" + check_prev_history_entry "print 0" ", again" } @@ -104,9 +104,9 @@ with_test_prefix "remove-duplicates=0" { run_print_on_each_thing { 0 0 1 1 } check_prev_history_entry "print 1" - check_prev_history_entry "print 1" "(again)" + check_prev_history_entry "print 1" ", again" check_prev_history_entry "print 0" - check_prev_history_entry "print 0" "(again)" + check_prev_history_entry "print 0" ", again" } diff --git a/gdb/testsuite/gdb.base/interact.exp b/gdb/testsuite/gdb.base/interact.exp index b7a30e0..5779efc 100644 --- a/gdb/testsuite/gdb.base/interact.exp +++ b/gdb/testsuite/gdb.base/interact.exp @@ -38,7 +38,7 @@ gdb_test "source $script" "$script_output" \ gdb_test "print 3" "= 3" "sanity check with interactive-mode auto" gdb_test "show interactive-mode" \ "Debugger's interactive mode is auto \\(currently .*\\)\\." \ - "show interactive-mode (auto)" + "show interactive-mode, auto" # Test sourcing of the script with interactive mode `on'. # Verify that evaluating the script does not cause an unexpected @@ -49,7 +49,7 @@ gdb_test "source $script" "$script_output" \ gdb_test "print 4" "= 4" "sanity check with interactive-mode on" gdb_test "show interactive-mode" \ "Debugger's interactive mode is on\\." \ - "show interactive-mode (on)" + "show interactive-mode, on" # Test sourcing of the script with interactive mode `off'. # Verify that evaluating the script does not cause an unexpected @@ -60,5 +60,5 @@ gdb_test "source $script" "$script_output" \ gdb_test "print 5" "= 5" "sanity check with interactive-mode off" gdb_test "show interactive-mode" \ "Debugger's interactive mode is off\\." \ - "show interactive-mode (off)" + "show interactive-mode, off" diff --git a/gdb/testsuite/gdb.base/opaque.exp b/gdb/testsuite/gdb.base/opaque.exp index 1bd1918..d803714 100644 --- a/gdb/testsuite/gdb.base/opaque.exp +++ b/gdb/testsuite/gdb.base/opaque.exp @@ -66,7 +66,7 @@ if {[istarget "rs6000-*-aix*"] && !$gcc_compiled} { setup_xfail_on_opaque_pointer gdb_test "whatis foop" \ "type = struct foo \[*\]+" \ - "whatis on opaque struct pointer (statically)" + "whatis on opaque struct pointer, statically" # Ensure that we know the form of the structure that foop points to. @@ -122,7 +122,7 @@ if ![runto_main] { setup_xfail_on_opaque_pointer gdb_test "whatis foop" \ "type = struct foo \[*\]+" \ - "whatis on opaque struct pointer (dynamically)" + "whatis on opaque struct pointer, dynamically" # Ensure that we know the form of the thing foop points to. @@ -131,18 +131,18 @@ setup_xfail_on_opaque_pointer if {!$gcc_compiled} { setup_xfail "rs6000-*-*" } gdb_test "ptype foop" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\} \[*\]+" \ - "ptype on opaque struct pointer (dynamically) 1" + "ptype on opaque struct pointer, dynamically 1" gdb_test "whatis afoo" \ "type = struct foo" \ - "whatis on opaque struct instance (dynamically) 1" + "whatis on opaque struct instance, dynamically 1" # Ensure that we know the form of afoo, an instance of a struct foo. gdb_test "ptype afoo" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ - "ptype on opaque struct instance (dynamically) 1" + "ptype on opaque struct instance, dynamically 1" # Ensure that we know the form of an explicit struct foo. @@ -150,7 +150,7 @@ gdb_test "ptype afoo" \ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" } gdb_test "ptype struct foo" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ - "ptype on opaque struct tagname (dynamically) 1" + "ptype on opaque struct tagname, dynamically 1" # Now reload the symbols again so we forget about anything we might @@ -170,7 +170,7 @@ if ![runto getfoo] { setup_xfail_on_opaque_pointer gdb_test "whatis foop" \ "type = struct foo \[*\]+" \ - "whatis on opaque struct pointer (dynamically) 1" + "whatis on opaque struct pointer, dynamically 1" # Ensure that we know the form of the thing foop points to. @@ -178,22 +178,22 @@ gdb_test "whatis foop" \ setup_xfail_on_opaque_pointer gdb_test "ptype foop" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\} \[*\]+" \ - "ptype on opaque struct pointer (dynamically) 2" + "ptype on opaque struct pointer, dynamically 2" gdb_test "whatis afoo" \ "type = struct foo" \ - "whatis on opaque struct instance (dynamically) 2" + "whatis on opaque struct instance, dynamically 2" # Ensure that we know the form of afoo, an instance of a struct foo. gdb_test "ptype afoo" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ - "ptype on opaque struct instance (dynamically) 2" + "ptype on opaque struct instance, dynamically 2" # Ensure that we know the form of an explicit struct foo. gdb_test "ptype struct foo" \ "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ - "ptype on opaque struct tagname (dynamically) 2" + "ptype on opaque struct tagname, dynamically 2" diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp index 737b0c4..5ee31d3 100644 --- a/gdb/testsuite/gdb.base/pending.exp +++ b/gdb/testsuite/gdb.base/pending.exp @@ -39,7 +39,7 @@ clean_restart gdb_test_multiple "break pendfunc1" "set pending breakpoint" { -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { - gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint (without symbols)" + gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint, without symbols" } } @@ -49,7 +49,7 @@ gdb_test "complete condition " "condition 1" gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \ -"single pending breakpoint info (without symbols)" +"single pending breakpoint info, without symbols" with_test_prefix "first load" { gdb_load ${binfile} diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 9132071a..40176c6 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -1186,7 +1186,7 @@ gdb_test_no_output "complete p -source" gdb_file_cmd ${binfile} -gdb_test "print \$pc" "No registers\\." "print \$pc (with file)" +gdb_test {print $pc} [string_to_regexp "No registers."] {print $pc, with file} gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp index f5f0760..01ba55a 100644 --- a/gdb/testsuite/gdb.base/recurse.exp +++ b/gdb/testsuite/gdb.base/recurse.exp @@ -52,15 +52,15 @@ proc recurse_tests {} { # Continue inward for a few iterations gdb_test "continue" "Breakpoint.* recurse \\(a=9\\).*" \ - "continue to recurse (a = 9)" + "continue to recurse, a = 9" gdb_test "continue" "Breakpoint.* recurse \\(a=8\\).*" \ - "continue to recurse (a = 8)" + "continue to recurse, a = 8" gdb_test "continue" "Breakpoint.* recurse \\(a=7\\).*" \ - "continue to recurse (a = 7)" + "continue to recurse, a = 7" gdb_test "continue" "Breakpoint.* recurse \\(a=6\\).*" \ - "continue to recurse (a = 6)" + "continue to recurse, a = 6" gdb_test "continue" "Breakpoint.* recurse \\(a=5\\).*" \ - "continue to recurse (a = 5)" + "continue to recurse, a = 5" # Put a watchpoint on another instance of b # First we need to step over the assignment of b, so it has a known @@ -76,13 +76,13 @@ proc recurse_tests {} { # Continue inward for a few iterations gdb_test "continue" "Breakpoint.* recurse \\(a=4\\).*" \ - "continue to recurse (a = 4)" + "continue to recurse, a = 4" gdb_test "continue" "Breakpoint.* recurse \\(a=3\\).*" \ - "continue to recurse (a = 3)" + "continue to recurse, a = 3" gdb_test "continue" "Breakpoint.* recurse \\(a=2\\).*" \ - "continue to recurse (a = 2)" + "continue to recurse, a = 2" gdb_test "continue" "Breakpoint.* recurse \\(a=1\\).*" \ - "continue to recurse (a = 1)" + "continue to recurse, a = 1" # Continue until second set of b (second instance). gdb_test "continue" \ diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index 9eb44b3..9380331 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -67,12 +67,12 @@ proc_with_prefix test_setshow_annotate {} { #test set annotate 1 gdb_test "set annotate 1" ".*post-prompt.*" - gdb_test "show annotate" "Annotation_level is 1..*" "show annotate (1)" + gdb_test "show annotate" "Annotation_level is 1..*" "show annotate, 1" #test annotation_level 1 gdb_test "info line 1" "Line 1 of .* is at address .* but contains no code.*:1:0:beg:0x.*" "annotation_level 1" #test set annotate 0 gdb_test_no_output "set annotate 0" "set annotate 0" - gdb_test "show annotate" "Annotation_level is 0..*" "show annotate (0)" + gdb_test "show annotate" "Annotation_level is 0..*" "show annotate, 0" #test annotation_level 0 gdb_test "info line 1" "Line 1 of .* is at address .* but contains no code.*" "annotation_level 0" } @@ -121,13 +121,13 @@ proc_with_prefix test_setshow_check {} { "_gdb_setting check range on" #test show check range on - gdb_test "show check range" "Range checking is \"on\"\..*" "show check range (on)" + gdb_test "show check range" "Range checking is \"on\"\..*" "show check range, on" #test set check range off with trailing space gdb_test_no_output "set check range off " "set check range off" #test show check range off - gdb_test "show check range" "Range checking is \"off\"\..*" "show check range (off)" + gdb_test "show check range" "Range checking is \"off\"\..*" "show check range, off" gdb_test "p \$_gdb_setting(\"check range\")" " = \"off\"" \ "_gdb_setting check range off" @@ -144,7 +144,7 @@ proc_with_prefix test_setshow_check {} { # Test show check type on gdb_test "show check type" "Strict type checking is on\..*" \ - "show check type (on)" + "show check type, on" gdb_test "p \$_gdb_setting_str(\"check type\")" " = \"on\"" \ "_gdb_setting_str check type on" gdb_test "p \$_gdb_setting(\"check type\")" " = 1" \ @@ -159,7 +159,7 @@ proc_with_prefix test_setshow_check {} { # Test show check type off gdb_test "show check type" "Strict type checking is off\..*" \ - "show check type (off)" + "show check type, off" } proc_with_prefix test_setshow_breakpoint_pending {} { @@ -200,11 +200,11 @@ proc_with_prefix test_setshow_complaints {} { #test set complaints 100 gdb_test_no_output "set complaints 100" "set complaints 100" #test show complaints 100 - gdb_test "show complaints" "Max number of complaints about incorrect symbols is 100..*" "show complaints (100)" + gdb_test "show complaints" "Max number of complaints about incorrect symbols is 100..*" "show complaints, 100" #test set complaints 0 gdb_test_no_output "set complaints 0" "set complaints 0" #test show complaints 0 - gdb_test "show complaints" "Max number of complaints about incorrect symbols is 0..*" "show complaints (0)" + gdb_test "show complaints" "Max number of complaints about incorrect symbols is 0..*" "show complaints, 0" } proc_with_prefix test_setshow_confirm {} { @@ -213,11 +213,11 @@ proc_with_prefix test_setshow_confirm {} { #test set confirm off gdb_test_no_output "set confirm off" "set confirm off" #test show confirm off - gdb_test "show confirm" "Whether to confirm potentially dangerous operations is off..*" "show confirm (off)" + gdb_test "show confirm" "Whether to confirm potentially dangerous operations is off..*" "show confirm, off" #test set confirm on gdb_test_no_output "set confirm on" "set confirm on" #test show confirm on - gdb_test "show confirm" "Whether to confirm potentially dangerous operations is on..*" "show confirm (on)" + gdb_test "show confirm" "Whether to confirm potentially dangerous operations is on..*" "show confirm, on" } proc_with_prefix test_setshow_editing {} { @@ -331,7 +331,7 @@ proc_with_prefix test_setshow_history {} { #test show history filename foobar.baz gdb_test "show history filename" \ "The filename in which to record the command history is \"[string_to_regexp $PWD]/foobar.baz\"..*" \ - "show history filename (current_directory/foobar.baz)" + "show history filename, current_directory/foobar.baz" #test set history save on gdb_test_no_output "set history save on" "set history save on" @@ -356,13 +356,13 @@ proc_with_prefix test_setshow_language {} { gdb_test_no_output "set language asm" #test show language asm - gdb_test "show language" "The current source language is \"asm\"..*" "show language (asm)" + gdb_test "show language" "The current source language is \"asm\"..*" "show language, asm" #test set language rust, with a trailing space gdb_test_no_output "set language rust " "set language rust" #test show language rust - gdb_test "show language" "The current source language is \"rust\"..*" "show language (rust)" + gdb_test "show language" "The current source language is \"rust\"..*" "show language, rust" #test completion for set language. gdb_test "complete set language min" "set language minimal" \ @@ -372,7 +372,7 @@ proc_with_prefix test_setshow_language {} { gdb_test_no_output "set language auto" "set language auto" #test show language - gdb_test "show language" "The current source language is \"auto.*\"..*" "show language (auto)" + gdb_test "show language" "The current source language is \"auto.*\"..*" "show language, auto" } proc_with_prefix test_setshow_listsize {} { @@ -447,13 +447,13 @@ proc_with_prefix test_setshow_radix {} { gdb_test "set radix 16" "Input and output radices now set to decimal 16, hex 10, octal 20..*" #test show radix 16 - gdb_test "show radix" "Input and output radices set to decimal 16, hex 10, octal 20..*" "show radix (16)" + gdb_test "show radix" "Input and output radices set to decimal 16, hex 10, octal 20..*" "show radix, 16" #test set radix 10 gdb_test "set radix" "Input and output radices now set to decimal 10, hex a, octal 12..*" "set radix 10" #test show radix 10 - gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12..*" "show radix (10)" + gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12..*" "show radix, 10" } proc_with_prefix test_setshow_width {} { @@ -492,13 +492,13 @@ proc_with_prefix test_setshow_verbose {} { gdb_test_no_output "set verbose on" "set verbose on" #test show verbose on - gdb_test "show verbose" "Verbose printing of informational messages is on..*" "show verbose (on)" + gdb_test "show verbose" "Verbose printing of informational messages is on..*" "show verbose, on" #test set verbose off gdb_test_no_output "set verbose off" "set verbose off" #test show verbose off - gdb_test "show verbose" "Verbosity is off..*" "show verbose (off)" + gdb_test "show verbose" "Verbosity is off..*" "show verbose, off" } proc_with_prefix test_argument_preceded_by_space {} { diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp index 9ac2402..416dcc6 100644 --- a/gdb/testsuite/gdb.base/setvar.exp +++ b/gdb/testsuite/gdb.base/setvar.exp @@ -390,13 +390,13 @@ set timeout $prev_timeout if {[is_c_compiler_gcc]} { gdb_test "print sef.field=sm1" ".*.\[0-9\]* = sm1" - gdb_test "print sef.field" ".*.\[0-9\]* = sm1" "print sef.field (sm1)" + gdb_test "print sef.field" ".*.\[0-9\]* = sm1" "print sef.field, sm1" gdb_test "print sef.field=s1" ".*.\[0-9\]* = s1" - gdb_test "print sef.field" ".*.\[0-9\]* = s1" "print sef.field (s1)" + gdb_test "print sef.field" ".*.\[0-9\]* = s1" "print sef.field, s1" gdb_test "print uef.field=u2" ".*.\[0-9\]* = u2" - gdb_test "print uef.field" ".*.\[0-9\]* = u2" "print uef.field (u2)" + gdb_test "print uef.field" ".*.\[0-9\]* = u2" "print uef.field, u2" gdb_test "print uef.field=u1" ".*.\[0-9\]* = u1" - gdb_test "print uef.field" ".*.\[0-9\]* = u1" "print uef.field (u1)" + gdb_test "print uef.field" ".*.\[0-9\]* = u1" "print uef.field, u1" # Test for truncation when assigning invalid values to bitfields. gdb_test "print sef.field=7" \ diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp index d3936bb..ccc7ca3 100644 --- a/gdb/testsuite/gdb.base/skip.exp +++ b/gdb/testsuite/gdb.base/skip.exp @@ -31,9 +31,9 @@ set srcfile1 skip1.c # Right after we start gdb, there's no default file or function to skip. -gdb_test "skip file" "No default file now." "skip file (no default file)" +gdb_test "skip file" "No default file now." "skip file, no default file" gdb_test "skip function" "No default function now." -gdb_test "skip" "No default function now." "skip (no default function)" +gdb_test "skip" "No default function now." "skip, no default function" # Test elided args. @@ -59,8 +59,8 @@ gdb_test "info skip" "Not skipping any files or functions\." "info skip empty" # Create a skiplist entry for the current file and function. -gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file ($srcfile)" -gdb_test "skip" "Function main will be skipped when stepping\." "skip (main)" +gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file, $srcfile" +gdb_test "skip" "Function main will be skipped when stepping\." "skip, main" # Create a skiplist entry for a specified file and function. diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp index 5c27f29..c9c66f6 100644 --- a/gdb/testsuite/gdb.base/solib-display.exp +++ b/gdb/testsuite/gdb.base/solib-display.exp @@ -126,7 +126,7 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" { "1: \\(int\\) a_global = 41" \ "warning: .*b_global.*" \ "3: \\(int\\) c_global = 43" \ - ] "after rerun (2)" + ] "after rerun, 2" # Now verify that displays which are not in the shared library # are not cleared permaturely. diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp index 581046a..f038a04 100644 --- a/gdb/testsuite/gdb.base/solib-search.exp +++ b/gdb/testsuite/gdb.base/solib-search.exp @@ -108,9 +108,9 @@ proc test_backtrace { expect_fail } { set total_expected 5 if { $expect_fail } { - set testname "backtrace (with wrong libs)" + set testname "backtrace, with wrong libs" } else { - set testname "backtrace (with right libs)" + set testname "backtrace, with right libs" } # N.B. The order of the tests here is important. # We need to count each function in the backtrace, and expect matches @@ -137,7 +137,7 @@ proc test_backtrace { expect_fail } { exp_continue } -re "\[\r\n\]$gdb_prompt $" { - pass "$testname (data collection)" + pass "$testname, data collection" } } diff --git a/gdb/testsuite/gdb.base/step-break.exp b/gdb/testsuite/gdb.base/step-break.exp index da804e3..7dc0492 100644 --- a/gdb/testsuite/gdb.base/step-break.exp +++ b/gdb/testsuite/gdb.base/step-break.exp @@ -34,9 +34,9 @@ gdb_test "break $bp_location" \ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(\\) at .*$srcfile:$bp_location.*set breakpoint here.*" \ "run until breakpoint set at a line number" -gdb_test "next 2" ".*place2.*" "next 2 (1)" -gdb_test "next 2" ".*place3.*" "next 2 (2)" -gdb_test "next 2" ".*place2.*" "next 2 (3)" -gdb_test "next 2" ".*place3.*" "next 2 (4)" -gdb_test "next 2" ".*place2.*" "next 2 (5)" -gdb_test "next 2" ".*place3.*" "next 2 (6)" +gdb_test "next 2" ".*place2.*" "next 2, 1" +gdb_test "next 2" ".*place3.*" "next 2, 2" +gdb_test "next 2" ".*place2.*" "next 2, 3" +gdb_test "next 2" ".*place3.*" "next 2, 4" +gdb_test "next 2" ".*place2.*" "next 2, 5" +gdb_test "next 2" ".*place3.*" "next 2, 6" diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp index 8cacc09..c40b20f 100644 --- a/gdb/testsuite/gdb.base/step-over-syscall.exp +++ b/gdb/testsuite/gdb.base/step-over-syscall.exp @@ -99,13 +99,13 @@ proc setup { syscall } { gdb_test "break \*$syscall" "Breakpoint \[0-9\]* at .*" gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \ - "continue to $syscall (1st time)" + "continue to $syscall, 1st time" # Hit the breakpoint on $syscall for the first time. In this time, # we will let PLT resolution done, and the number single steps we will # do later will be reduced. gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \ - "continue to $syscall (2nd time)" + "continue to $syscall, 2nd time" # Hit the breakpoint on $syscall for the second time. In this time, # the address of syscall insn and next insn of syscall are recorded. @@ -236,7 +236,7 @@ proc step_over_syscall { syscall } { } gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \ - "continue to $syscall (3rd time)" + "continue to $syscall, 3rd time" # Hit the breakpoint on $syscall for the third time. In this time, we'll set # breakpoint on the syscall insn we recorded previously, and single step over it. diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.exp b/gdb/testsuite/gdb.base/vla-optimized-out.exp index a0762d5..b57e474 100644 --- a/gdb/testsuite/gdb.base/vla-optimized-out.exp +++ b/gdb/testsuite/gdb.base/vla-optimized-out.exp @@ -57,15 +57,15 @@ proc vla_optimized_out {exe_suffix options} { # that case to reply with 'no such vector element'. gdb_test "p a\[0\]" \ "(= <optimized out>|no such vector element)" \ - "print out of range element of vla (0)" + "print out of range element of vla, 0" gdb_test "p a\[6\]" \ "no such vector element" \ - "print out of range element of vla (6)" + "print out of range element of vla, 6" gdb_test "p a\[0xffffffff\]" \ "no such vector element" \ - "print out of range element of vla (0xffffffff)" + "print out of range element of vla, 0xffffffff" } set o1_sizeof_result "6" diff --git a/gdb/testsuite/gdb.base/vla-ptr.exp b/gdb/testsuite/gdb.base/vla-ptr.exp index a784c18..df1b8f0 100644 --- a/gdb/testsuite/gdb.base/vla-ptr.exp +++ b/gdb/testsuite/gdb.base/vla-ptr.exp @@ -29,13 +29,13 @@ set sizeof_int [get_sizeof "int" 4] # Check that VLA passed to function (pointer) points to the first element. gdb_breakpoint [gdb_get_line_number "foo_bp"] gdb_continue_to_breakpoint "foo_bp" -gdb_test "print vla_ptr" "\\\(int \\\*\\\) $hex" "print vla_ptr (foo)" -gdb_test "print *vla_ptr" " = 2" "print *vla_ptr (foo)" +gdb_test "print vla_ptr" "\\\(int \\\*\\\) $hex" "print vla_ptr, foo" +gdb_test "print *vla_ptr" " = 2" "print *vla_ptr, foo" gdb_breakpoint [gdb_get_line_number "bar_bp"] gdb_continue_to_breakpoint "bar_bp" -gdb_test "print vla_ptr" "\\\(int \\\*\\\) $hex" "print vla_ptr (bar)" -gdb_test "print *vla_ptr" " = 2" "print *vla_ptr (bar)" +gdb_test "print vla_ptr" "\\\(int \\\*\\\) $hex" "print vla_ptr, bar" +gdb_test "print *vla_ptr" " = 2" "print *vla_ptr, bar" gdb_breakpoint [gdb_get_line_number "vla_func_bp"] gdb_continue_to_breakpoint "vla_func_bp" diff --git a/gdb/testsuite/gdb.base/vla-sideeffect.exp b/gdb/testsuite/gdb.base/vla-sideeffect.exp index e17037d..8215ec2 100644 --- a/gdb/testsuite/gdb.base/vla-sideeffect.exp +++ b/gdb/testsuite/gdb.base/vla-sideeffect.exp @@ -52,30 +52,30 @@ gdb_test "print vla1\[0\]" " = 10" \ gdb_test "print sizeof (vla2\[i++\])" " = ${sizeof_vla}" gdb_test "print i" " = 1" \ - "print i - sizeof with side effects (1)" + "print i - sizeof with side effects, 1" gdb_test "print sizeof (vla2\[i++ + sizeof(j++)\])" " = ${sizeof_vla}" gdb_test "print i" " = 2" \ - "print i - sizeof with side effects (2)" + "print i - sizeof with side effects, 2" gdb_test "print j" " = 0" \ "print j - sizeof with no side effects" gdb_test "ptype vla2\[i++\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ - "print i - ptype with side effects (1)" + "print i - ptype with side effects, 1" gdb_test "ptype vla2\[i++ + sizeof(j++)\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ - "print i - ptype with side effects (2)" + "print i - ptype with side effects, 2" gdb_test "print j" " = 0" \ "print j - ptype with no side effects" gdb_test "whatis vla2\[i++\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ - "print i - whatis with side effects (1)" + "print i - whatis with side effects, 1" gdb_test "whatis vla2\[i++ + sizeof(j++)\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ - "print i - whatis with side effects (2)" + "print i - whatis with side effects, 2" gdb_test "print j" " = 0" \ "print j - whatis with no side effects" diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.base/watch-vfork.exp index 617a975..f7e268f 100644 --- a/gdb/testsuite/gdb.base/watch-vfork.exp +++ b/gdb/testsuite/gdb.base/watch-vfork.exp @@ -37,11 +37,11 @@ proc test_watchpoint_across_vfork { hw teststr } { gdb_test "watch global" \ "atchpoint .*: global" \ - "Watchpoint on global variable ($teststr)" + "Watchpoint on global variable, $teststr" gdb_test "continue" \ "atchpoint .*: global.*" \ - "Watchpoint triggers after vfork ($teststr)" + "Watchpoint triggers after vfork, $teststr" } if { [allow_hw_watchpoint_tests] } { diff --git a/gdb/testsuite/gdb.base/wchar.exp b/gdb/testsuite/gdb.base/wchar.exp index a4127fc..0fc97cf 100644 --- a/gdb/testsuite/gdb.base/wchar.exp +++ b/gdb/testsuite/gdb.base/wchar.exp @@ -60,15 +60,15 @@ gdb_test "print repeat_p" \ gdb_test_no_output "set print null on" gdb_test "print repeat" "= L\"A\", '$cent' <repeats 21 times>, \"B\"" \ - "print repeat (print null on)" + "print repeat, print null on" gdb_test_no_output "set print elements 3" gdb_test "print repeat" "= L\"A$cent$cent\"\.\.\." \ - "print repeat (print elements 3)" + "print repeat, print elements 3" gdb_test "print repeat_p" "= $hex L\"A$cent$cent\"\.\.\." \ - "print repeat_p (print elements 3)" + "print repeat_p, print elements 3" # From PR cli/14977, but here because it requires wchar_t. gdb_test "printf \"%ls\\n\", 0" "\\(null\\)" diff --git a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp index eb575b3..ebe009a 100644 --- a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp +++ b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp @@ -271,8 +271,11 @@ proc run_tests {lang} { if {([string match "v_*" $to] || (![string match "v_*" $from] && ![string match "*method" $from]) || [string match "*method" $to])} { - gdb_test "whatis ($to) $from" "syntax error.*" "whatis ($to) $from (syntax)" - gdb_test "ptype ($to) $from" "syntax error.*" "ptype ($to) $from (syntax)" + set cmd "whatis ($to) $from" + gdb_test $cmd "syntax error.*" "$cmd, syntax" + + set cmd "ptype ($to) $from" + gdb_test $cmd "syntax error.*" "$cmd, syntax" } elseif {([string match "*float*" $from] && [string match "*array*" $to]) || (!$float_ptr_same_size && ([string match "float*" $to] && [string match "*array*" $from] @@ -289,8 +292,11 @@ proc run_tests {lang} { || ([string match "*ftype2" $to] && [string match "*method" $from]) || ([string match "*method_ptr*" $to] && [string match "*method" $from]) || ([string match "*method_ptr*" $to] && [string match "*array*" $from])} { - gdb_test "whatis ($to) $from" "Invalid cast." "whatis ($to) $from (invalid)" - gdb_test "ptype ($to) $from" "Invalid cast." "ptype ($to) $from (invalid)" + set cmd "whatis ($to) $from" + gdb_test $cmd "Invalid cast." "$cmd, invalid" + + set cmd "ptype ($to) $from" + gdb_test $cmd "Invalid cast." "$cmd, invalid" } else { gdb_test "whatis ($to) $from" "type = [string_to_regexp $to]" gdb_test "ptype ($to) $from" "type = $ptype" |