From d4cad8db8c3e700898454d5b67276378955e4bec Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 21 Feb 2003 02:49:12 +0000 Subject: [PATCH] * jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not TYPE_NAME, when printing a String value. PR java/1075. --- gdb/ChangeLog | 5 +++++ gdb/jv-valprint.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc1aa3a09b5..ee6a0bcc0dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-02-20 Tom Tromey + + * jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not + TYPE_NAME, when printing a String value. PR java/1075. + 2003-02-20 Adam Fedor * objc-lang.h (find_methods): Remove declaration. diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 1ddfcb576c6..f25cd09905f 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) -- 2.30.2