(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-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.
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;
}
/* */
-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
{
register short l = u, r = v;
l = add_short (l, r);
- return l;
+ return l + r;
}
int
{
register int l = u, r = v;
l = add_int (l, r);
- return l;
+ return l + r;
}
long
{
register long l = u, r = v;
l = add_long (l, r);
- return l;
+ return l + r;
}
long
{
register longest l = u, r = v;
l = add_longest (l, r);
- return l;
+ return l + r;
}
float
{
register float l = u, r = v;
l = add_float (l, r);
- return l;
+ return l + r;
}
double
{
register double l = u, r = v;
l = add_double (l, r);
- return l;
+ return l + r;
}
doublest
{
register doublest l = u, r = v;
l = add_doublest (l, r);
- return l;
+ return l + r;
}
/* */
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);
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);
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"
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"