summaryrefslogtreecommitdiff
path: root/gdb/jv-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2000-08-10 08:42:10 +0000
committerTom Tromey <tromey@redhat.com>2000-08-10 08:42:10 +0000
commitf35c60f02fc3c8532692e287895c655340012d54 (patch)
tree896e14b59a0b618a5e457c7ba0b188a386e11ef3 /gdb/jv-valprint.c
parentdf0081deb7fbd301393db7558966557a856aa704 (diff)
downloadgdb-f35c60f02fc3c8532692e287895c655340012d54.tar.gz
* jv-valprint.c (java_value_print): Only print non-null Strings.
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 f0614fa4523..758e1f62183 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -198,9 +198,10 @@ java_value_print (value_ptr 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
+ && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0
&& (format == 0 || format == 's')
- && address != 0)
+ && address != 0
+ && value_as_pointer (val) != 0)
{
value_ptr data_val;
CORE_ADDR data;