/* Support for printing D values for GDB, the GNU debugger.
- Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of GDB.
struct type *elttype;
struct type *true_type;
struct type *ptr_type;
- const gdb_byte *ptraddr;
- struct value *val;
+ struct value *ival;
int length;
length = unpack_field_as_long (type, valaddr + embedded_offset, 0);
true_type = check_typedef (elttype);
true_type = lookup_array_range_type (true_type, 0, length - 1);
- val = value_at (true_type, addr);
- ptraddr = value_contents (val);
+ ival = value_at (true_type, addr);
- return d_val_print (true_type, ptraddr, 0, addr, stream, recurse + 1,
- NULL, options);
+ return d_val_print (true_type,
+ value_contents_for_printing (ival),
+ value_embedded_offset (ival), addr,
+ stream, recurse + 1, ival, options);
}
return -1;
}