+2002-09-09 Fred Fish <fnf@intrinsity.com>
+
+ * printcmd.c (print_scalar_formatted): "len" is the number of
+ target bytes, NOT the number of target bits.
+
2002-09-09 Elena Zannoni <ezannoni@redhat.com>
From: Emmanuel Thome' <thome@lix.polytechnique.fr>
val_long = unpack_long (type, valaddr);
/* If the value is a pointer, and pointers and addresses are not the
- same, then at this point, the value's length is TARGET_ADDR_BIT, not
- TYPE_LENGTH (type). */
+ same, then at this point, the value's length (in target bytes) is
+ TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type). */
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- len = TARGET_ADDR_BIT;
+ len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
/* If we are printing it as unsigned, truncate it in case it is actually
a negative signed value (e.g. "print/u (short)-1" should print 65535