diff options
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/break.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfwmall.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/corefile.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/default.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/restore.c | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/restore.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/selftest.exp | 5 |
9 files changed, 23 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c index 6acbf9b416c..7e5fb8e23f6 100644 --- a/gdb/testsuite/gdb.base/break.c +++ b/gdb/testsuite/gdb.base/break.c @@ -72,7 +72,7 @@ char *argv[], **envp; set_debug_traps(); breakpoint(); #endif - if (argc == 123456) { + if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ fprintf (stderr, "usage: factorial <number>\n"); return 1; } diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 1ce9683316a..397a255bd99 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -229,10 +229,8 @@ proc do_function_calls {} { "call inferior func with struct - returns int" gdb_test "p t_structs_l(struct_val1)" "= 51" \ "call inferior func with struct - returns long" - setup_xfail "i*86-*-*" gdb_test "p t_structs_f(struct_val1)" "= 2.12.*" \ "call inferior func with struct - returns float" - setup_xfail "i*86-*-*" gdb_test "p t_structs_d(struct_val1)" "= 9.87.*" \ "call inferior func with struct - returns double" gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?\"foo\"" \ diff --git a/gdb/testsuite/gdb.base/callfwmall.exp b/gdb/testsuite/gdb.base/callfwmall.exp index 7d7cf78adc0..16851e68d07 100644 --- a/gdb/testsuite/gdb.base/callfwmall.exp +++ b/gdb/testsuite/gdb.base/callfwmall.exp @@ -236,10 +236,8 @@ proc do_function_calls {} { "call inferior func with struct - returns int" gdb_test "p t_structs_l(struct_val1)" "= 51" \ "call inferior func with struct - returns long" - setup_xfail "i*86-*-*" gdb_test "p t_structs_f(struct_val1)" "= 2.12.*" \ "call inferior func with struct - returns float" - setup_xfail "i*86-*-*" gdb_test "p t_structs_d(struct_val1)" "= 9.87.*" \ "call inferior func with struct - returns double" gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?\"foo\"" \ diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 32f3f56b8ac..f998f886659 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -189,7 +189,7 @@ gdb_test "print func2::coremaker_local" "\\\$$decimal = {0, 1, 2, 3, 4}" # file correctly. I don't think the other tests do this. gdb_test "bt" "abort.*func2.*func1.*main.*" "backtrace in corefile.exp" -gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp" +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp" # Test ability to read mmap'd data diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index 528d5a99f55..f73a6d70431 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -304,6 +304,8 @@ if [istarget "arm-*-*"] then { gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float" } elseif [istarget "strongarm-*-*"] then { gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float" +} elseif [istarget "i\[3456\]86-*-linux-gnu"] then { + gdb_test "info float" "No registers." } else { gdb_test "info float" "No floating point info available for this processor." "info float" } diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index f319ba07c94..b9dad0a86f5 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -111,7 +111,7 @@ proc test_listsize {} { # Try just two lines if [ set_listsize 2 ] { - gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"" "list line 1 with listsize 2" + gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 1 with listsize 2" gdb_test "list 2" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 2 with listsize 2" gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+" "list line 3 with listsize 2" } @@ -119,18 +119,16 @@ proc test_listsize {} { # Try small listsize > 1 that is an odd number if [ set_listsize 3 ] { - setup_xfail "*-*-*" - gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"2\[ \t\]+" "list line 1 with listsize 3" + gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 1 with listsize 3" gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 2 with listsize 3" - gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[(\]+\[)\]+\r\n4\[ \t\]+\{" "list line 3 with listsize 3" } # Try small listsize > 2 that is an even number. if [ set_listsize 4 ] then { - gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 1 with listsize 4" - gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 2 with listsize 4" + gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4" + gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4" gdb_test "list 3" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 3 with listsize 4" gdb_test "list 4" "2\[ \t\]+\r\n.*5\[ \t\]+int x;.*" "list line 4 with listsize 4" @@ -166,7 +164,7 @@ proc test_list_include_file {} { setup_xfail "a29k-*-udi" setup_xfail_format "DWARF 1" setup_xfail_format "COFF" - gdb_test "list list0.h:1" "1\[ \t\]+/\[*\]+ An include file .*4\[ \t\]+.*foo \(.*x.*\).*" "list line 1 in include file" + gdb_test "list list0.h:1" "1\[ \t\]+/\[*\]+ An include file .*10\[ \t\]+bar \\(x\\+\\+\\);" "list line 1 in include file" setup_xfail "a29k-*-udi" setup_xfail_format "DWARF 1" @@ -185,7 +183,7 @@ proc test_list_filename_and_number {} { send_gdb "list list0.c:1\n" gdb_expect { - -re "1\[ \t\]+#include \"list0.h\".*5\[ \t\]+int x;\r\n$gdb_prompt $" { + -re "1\[ \t\]+#include \"list0.h\".*10\[ \t]+x = 0;\r\n$gdb_prompt $" { incr testcnt } -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests } @@ -231,7 +229,7 @@ proc test_list_function {} { # in include files, which breaks this test. # SunPRO cc is the second case below, it's also correct. setup_xfail "a29k-*-udi" - gdb_test "list main" "(5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;)" "list function in source file 1" + gdb_test "list main" "(5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*10\[ \t\]+x = 0;)" "list function in source file 1" # Ultrix gdb takes the second case below; it's also correct. # SunPRO cc is the third case. @@ -398,7 +396,7 @@ proc test_list_filename_and_function {} { setup_xfail "a29k-*-udi" send_gdb "list list0.c:main\n" gdb_expect { - -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$gdb_prompt $" { + -re "1\[ \t\]+#include .*10\[ \t\]+x = 0;\r\n$gdb_prompt $" { incr testcnt } -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/restore.c b/gdb/testsuite/gdb.base/restore.c index 2469430fe1a..974e94486cc 100644 --- a/gdb/testsuite/gdb.base/restore.c +++ b/gdb/testsuite/gdb.base/restore.c @@ -65,7 +65,7 @@ (insert "int\n") (insert (caller i) " (void)\n") (insert "{\n") - (let ((last (local-chain i "0xfeeb" (caller i)))) + (let ((last (local-chain i "0x7eeb" (caller i)))) (insert " register int n;\n") (let ((j 0)) (while (<= j limit) @@ -159,7 +159,7 @@ callee5 (int n) int caller1 (void) { - register int l1 = increment (0xfeeb); /* caller1 */ + register int l1 = increment (0x7eeb); /* caller1 */ register int n; n = callee0 (l1); n = callee1 (n + l1); @@ -173,7 +173,7 @@ caller1 (void) int caller2 (void) { - register int l1 = increment (0xfeeb); /* caller2 */ + register int l1 = increment (0x7eeb); /* caller2 */ register int l2 = increment (l1); register int n; n = callee0 (l2); @@ -188,7 +188,7 @@ caller2 (void) int caller3 (void) { - register int l1 = increment (0xfeeb); /* caller3 */ + register int l1 = increment (0x7eeb); /* caller3 */ register int l2 = increment (l1); register int l3 = increment (l2); register int n; @@ -204,7 +204,7 @@ caller3 (void) int caller4 (void) { - register int l1 = increment (0xfeeb); /* caller4 */ + register int l1 = increment (0x7eeb); /* caller4 */ register int l2 = increment (l1); register int l3 = increment (l2); register int l4 = increment (l3); @@ -221,7 +221,7 @@ caller4 (void) int caller5 (void) { - register int l1 = increment (0xfeeb); /* caller5 */ + register int l1 = increment (0x7eeb); /* caller5 */ register int l2 = increment (l1); register int l3 = increment (l2); register int l4 = increment (l3); diff --git a/gdb/testsuite/gdb.base/restore.exp b/gdb/testsuite/gdb.base/restore.exp index 64b714bd1b6..8cf5035f163 100644 --- a/gdb/testsuite/gdb.base/restore.exp +++ b/gdb/testsuite/gdb.base/restore.exp @@ -80,7 +80,7 @@ proc restore_tests { } { # Check that the values of the local variables are what # they should be. for {set var 1} {$var <= $c} {incr var} { - set expected [expr 0xfeeb + $var] + set expected [expr 0x7eeb + $var] gdb_test "print l$var" " = $expected" \ "caller$c called callee$e; variable l$var restored" } diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp index c0d17c815ec..72a086e63b1 100644 --- a/gdb/testsuite/gdb.base/selftest.exp +++ b/gdb/testsuite/gdb.base/selftest.exp @@ -254,8 +254,11 @@ proc test_with_self { executable } { # do we have a version number ? send_gdb "print version\n" gdb_expect { + -re ".\[0-9\]+ = .\[0-9.\]+.*$gdb_prompt $" { + pass "printed version as string" + } -re ".\[0-9\]+ = +0x.*\[0-9.\]+.*$gdb_prompt $" { - pass "printed version" + pass "printed version as pointer" } -re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" { pass "printed version with cast" |