aboutsummaryrefslogtreecommitdiff
path: root/gdb/jv-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-02-21 02:49:12 +0000
committerTom Tromey <tromey@redhat.com>2003-02-21 02:49:12 +0000
commitd4cad8db8c3e700898454d5b67276378955e4bec (patch)
treebe1c520d0a39a3bb00c69fe88b623fe67afecf15 /gdb/jv-valprint.c
parentd38074a8d521837f899bf8894f20d96c64898704 (diff)
downloadgdb-d4cad8db8c3e700898454d5b67276378955e4bec.zip
gdb-d4cad8db8c3e700898454d5b67276378955e4bec.tar.gz
gdb-d4cad8db8c3e700898454d5b67276378955e4bec.tar.bz2
* jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not
TYPE_NAME, when printing a String value. PR java/1075.
Diffstat (limited to 'gdb/jv-valprint.c')
-rw-r--r--gdb/jv-valprint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 1ddfcb5..f25cd09 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -199,8 +199,9 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
if (TYPE_CODE (type) == TYPE_CODE_PTR
&& TYPE_TARGET_TYPE (type)
- && TYPE_NAME (TYPE_TARGET_TYPE (type))
- && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0
+ && TYPE_TAG_NAME (TYPE_TARGET_TYPE (type))
+ && strcmp (TYPE_TAG_NAME (TYPE_TARGET_TYPE (type)),
+ "java.lang.String") == 0
&& (format == 0 || format == 's')
&& address != 0
&& value_as_address (val) != 0)