/* Support for printing Java values for GDB, the GNU debugger.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "jv-lang.h"
#include "c-lang.h"
#include "annotate.h"
-#include "gdb_string.h"
-
/* Local functions */
void
type = lookup_pointer_type (type);
val = value_at (type, address);
+ type = value_type (val);
}
}
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;
}
{
int i, len, n_baseclasses;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "{");
len = TYPE_NFIELDS (type);
{
fputs_filtered (_("<synthetic pointer>"), 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;
}
else if (field_is_static (&TYPE_FIELD (type, i)))
{
+ struct value_print_options opts;
struct value *v = value_static_field (type, i);
+ struct type *t = check_typedef (value_type (v));
- if (v == NULL)
- val_print_optimized_out (NULL, stream);
- else
- {
- struct value_print_options opts;
- struct type *t = check_typedef (value_type (v));
-
- if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
- v = value_addr (v);
- opts = *options;
- opts.deref_ref = 0;
- common_val_print (v, stream, recurse + 1,
- &opts, current_language);
- }
+ if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
+ v = value_addr (v);
+ opts = *options;
+ opts.deref_ref = 0;
+ common_val_print (v, stream, recurse + 1,
+ &opts, current_language);
}
else if (TYPE_FIELD_TYPE (type, i) == NULL)
fputs_filtered ("<unknown type>", stream);
struct type *target_type;
CORE_ADDR addr;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR: