aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-07-05 13:36:42 +0000
committerTom Tromey <tromey@redhat.com>2011-07-05 13:36:42 +0000
commiteb2a6f420b324bc81207c7606ebef9db3a9bb984 (patch)
tree5741460f7d99914793d65d5ef485030ce74da60e /gdb/testsuite/gdb.java
parent177b42fefa0b72f2ca50ddf7393c0f2465546ff4 (diff)
downloadgdb-eb2a6f420b324bc81207c7606ebef9db3a9bb984.zip
gdb-eb2a6f420b324bc81207c7606ebef9db3a9bb984.tar.gz
gdb-eb2a6f420b324bc81207c7606ebef9db3a9bb984.tar.bz2
gdb
* gnu-v3-abi.c (gnuv3_rtti_type): Check TYPE_CPLUS_REALLY_JAVA. * gdbtypes.h (struct cplus_struct_type) <is_java>: New field. (TYPE_CPLUS_REALLY_JAVA): New macro. * dwarf2read.c (process_structure_scope): Set TYPE_CPLUS_REALLY_JAVA. gdb/testsuite * gdb.java/jprint.java (jprint.hi): New field. * gdb.java/jprint.exp: Print string.
Diffstat (limited to 'gdb/testsuite/gdb.java')
-rw-r--r--gdb/testsuite/gdb.java/jprint.exp2
-rw-r--r--gdb/testsuite/gdb.java/jprint.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.java/jprint.exp b/gdb/testsuite/gdb.java/jprint.exp
index 682715a..81d8ad1 100644
--- a/gdb/testsuite/gdb.java/jprint.exp
+++ b/gdb/testsuite/gdb.java/jprint.exp
@@ -70,4 +70,6 @@ if [set_lang_java] then {
# so GDB will report these as "optimized out". See gcc/43260.
setup_xfail *-*-* gcc/43260
gdb_test "print *jprint.props" " = .*" "print a java.util.Properties"
+
+ gdb_test "print jprint.hi" "= java.lang.String \"hi maude\"" "print a java.lang.String"
}
diff --git a/gdb/testsuite/gdb.java/jprint.java b/gdb/testsuite/gdb.java/jprint.java
index 01ebdbc..b4385ab 100644
--- a/gdb/testsuite/gdb.java/jprint.java
+++ b/gdb/testsuite/gdb.java/jprint.java
@@ -1,6 +1,6 @@
// jprint.java test program.
//
-// Copyright 2004, 2010
+// Copyright 2004, 2010, 2011
// Free Software Foundation, Inc.
//
// Written by Jeff Johnston <jjohnstn@redhat.com>
@@ -42,6 +42,7 @@ class jvclass {
public class jprint extends jvclass {
public static Properties props = new Properties ();
+ public static String hi = "hi maude";
public int dothat (int x) {
int y = x + 3;