This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here is a patch that workaround for structure members around the lack of T_LONG_LONG type in coff files. (gcc already emits T_LONG for long long variables). Sat Apr 4 07:45:45 1998 Philippe De Muyter <phdm@macqel.be> * coffread.c (decode_base_type): Treat a long field with size greater than TARGET_LONG_BIT as long long. * values.c (value_from_longest): Print code value in error message. --- ./gdb/coffread.c Fri Apr 3 11:24:22 1998 +++ ./gdb/coffread.c Tue Mar 10 17:43:26 1998 @@ -1866,7 +1869,11 @@ decode_base_type (cs, c_type, aux) return lookup_fundamental_type (current_objfile, FT_INTEGER); case T_LONG: - return lookup_fundamental_type (current_objfile, FT_LONG); + if (cs->c_sclass == C_FIELD + && aux->x_sym.x_misc.x_lnsz.x_size > TARGET_LONG_BIT) + return lookup_fundamental_type (current_objfile, FT_LONG_LONG); + else + return lookup_fundamental_type (current_objfile, FT_LONG); case T_FLOAT: return lookup_fundamental_type (current_objfile, FT_FLOAT); @@ -1962,7 +1969,11 @@ decode_base_type (cs, c_type, aux) return lookup_fundamental_type (current_objfile, FT_UNSIGNED_INTEGER); case T_ULONG: - return lookup_fundamental_type (current_objfile, FT_UNSIGNED_LONG); + if (cs->c_sclass == C_FIELD + && aux->x_sym.x_misc.x_lnsz.x_size > TARGET_LONG_BIT) + return lookup_fundamental_type (current_objfile, FT_UNSIGNED_LONG_LONG); + else + return lookup_fundamental_type (current_objfile, FT_UNSIGNED_LONG); } complain (&unexpected_type_complaint, cs->c_name); return lookup_fundamental_type (current_objfile, FT_VOID); --- ./gdb/values.c Fri Apr 3 11:24:26 1998 +++ ./gdb/values.c Tue Mar 10 17:33:27 1998 @@ -1291,7 +1291,7 @@ value_from_longest (type, num) break; default: - error ("Unexpected type encountered for integer constant."); + error ("Unexpected type (%d) encountered for integer constant.", code); } return val; }