This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Patch: java/1075: "p string" doesn't work with java code
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 20 Feb 2003 19:23:46 -0700
- Subject: Patch: java/1075: "p string" doesn't work with java code
- References: <20030219232800.25600.qmail@sources.redhat.com>
- Reply-to: tromey at redhat dot com
I'm checking this in.
Elena sent me private email in response to my PR saying it was ok to
check this patch in.
I'm going to close the PR as well.
Tom
2003-02-20 Tom Tromey <tromey at redhat dot com>
* jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not
TYPE_NAME, when printing a String value. PR java/1075.
Index: jv-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-valprint.c,v
retrieving revision 1.11
diff -u -r1.11 jv-valprint.c
--- jv-valprint.c 27 Aug 2002 22:37:06 -0000 1.11
+++ jv-valprint.c 21 Feb 2003 02:27:59 -0000
@@ -199,8 +199,9 @@
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)