Replace "exec" with "executable" in messages.
[deliverable/binutils-gdb.git] / gdb / values.c
index 69c19a6399ce358ed5e46861f5aa3c576a4ac694..d7be2b00aff9218e57c88c7243bd4e6c402b7c1c 100644 (file)
@@ -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)))
            {
@@ -1291,7 +1294,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;
 }
This page took 0.0249200000000001 seconds and 4 git commands to generate.