Index: gdb/testsuite/gdb.java/jprint.java |
diff --git a/gdb/testsuite/gdb.java/jprint.java b/gdb/testsuite/gdb.java/jprint.java |
index 5a4a42421719695c88c0a3198a59ccd8085394be..0a5e7d3ebe3cd17d6420e6485c21c201edf79fb2 100644 |
--- a/gdb/testsuite/gdb.java/jprint.java |
+++ b/gdb/testsuite/gdb.java/jprint.java |
@@ -27,9 +27,10 @@ class jvclass { |
static { |
k = 77; |
} |
- public static void addprint (int x, int y, int z) { |
+ public static int addprint (int x, int y, int z) { |
int sum = x + y + z; |
System.out.println ("sum is " + sum); |
+ return sum; |
} |
public int addk (int x) { |
@@ -48,16 +49,19 @@ public class jprint extends jvclass { |
System.out.println ("new value is " + y); |
return y + 4; |
} |
- public static void print (int x) { |
+ public static int print (int x) { |
System.out.println("x is " + x); |
+ return x; |
} |
- public static void print (int x, int y) { |
+ public static int print (int x, int y) { |
System.out.println("y is " + y); |
+ return y; |
} |
public static void main(String[] args) { |
jprint x = new jprint (); |
x.dothat (44); |
print (k, 33); |
+ print (x.addk(0), 33); |
} |
} |