* hpread.c (hpread_type_translate): Handle T_UNS_LONG types with
authorJeff Law <law@redhat.com>
Thu, 29 Sep 1994 04:26:50 +0000 (04:26 +0000)
committerJeff Law <law@redhat.com>
Thu, 29 Sep 1994 04:26:50 +0000 (04:26 +0000)
lengths other than 32bits (HP C 9.69 represents an "unsigned char"
as an T_UNS_LONG with length 8).

gdb/ChangeLog.hpread
gdb/hpread.c

index 57116c4e28db12e6beba2b7f73bd4c280ee43dce..4534bb56aa708774ad453156fa85594e3e8be089 100644 (file)
@@ -1,5 +1,9 @@
 Wed Sep 28 00:35:23 1994  Jeff Law  (law@snake.cs.utah.edu)
 
+       * hpread.c (hpread_type_translate): Handle T_UNS_LONG types with
+       lengths other than 32bits (HP C 9.69 represents an "unsigned char"
+       as an T_UNS_LONG with length 8).
+
        * hpread.c (struct hpread_symfile_info): Delete have_module field
        and accessor macro.  Minor indentation fix.
        (hpread_build_psymtabs, case K_MODULE):  Only start a new psymtab
index 431c945df7453e5063a3920f8a63530830147303..f070d3e63351341120e394f1512378f056347abe 100644 (file)
@@ -1137,7 +1137,13 @@ hpread_type_translate (typep)
     case T_LONG:
       return FT_LONG;
     case T_UNS_LONG:
-      return FT_UNSIGNED_LONG;
+      if (typep.dntti.bitlength <= 8)
+       return FT_UNSIGNED_CHAR;
+      if (typep.dntti.bitlength <= 16)
+       return FT_UNSIGNED_SHORT;
+      if (typep.dntti.bitlength <= 32)
+       return FT_UNSIGNED_LONG;
+      return FT_UNSIGNED_LONG_LONG;
     case T_UNS_INT:
       if (typep.dntti.bitlength <= 8)
        return FT_UNSIGNED_CHAR;