aboutsummaryrefslogtreecommitdiff
path: root/gdb/hpread.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-09-29 04:26:50 +0000
committerJeff Law <law@redhat.com>1994-09-29 04:26:50 +0000
commit510ceea939b789df3ae14b8fa34e93c20f34ff74 (patch)
tree8d70c24e94b6be45219ad3c3789a8cabf40e125a /gdb/hpread.c
parent3a4b4b1ec0f773e4c71979811684de9205608d2c (diff)
downloadgdb-510ceea939b789df3ae14b8fa34e93c20f34ff74.zip
gdb-510ceea939b789df3ae14b8fa34e93c20f34ff74.tar.gz
gdb-510ceea939b789df3ae14b8fa34e93c20f34ff74.tar.bz2
* 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).
Diffstat (limited to 'gdb/hpread.c')
-rw-r--r--gdb/hpread.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 431c945..f070d3e 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -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;