diff options
author | Tom Tromey <tromey@redhat.com> | 2000-08-10 08:42:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2000-08-10 08:42:10 +0000 |
commit | 8dccf761377be5a6f517a0aff131918511de90ed (patch) | |
tree | 960fff3a2af17a0fb96852fd2e423e0674f50a5e | |
parent | dbb41be16379bfcaa4edf631103046edc0e3525b (diff) | |
download | gdb-8dccf761377be5a6f517a0aff131918511de90ed.zip gdb-8dccf761377be5a6f517a0aff131918511de90ed.tar.gz gdb-8dccf761377be5a6f517a0aff131918511de90ed.tar.bz2 |
* jv-valprint.c (java_value_print): Only print non-null Strings.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/jv-valprint.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4c6bf1a3..ac5e8c3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2000-08-08 Tom Tromey <tromey@cygnus.com> + + * jv-valprint.c (java_value_print): Only print non-null Strings. + 2000-08-09 Kevin Buettner <kevinb@redhat.com> * core-sol2.c (fetch_core_registers): Protoize; add prefatory diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index f0614fa..758e1f6 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; |