X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fjv-valprint.c;h=29887376eb1f028e4543f211ca70825f7b08ba6a;hb=a3405d124e1388b613a35af49f19f0cc1b8d959d;hp=82bdd9bf32b8a6da5c0087dc8a6b9ac299c50260;hpb=6b662e19e420d2ef28f14b985390977080bcd341;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 82bdd9bf32..29887376eb 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -1,6 +1,6 @@ /* Support for printing Java values for GDB, the GNU debugger. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -29,8 +29,6 @@ #include "jv-lang.h" #include "c-lang.h" #include "annotate.h" -#include - /* Local functions */ void @@ -65,6 +63,7 @@ java_value_print (struct value *val, struct ui_file *stream, type = lookup_pointer_type (type); val = value_at (type, address); + type = value_type (val); } } @@ -100,7 +99,8 @@ java_value_print (struct value *val, struct ui_file *stream, { gdb_byte *buf; - buf = alloca (gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT); + buf = ((gdb_byte *) + alloca (gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT)); fputs_filtered (", ", stream); wrap_here (n_spaces (2)); @@ -182,10 +182,10 @@ java_value_print (struct value *val, struct ui_file *stream, set_value_offset (next_v, value_offset (next_v) + TYPE_LENGTH (el_type)); value_fetch_lazy (next_v); - if (!(value_available_contents_eq - (v, value_embedded_offset (v), - next_v, value_embedded_offset (next_v), - TYPE_LENGTH (el_type)))) + if (!value_contents_eq (v, value_embedded_offset (v), + next_v, + value_embedded_offset (next_v), + TYPE_LENGTH (el_type))) break; } @@ -266,7 +266,7 @@ java_value_print (struct value *val, struct ui_file *stream, static void java_print_value_fields (struct type *type, const gdb_byte *valaddr, - int offset, + LONGEST offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, @@ -274,7 +274,7 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr, { int i, len, n_baseclasses; - CHECK_TYPEDEF (type); + type = check_typedef (type); fprintf_filtered (stream, "{"); len = TYPE_NFIELDS (type); @@ -392,11 +392,6 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr, { fputs_filtered (_(""), stream); } - else if (!value_bits_valid (val, TYPE_FIELD_BITPOS (type, i), - TYPE_FIELD_BITSIZE (type, i))) - { - val_print_optimized_out (val, stream); - } else { struct value_print_options opts; @@ -468,7 +463,7 @@ java_val_print (struct type *type, const gdb_byte *valaddr, struct type *target_type; CORE_ADDR addr; - CHECK_TYPEDEF (type); + type = check_typedef (type); switch (TYPE_CODE (type)) { case TYPE_CODE_PTR: