diff mbox

DW_AT_APPLE_* DWARF extensions.

Message ID 20141113122121.GK3565@embecosm.com
State New
Headers show

Commit Message

Andrew Burgess Nov. 13, 2014, 12:21 p.m. UTC
* Jakub Jelinek <jakub@redhat.com> [2014-11-13 10:55:34 +0100]:

> On Thu, Nov 13, 2014 at 10:35:28AM +0100, Andrew Burgess wrote:
> > Am I correct to think that the include/* files are owned by GCC, and
> > so the mistake here was not propagating the change to the GCC
> > repository?
>
> Yes.
>
> > 2014-11-13  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
> >
> > 	* 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.
>
> You aren't adding DW_OP_GNU_entry_value, that is already there.

That will teach me for just using the previous commit message, without
checking it.

> Perhaps a comment with a link to documentation of those would
> be helpful here.

I had a look around and couldn't find anything helpful.  The best I
can offer would be the current path within the llvm source code where
these are defined.  Would that be sufficient?

Updated patch below.  If this is acceptable could someone commit to
GCC please.

Thanks,
Andrew

---

2014-11-13  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>

	* dwarf2.def (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): New macros.

Comments

Jakub Jelinek Nov. 13, 2014, 1:13 p.m. UTC | #1
On Thu, Nov 13, 2014 at 01:21:21PM +0100, Andrew Burgess wrote:
> I had a look around and couldn't find anything helpful.  The best I
> can offer would be the current path within the llvm source code where
> these are defined.  Would that be sufficient?

That is not useful.  The point is not to suggest where those constants come
from but what they mean, see e.g. the
http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open
http://gcc.gnu.org/wiki/TemplateParmsDwarf
etc. links that describe what the extensions do.
If LLVM doesn't have any documentation of their extensions, then just
/* Apple extensions.  */
is good enough.

	Jakub
diff mbox

Patch

diff --git a/include/dwarf2.def b/include/dwarf2.def
index 71a37b3..35d01b8 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -406,6 +406,21 @@  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.  These are defined within the LLVM source code in the
+   file llvm/include/llvm/Support/Dwarf.h.  */
+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_END_AT
 
 DW_FIRST_OP (DW_OP_addr, 0x03)