diff options
author | Daniel Jacobowitz <dan@debian.org> | 2003-07-03 13:55:22 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2003-07-03 13:55:22 +0000 |
commit | d3c8bd69381e81520321e8f95f79780f8f59839a (patch) | |
tree | 5ecdf530ed8bc000c4ac57686f03f1436abe685c /gdb/testsuite | |
parent | 3133895c2dbd8c7744393226060d1cc3cdf142a1 (diff) | |
download | gdb-d3c8bd69381e81520321e8f95f79780f8f59839a.tar.gz |
* gdb.base/store.c (charest): New typedef.
(add_char): Rename to add_charest, update.
(wack_char): Rename to wack_charest, update types. Return l + r
to keep r live across the call.
(wack_short, wack_int, wack_long, wack_longest, wack_float)
(wack_double, wack_doublest): Return l + r to keep r live across
the call.
* gdb.base/store.exp: Accomodate store.c changes.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/store.c | 34 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/store.exp | 6 |
3 files changed, 32 insertions, 19 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f33dbdeb4ec..11f7ed07987 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2003-07-03 Daniel Jacobowitz <drow@mvista.com> + + * gdb.base/store.c (charest): New typedef. + (add_char): Rename to add_charest, update. + (wack_char): Rename to wack_charest, update types. Return l + r + to keep r live across the call. + (wack_short, wack_int, wack_long, wack_longest, wack_float) + (wack_double, wack_doublest): Return l + r to keep r live across + the call. + * gdb.base/store.exp: Accomodate store.c changes. + 2003-06-30 David Carlton <carlton@kealia.com> * gdb.c++/maint.exp (test_invalid_name): New. diff --git a/gdb/testsuite/gdb.base/store.c b/gdb/testsuite/gdb.base/store.c index 46acc6a1c81..545515dfc10 100644 --- a/gdb/testsuite/gdb.base/store.c +++ b/gdb/testsuite/gdb.base/store.c @@ -7,8 +7,10 @@ function calls within main even when no optimization flags were passed. */ -char -add_char (register char u, register char v) +typedef signed char charest; + +charest +add_charest (register charest u, register charest v) { return u + v; } @@ -61,12 +63,12 @@ add_doublest (register doublest u, register doublest v) /* */ -char -wack_char (register char u, register char v) +charest +wack_charest (register charest u, register charest v) { - register char l = u, r = v; - l = add_char (l, r); - return l; + register charest l = u, r = v; + l = add_charest (l, r); + return l + r; } short @@ -74,7 +76,7 @@ wack_short (register short u, register short v) { register short l = u, r = v; l = add_short (l, r); - return l; + return l + r; } int @@ -82,7 +84,7 @@ wack_int (register int u, register int v) { register int l = u, r = v; l = add_int (l, r); - return l; + return l + r; } long @@ -90,7 +92,7 @@ wack_long (register long u, register long v) { register long l = u, r = v; l = add_long (l, r); - return l; + return l + r; } long @@ -98,7 +100,7 @@ wack_longest (register longest u, register longest v) { register longest l = u, r = v; l = add_longest (l, r); - return l; + return l + r; } float @@ -106,7 +108,7 @@ wack_float (register float u, register float v) { register float l = u, r = v; l = add_float (l, r); - return l; + return l + r; } double @@ -114,7 +116,7 @@ wack_double (register double u, register double v) { register double l = u, r = v; l = add_double (l, r); - return l; + return l + r; } doublest @@ -122,7 +124,7 @@ wack_doublest (register doublest u, register doublest v) { register doublest l = u, r = v; l = add_doublest (l, r); - return l; + return l + r; } /* */ @@ -253,7 +255,7 @@ int main () { /* These calls are for current frame test. */ - wack_char (-1, -2); + wack_charest (-1, -2); wack_short (-1, -2); wack_int (-1, -2); wack_long (-1, -2); @@ -263,7 +265,7 @@ main () wack_doublest (-1, -2); /* These calls are for up frame. */ - wack_char (-1, -2); + wack_charest (-1, -2); wack_short (-1, -2); wack_int (-1, -2); wack_long (-1, -2); diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp index 5e0e60eb793..49e05ef814d 100644 --- a/gdb/testsuite/gdb.base/store.exp +++ b/gdb/testsuite/gdb.base/store.exp @@ -63,11 +63,11 @@ proc check_set { t l r new add } { gdb_test "print r" " = ${r}" "print old r - ${t}" gdb_test "set variable l = 4" gdb_test "print l" " = ${new}" "print new l - ${t}" - gdb_test "next" "return l;" + gdb_test "next" "return l \\+ r;" gdb_test "print l" " = ${add}" "print add - ${t}" } -check_set "char" "-1 .*" "-2 .*" "4 ..004." "2 ..002." +check_set "charest" "-1 .*" "-2 .*" "4 ..004." "2 ..002." check_set "short" "-1" "-2" "4" "2" check_set "int" "-1" "-2" "4" "2" check_set "long" "-1" "-2" "4" "2" @@ -89,7 +89,7 @@ proc up_set { t l r new } { gdb_test "print l" " = ${new}" "up print new l - ${t}" } -up_set "char" "-1 .*" "-2 .*" "4 ..004." +up_set "charest" "-1 .*" "-2 .*" "4 ..004." up_set "short" "-1" "-2" "4" up_set "int" "-1" "-2" "4" up_set "long" "-1" "-2" "4" |