aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.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/values.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/values.c')
-rw-r--r--gdb/values.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 3d4d45e..d7be2b0 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1180,8 +1180,11 @@ unpack_field_as_long (type, valaddr, fieldno)
int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
int lsbcount;
+ struct type *field_type;
val = extract_unsigned_integer (valaddr + bitpos / 8, sizeof (val));
+ field_type = TYPE_FIELD_TYPE (type, fieldno);
+ CHECK_TYPEDEF (field_type);
/* Extract bits. See comment above. */
@@ -1198,7 +1201,7 @@ unpack_field_as_long (type, valaddr, fieldno)
{
valmask = (((ULONGEST) 1) << bitsize) - 1;
val &= valmask;
- if (!TYPE_UNSIGNED (TYPE_FIELD_TYPE (type, fieldno)))
+ if (!TYPE_UNSIGNED (field_type))
{
if (val & (valmask ^ (valmask >> 1)))
{