This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Support UPC extensions to dwarf3 in readelf
- From: James Cownie <jcownie at etnus dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 28 Nov 2002 15:34:10 +0000
- Subject: [PATCH] Support UPC extensions to dwarf3 in readelf
- Reply-to: James Cownie <jcownie at etnus dot com>
Folks,
These patches against binutils 2.13.1 allow readelf to dump the
additional DWARF tags defined for use with the UPC language (see
http://upc.gwu.edu/~upc
and
http://upc.gwu.edu/~upc/workgrps/dwarf2_proposal.htm
).
These tags are generated by the GCC/UPC compiler.
If they're acceptable please roll this support into the normal
binutils release. (It only affects readelf, there are no changes
required elsewhere).
Thanks
-- Jim
James Cownie <jcownie@etnus.com>
Etnus, LLC. +44 117 9071438
http://www.etnus.com
--- binutils/readelf.c~ Mon Oct 28 18:45:47 2002
+++ binutils/readelf.c Thu Nov 28 15:22:39 2002
@@ -6579,6 +6579,10 @@
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];
@@ -6690,6 +6694,8 @@
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];
@@ -7760,6 +7766,8 @@
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 ("(UPC)"); break;
default: printf ("(Unknown: %lx)", uvalue); break;
}
break;
jcownie@pc4: diff -u include/elf/dwarf2.h~ include/elf/dwarf2.h
--- include/elf/dwarf2.h~ Fri May 31 16:28:33 2002
+++ include/elf/dwarf2.h Thu Nov 28 15:18:16 2002
@@ -194,7 +194,12 @@
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 */
+ DW_TAG_upc_shared_type = 0x8765,
+ DW_TAG_upc_strict_type = 0x8766,
+ DW_TAG_upc_relaxed_type = 0x8767
+
};
#define DW_TAG_lo_user 0x4080
@@ -330,7 +335,9 @@
DW_AT_body_end = 0x2106,
DW_AT_GNU_vector = 0x2107,
/* VMS Extensions. */
- DW_AT_VMS_rtnbeg_pd_address = 0x2201
+ 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. */
@@ -676,7 +683,9 @@
DW_LANG_Ada95 = 0x000d,
DW_LANG_Fortran95 = 0x000e,
/* MIPS. */
- DW_LANG_Mips_Assembler = 0x8001
+ DW_LANG_Mips_Assembler = 0x8001,
+ /* UPC */
+ DW_LANG_Upc = 0x8765
};