DisplayDWARF2 basic type encodings.
authorNick Clifton <nickc@redhat.com>
Tue, 2 Feb 1999 12:12:11 +0000 (12:12 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 2 Feb 1999 12:12:11 +0000 (12:12 +0000)
binutils/ChangeLog
binutils/readelf.c

index b50f2047932ac95e5dd56bde562527e435e71414..12586f5ac43525abebbf50a0e162f713f1bebeab 100644 (file)
@@ -1,5 +1,8 @@
 1999-02-02  Nick Clifton  <nickc@cygnus.com>
 
+       * readelf.c (read_and_display_attr): Add display of basic type
+       encodings. 
+
        * binutils.texi: Fixed bug in readefl documentation.
 
 Mon Feb  1 12:38:01 1999  Catherine Moore  <clm@cygnus.com>
index a0e012870b80753264994ce8568a8cd29928ea68..068ec239ac6746920a67b66ad534f1f691cfbb3a 100644 (file)
@@ -4259,6 +4259,27 @@ read_and_display_attr (attribute, form, data, pointer_size)
        default:                     printf ("(Unknown: %x)", uvalue); break;
        }
       break;
+
+    case DW_AT_encoding:
+      switch (uvalue)
+       {
+       case DW_ATE_void:            printf ("(void)"); break;
+       case DW_ATE_address:         printf ("(machine address)"); break;
+       case DW_ATE_boolean:         printf ("(boolean)"); break;
+       case DW_ATE_complex_float:   printf ("(complex float)"); break;
+       case DW_ATE_float:           printf ("(float)"); break;
+       case DW_ATE_signed:          printf ("(signed)"); break;
+       case DW_ATE_signed_char:     printf ("(signed char)"); break;
+       case DW_ATE_unsigned:        printf ("(unsigned)"); break;
+       case DW_ATE_unsigned_char:   printf ("(unsigned char)"); break;
+       default:
+         if (uvalue >= DW_ATE_lo_user
+             && uvalue <= DW_ATE_hi_user)
+           printf ("(user defined type)");
+         else
+           printf ("(unknown type)");
+         break;
+       }
       
     default:
       break;