From 5ce1eedb7807b5f908a111e4838a6a538af56619 Mon Sep 17 00:00:00 2001 From: nickc Date: Tue, 10 Dec 2002 17:48:25 +0000 Subject: [PATCH] Add support for displaying extension to DWARF2 used by Unified Parallel C compiler. --- binutils/ChangeLog | 7 +++++++ binutils/NEWS | 3 +++ binutils/readelf.c | 8 ++++++++ include/elf/ChangeLog | 6 ++++++ include/elf/dwarf2.h | 20 ++++++++++++++------ 5 files changed, 38 insertions(+), 6 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 573830bb3c..ec9ca6366e 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2002-12-10 James Cownie + + * readelf.h (get_TAG_name, get_AT_name, + read_and_display_attr_value): Add support for UPC extenstions to + DWARF2 spec. + * NEWS: Mention this new support. + 2002-12-08 Alan Modra * NEWS: Mention that bfd no longer declares a "boolean" type. diff --git a/binutils/NEWS b/binutils/NEWS index 9a34ecbc9f..74042b13a4 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* readelf can handle the extensions to the DWARF2 spec used by the Unified + Parallel C compiler. + * BFD no longer declares a "boolean" type, to avoid clashes with other headers that declare the same. Users of BFD should replace boolean, false and true, with int, 0 and 1, or define their own boolean type. diff --git a/binutils/readelf.c b/binutils/readelf.c index 6a5732a0a5..461d63f701 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -6735,6 +6735,10 @@ get_TAG_name (tag) case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type"; case DW_TAG_partial_unit: return "DW_TAG_partial_unit"; case DW_TAG_imported_unit: return "DW_TAG_imported_unit"; + /* UPC values. */ + case DW_TAG_upc_shared_type: return "DW_TAG_upc_shared_type"; + case DW_TAG_upc_strict_type: return "DW_TAG_upc_strict_type"; + case DW_TAG_upc_relaxed_type: return "DW_TAG_upc_relaxed_type"; default: { static char buffer[100]; @@ -6847,6 +6851,8 @@ get_AT_name (attribute) case DW_AT_body_begin: return "DW_AT_body_begin"; case DW_AT_body_end: return "DW_AT_body_end"; case DW_AT_GNU_vector: return "DW_AT_GNU_vector"; + /* UPC extension. */ + case DW_AT_upc_threads_scaled: return "DW_AT_upc_threads_scaled"; default: { static char buffer[100]; @@ -7933,6 +7939,8 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size) case DW_LANG_Fortran95: printf ("(Fortran 95)"); break; /* MIPS extension. */ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break; + /* UPC extension. */ + case DW_LANG_Upc: printf ("(Unified Parallel C)"); break; default: printf ("(Unknown: %lx)", uvalue); break; diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index bba6fd56f7..1dd7fd5f36 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,9 @@ +2002-12-10 James Cownie + + * dwarf2.h (DW_TAG_upc_shared_type, DW_TAG_upc_strict_type, + DW_TAG_upc_relaxed_type, DW_AT_upc_threads_scaled, DW_LANG_Upc): + Define. + 2002-12-01 Stephane Carrez * m68hc11.h (EF_M68HC12_MACH, EF_M68HCS12_MACH): Define. diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h index 6463b5a908..9c8ce4e006 100644 --- a/include/elf/dwarf2.h +++ b/include/elf/dwarf2.h @@ -87,7 +87,7 @@ typedef struct } DWARF2_Internal_PubNames; -/* Strcuture found in .debug_info section. */ +/* Structure found in .debug_info section. */ typedef struct { unsigned char cu_length [4]; @@ -194,7 +194,11 @@ enum dwarf_tag DW_TAG_function_template = 0x4102, /* For C++. */ DW_TAG_class_template = 0x4103, /* For C++. */ DW_TAG_GNU_BINCL = 0x4104, - DW_TAG_GNU_EINCL = 0x4105 + DW_TAG_GNU_EINCL = 0x4105, + /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ + DW_TAG_upc_shared_type = 0x8765, + DW_TAG_upc_strict_type = 0x8766, + DW_TAG_upc_relaxed_type = 0x8767 }; #define DW_TAG_lo_user 0x4080 @@ -309,7 +313,7 @@ enum dwarf_attribute DW_AT_call_column = 0x57, DW_AT_call_file = 0x58, DW_AT_call_line = 0x59, - /* SGI/MIPS Extensions. */ + /* SGI/MIPS extensions. */ DW_AT_MIPS_fde = 0x2001, DW_AT_MIPS_loop_begin = 0x2002, DW_AT_MIPS_tail_loop_begin = 0x2003, @@ -329,8 +333,10 @@ enum dwarf_attribute DW_AT_body_begin = 0x2105, DW_AT_body_end = 0x2106, DW_AT_GNU_vector = 0x2107, - /* VMS Extensions. */ - DW_AT_VMS_rtnbeg_pd_address = 0x2201 + /* VMS extensions. */ + DW_AT_VMS_rtnbeg_pd_address = 0x2201, + /* UPC extension. */ + DW_AT_upc_threads_scaled = 0x3210 }; #define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ @@ -678,7 +684,9 @@ enum dwarf_source_language DW_LANG_Ada95 = 0x000d, DW_LANG_Fortran95 = 0x000e, /* MIPS. */ - DW_LANG_Mips_Assembler = 0x8001 + DW_LANG_Mips_Assembler = 0x8001, + /* UPC. */ + DW_LANG_Upc = 0x8765 }; #define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ -- 2.11.0