]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Display all DWARF 5 language names
authorTom Tromey <tom@tromey.com>
Thu, 5 Apr 2018 16:52:29 +0000 (10:52 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 6 Apr 2018 16:58:34 +0000 (10:58 -0600)
I happened to notice that objdump was not printing "Rust" when showing
the DW_AT_language for a CU:

    <10>   DW_AT_language    : 28 (Unknown: 1c)

This patch adds all the new language constants from DWARF 5 to
binutils/dwarf.c.

2018-04-06  Tom Tromey  <tom@tromey.com>

* dwarf.c (read_and_display_attr_value): Add missing DW_LANG
constants from DWARF 5.

binutils/ChangeLog
binutils/dwarf.c

index 0d8bbc04902b2adc024b3f0c8a1ad37b1f2c2342..a6b8c95d9faf64d62940e832d3942744dde6d8b0 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-06  Tom Tromey  <tom@tromey.com>
+
+       * dwarf.c (read_and_display_attr_value): Add missing DW_LANG
+       constants from DWARF 5.
+
 2018-04-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/22318
index 17896e61107eb53afac4b47820d2b18cf2398a9d..10b4e284ce3cafccd50499700bca84346af85e62 100644 (file)
@@ -2352,12 +2352,22 @@ read_and_display_attr_value (unsigned long           attribute,
          /* DWARF 4 values.  */
        case DW_LANG_Python:            printf ("(Python)"); break;
          /* DWARF 5 values.  */
+       case DW_LANG_OpenCL:            printf ("(OpenCL)"); break;
        case DW_LANG_Go:                printf ("(Go)"); break;
+       case DW_LANG_Modula3:           printf ("(Modula 3)"); break;
+       case DW_LANG_Haskell:           printf ("(Haskell)"); break;
+       case DW_LANG_C_plus_plus_03:    printf ("(C++03)"); break;
        case DW_LANG_C_plus_plus_11:    printf ("(C++11)"); break;
+       case DW_LANG_OCaml:             printf ("(OCaml)"); break;
+       case DW_LANG_Rust:              printf ("(Rust)"); break;
        case DW_LANG_C11:               printf ("(C11)"); break;
+       case DW_LANG_Swift:             printf ("(Swift)"); break;
+       case DW_LANG_Julia:             printf ("(Julia)"); break;
+       case DW_LANG_Dylan:             printf ("(Dylan)"); break;
        case DW_LANG_C_plus_plus_14:    printf ("(C++14)"); break;
        case DW_LANG_Fortran03:         printf ("(Fortran 03)"); break;
        case DW_LANG_Fortran08:         printf ("(Fortran 08)"); break;
+       case DW_LANG_RenderScript:      printf ("(RenderScript)"); break;
          /* MIPS extension.  */
        case DW_LANG_Mips_Assembler:    printf ("(MIPS assembler)"); break;
          /* UPC extension.  */