This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: java/1075: "p string" doesn't work with java code


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]