From 6ea9fb3712e33eb6a95559f672e5de834cbc2b6b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 29 Feb 2004 22:29:15 +0000 Subject: * gdb.cp/ctti.exp: Handle unsigned char type. Expect templates to use unsigned char. * gdb.cp/cttiadd.c, gdb.cp/cttiadd1.c, gdb.cp/cttiadd2.c, gdb.cp/cttiadd3.c: Change type of variable to unsigned char. --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.cp/ctti.exp | 34 +++++++++++++++++----------------- gdb/testsuite/gdb.cp/cttiadd.cc | 2 +- gdb/testsuite/gdb.cp/cttiadd1.cc | 2 +- gdb/testsuite/gdb.cp/cttiadd2.cc | 2 +- gdb/testsuite/gdb.cp/cttiadd3.cc | 2 +- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index aee188b..9e22174 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2004-02-29 Daniel Jacobowitz + * gdb.cp/ctti.exp: Handle unsigned char type. Expect templates + to use unsigned char. + * gdb.cp/cttiadd.c, gdb.cp/cttiadd1.c, gdb.cp/cttiadd2.c, + gdb.cp/cttiadd3.c: Change type of variable to unsigned char. + +2004-02-29 Daniel Jacobowitz + * config/gdbserver.exp (gdbserver_gdb_load): Wait for a complete line of output. diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp index 7c23b49..a2a2e0a 100644 --- a/gdb/testsuite/gdb.cp/ctti.exp +++ b/gdb/testsuite/gdb.cp/ctti.exp @@ -76,7 +76,7 @@ if ![runto_main] then { gdb_breakpoint [gdb_get_line_number "marker add1"] gdb_continue_to_breakpoint "marker add1" -gdb_test "print c" "\\$\[0-9\]+ = -62 .*" +gdb_test "print c" "\\$\[0-9\]+ = 194 .*" gdb_test "print f" "\\$\[0-9\]+ = 9" gdb_test "print i" "\\$\[0-9\]+ = 4" @@ -106,13 +106,13 @@ gdb_test_multiple "print add(2.25,2.25)" "print add(2.25,2.25)" { } } -gdb_test_multiple "print add('A','A')" "print add('A','A')" { +gdb_test_multiple "print add('A','A')" "print add('A','A')" { -re "\\$\[0-9\]+ = -126 .*\r\n$gdb_prompt $" { - pass "print add('A','A')" + pass "print add('A','A')" } - -re "No symbol \"add\" in current context.\r\n$gdb_prompt $" { + -re "No symbol \"add\" in current context.\r\n$gdb_prompt $" { # TODO: kfail or xfail this - fail "print add('A','A')" + fail "print add('A','A')" } } @@ -136,13 +136,13 @@ gdb_test_multiple "print add2(2.25,2.25)" "print add2(2.25,2.25)" } } -gdb_test_multiple "print add2('A','A')" "print add2('A','A')" { +gdb_test_multiple "print add2('A','A')" "print add2('A','A')" { -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" { - pass "print add2('A','A')" + pass "print add2('A','A')" } - -re "No symbol \"add2\" in current context.\r\n$gdb_prompt $" { + -re "No symbol \"add2\" in current context.\r\n$gdb_prompt $" { # TODO: kfail or xfail this - fail "print add2('A','A')" + fail "print add2('A','A')" } } @@ -166,13 +166,13 @@ gdb_test_multiple "print add3(2.25,2.25)" "print add3(2.25,2.25)" } } -gdb_test_multiple "print add3('A','A')" "print add3('A','A')" { +gdb_test_multiple "print add3('A','A')" "print add3('A','A')" { -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" { - pass "print add3('A','A')" + pass "print add3('A','A')" } - -re "No symbol \"add3\" in current context.\r\n$gdb_prompt $" { + -re "No symbol \"add3\" in current context.\r\n$gdb_prompt $" { # TODO: kfail or xfail this - fail "print add3('A','A')" + fail "print add3('A','A')" } } @@ -196,12 +196,12 @@ gdb_test_multiple "print add4(2.25,2.25)" "print add4(2.25,2.25)" } } -gdb_test_multiple "print add4('A','A')" "print add4('A','A')" { +gdb_test_multiple "print add4('A','A')" "print add4('A','A')" { -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" { - pass "print add4('A','A')" + pass "print add4('A','A')" } - -re "No symbol \"add4\" in current context.\r\n$gdb_prompt $" { + -re "No symbol \"add4\" in current context.\r\n$gdb_prompt $" { # TODO: kfail or xfail this - fail "print add4('A','A')" + fail "print add4('A','A')" } } diff --git a/gdb/testsuite/gdb.cp/cttiadd.cc b/gdb/testsuite/gdb.cp/cttiadd.cc index ffba405..14ac6d1 100644 --- a/gdb/testsuite/gdb.cp/cttiadd.cc +++ b/gdb/testsuite/gdb.cp/cttiadd.cc @@ -27,7 +27,7 @@ template T add(T v1, T v2) int main() { - char c; + unsigned char c; int i; float f; extern void add1(); diff --git a/gdb/testsuite/gdb.cp/cttiadd1.cc b/gdb/testsuite/gdb.cp/cttiadd1.cc index 9b149b3..a67babe 100644 --- a/gdb/testsuite/gdb.cp/cttiadd1.cc +++ b/gdb/testsuite/gdb.cp/cttiadd1.cc @@ -21,7 +21,7 @@ template T add(T v1, T v2); void add1() { - char c; + unsigned char c; int i; float f; diff --git a/gdb/testsuite/gdb.cp/cttiadd2.cc b/gdb/testsuite/gdb.cp/cttiadd2.cc index 3538661..0d388d7 100644 --- a/gdb/testsuite/gdb.cp/cttiadd2.cc +++ b/gdb/testsuite/gdb.cp/cttiadd2.cc @@ -27,7 +27,7 @@ template T add2(T v1, T v2) void subr2() { - char c; + unsigned char c; int i; float f; diff --git a/gdb/testsuite/gdb.cp/cttiadd3.cc b/gdb/testsuite/gdb.cp/cttiadd3.cc index 2bea7bb..1d11daf 100644 --- a/gdb/testsuite/gdb.cp/cttiadd3.cc +++ b/gdb/testsuite/gdb.cp/cttiadd3.cc @@ -35,7 +35,7 @@ template T add4(T v1, T v2) void subr3() { - char c; + unsigned char c; int i; float f; -- cgit v1.1