This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] include/dwarf2.def: Add DW_AT_APPLE macros


Here is a trivial patch which adds DW_AT_APPLE macros:

It seems recent clang emits some of these macros even for linux
binaries so we might want to add them.

% clang --version
clang version 3.2 (trunk 161757)
Target: x86_64-unknown-linux-gnu
Thread model: posix
% clang -g -O hello.c
% readelf -wi a.out | grep Unknown
    <26>   Unknown AT value: 3fe1: 1
    <45>   Unknown AT value: 3fe7: 1

I've ever done the copyright assignment process for binutils but I
don't have commit access. It is great if someone kindly commits this
patch if it is approved.


2012-09-23  Shinichiro Hamaji  <>

	* dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
	(DW_AT_APPLE_isa, DW_AT_APPLE_block)
	(DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
	(DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
	(DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
	(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
	(DW_AT_APPLE_property, DW_OP_GNU_entry_value): New macros.

diff --git a/include/dwarf2.def b/include/dwarf2.def
index 7fe2df1..d568765 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -403,6 +403,22 @@ DW_AT (DW_AT_upc_threads_scaled, 0x3210)
 DW_AT (DW_AT_PGI_lbase, 0x3a00)
 DW_AT (DW_AT_PGI_soffset, 0x3a01)
 DW_AT (DW_AT_PGI_lstride, 0x3a02)
+/* Apple extensions. */
+DW_AT (DW_AT_APPLE_optimized, 0x3fe1)
+DW_AT (DW_AT_APPLE_flags, 0x3fe2)
+DW_AT (DW_AT_APPLE_isa, 0x3fe3)
+DW_AT (DW_AT_APPLE_block, 0x3fe4)
+DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5)
+DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6)
+DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7)
+DW_AT (DW_AT_APPLE_property_name, 0x3fe8)
+DW_AT (DW_AT_APPLE_property_getter, 0x3fe9)
+DW_AT (DW_AT_APPLE_property_setter, 0x3fea)
+DW_AT (DW_AT_APPLE_property_attribute, 0x3feb)
+DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec)
+DW_AT (DW_AT_APPLE_property, 0x3fed)

 DW_FIRST_OP (DW_OP_addr, 0x03)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]