aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>1998-06-16 08:30:47 +0000
committerFrank Ch. Eigler <fche@redhat.com>1998-06-16 08:30:47 +0000
commit7924771e5ddae1b0b9eecea8494d29e00358d562 (patch)
treecdbd0d38ab64bbf15612f635e030e193bfde4785 /gdb/gdbtypes.c
parent05faca8731386b842dd8a6214c4a9361d217f930 (diff)
downloadgdb-7924771e5ddae1b0b9eecea8494d29e00358d562.zip
gdb-7924771e5ddae1b0b9eecea8494d29e00358d562.tar.gz
gdb-7924771e5ddae1b0b9eecea8494d29e00358d562.tar.bz2
* PR 15693 fix.
Wed Jun 10 18:04:35 1998 Frank Ch. Eigler <fche@cygnus.com> * gdbtypes.c (get_discrete_bounds): Assign unsigned type flag for all-positive enum. (create_set_type): Ditto for all-positive set values. * values.c (unpack_field_as_long): Check for typedef in struct field unpacking.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 7027cc9..d55a87a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -395,6 +395,12 @@ get_discrete_bounds (type, lowp, highp)
if (TYPE_FIELD_BITPOS (type, i) > *highp)
*highp = TYPE_FIELD_BITPOS (type, i);
}
+
+ /* Set unsigned indicator if warranted. */
+ if(*lowp >= 0)
+ {
+ TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
+ }
}
else
{
@@ -519,6 +525,10 @@ create_set_type (result_type, domain_type)
= (bit_length + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT;
}
TYPE_FIELD_TYPE (result_type, 0) = domain_type;
+
+ if(low_bound >= 0)
+ TYPE_FLAGS (result_type) |= TYPE_FLAG_UNSIGNED;
+
return (result_type);
}