@@ -330,12 +327,11 @@
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE
(type)) > 0) {
elttype = check_typedef (TYPE_TARGET_TYPE (type));
- eltlen = TYPE_LENGTH (elttype);
- len = TYPE_LENGTH (type) / eltlen;
+ len = TYPE_LENGTH (type) / TYPE_LENGTH (elttype);
if (options->prettyprint_arrays)
print_spaces_filtered (2 + 2 * recurse, stream);
/* For an array of chars, print with string syntax. */
- if (eltlen == 1 &&
+ if (TYPE_LENGTH (elttype) == 1 &&
((TYPE_CODE (elttype) == TYPE_CODE_INT)
|| ((current_language->la_language == language_m2)
&& (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- src/gdb/m68k-tdep.c 2012/07/24 16:37:24 1.159
+++ src/gdb/m68k-tdep.c 2012/09/17 08:52:18 1.160
@@ -315,7 +315,6 @@
m68k_svr4_extract_return_value (struct type *type, struct regcache
*regcache, gdb_byte *valbuf)
{
- int len = TYPE_LENGTH (type);
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -326,7 +325,7 @@
regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
convert_typed_floating (buf, fpreg_type, valbuf, type);
}
- else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) ==
4) regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);