diff mbox

[RFA/dwarf,v2] Add DW_AT_GNAT_use_descriptive_type flag for Ada units.

Message ID 20140131050905.GC9810@adacore.com
State New
Headers show

Commit Message

Joel Brobecker Jan. 31, 2014, 5:09 a.m. UTC
[resending with the patch - sorry about that]

Hi Jason,

On Tue, Feb 19, 2013 at 10:50:46PM -0500, Jason Merrill wrote:
> On 02/19/2013 10:42 PM, Joel Brobecker wrote:
> >This is useful when a DIE does not have a descriptive type attribute.
> >In that case, the debugger needs to determine whether the unit
> >was compiled with a compiler that normally provides that information,
> >or not.
> 
> Ah.  OK, then.  But I'd prefer to call it
> DW_AT_GNAT_use_descriptive_type, to follow the convention of keeping
> the vendor tag at the beginning of the name.

Almost a year ago, you privately approved a small patch of mine,
with the small request above. I'm sorry I let it drag so long!
Here is the updated patch.

include/ChangeLog:

        * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
        DW_AT_GNAT_use_descriptive_type.

gcc/ChangeLog:

        * dwarf2out.c (gen_compile_unit_die): Add
        DW_AT_use_GNAT_descriptive_type attribute for Ada units.

Tested on x86_64-linux.

I should also adjust the Wiki page accordingly, but the login process
keeps timing out. I know I have the right login and passwd since
I succesfully reset them using the passwd recovery procedure, just
in case the error was due to bad credentials. I'll try again later.

If approved, I will also take care of coordinating the dwarf2.def
change with binutils-gdb.git.

Is this patch still OK to commit?

Thank you,

Comments

Joel Brobecker Feb. 21, 2014, 8:59 a.m. UTC | #1
Hello,

Would anyone be able to (re-)approve this patch, please?

It should be really really straightforward, and only adds a DWARF
flag to Ada Compilation Units, so I should think that the risk
is near zero. I've tested the patch as usual regardless.

Parallel to that, we have also started working on producing
standard DWARF in place of our encodings, and small progress has been
made. But this is even more of a huge task than we thought, and in
the meantime, this little flag will help non-AdaCore users...

Thank you!

On Fri, Jan 31, 2014 at 09:09:05AM +0400, Joel Brobecker wrote:
> On Tue, Feb 19, 2013 at 10:50:46PM -0500, Jason Merrill wrote:
> > On 02/19/2013 10:42 PM, Joel Brobecker wrote:
> > >This is useful when a DIE does not have a descriptive type attribute.
> > >In that case, the debugger needs to determine whether the unit
> > >was compiled with a compiler that normally provides that information,
> > >or not.
> > 
> > Ah.  OK, then.  But I'd prefer to call it
> > DW_AT_GNAT_use_descriptive_type, to follow the convention of keeping
> > the vendor tag at the beginning of the name.
> 
> Almost a year ago, you privately approved a small patch of mine,
> with the small request above. I'm sorry I let it drag so long!
> Here is the updated patch.
> 
> include/ChangeLog:
> 
>         * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
>         DW_AT_GNAT_use_descriptive_type.
> 
> gcc/ChangeLog:
> 
>         * dwarf2out.c (gen_compile_unit_die): Add
>         DW_AT_use_GNAT_descriptive_type attribute for Ada units.
> 
> Tested on x86_64-linux.
> 
> I should also adjust the Wiki page accordingly, but the login process
> keeps timing out. I know I have the right login and passwd since
> I succesfully reset them using the passwd recovery procedure, just
> in case the error was due to bad credentials. I'll try again later.
> 
> If approved, I will also take care of coordinating the dwarf2.def
> change with binutils-gdb.git.
> 
> Is this patch still OK to commit?
> 
> Thank you,
> -- 
> Joel

> >From 7aae3721addf6905113d9f0287a5cbb5301a462b Mon Sep 17 00:00:00 2001
> From: Joel Brobecker <brobecker@adacore.com>
> Date: Thu, 3 Jan 2013 09:25:12 -0500
> Subject: [PATCH] [dwarf] Add DW_AT_GNAT_use_descriptive_type flag for Ada units.
> 
> This patch first renames the DW_AT_use_GNAT_descriptive_type DWARF
> attribute into DW_AT_GNAT_use_descriptive_type to better follow
> the usual convention of keeping the vendor tag at the beginning
> of the name.
> 
> It then modifies dwadrf2out to generate this attribute for Ada units.
> 
> include/ChangeLog:
> 
>         * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
>         DW_AT_GNAT_use_descriptive_type.
> 
> gcc/ChangeLog:
> 
>         * dwarf2out.c (gen_compile_unit_die): Add
>         DW_AT_use_GNAT_descriptive_type attribute for Ada units.
> ---
>  gcc/dwarf2out.c    |    4 ++++
>  include/dwarf2.def |    2 +-
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
> index d1ca4ba..057605c 100644
> --- a/gcc/dwarf2out.c
> +++ b/gcc/dwarf2out.c
> @@ -19318,6 +19318,10 @@ gen_compile_unit_die (const char *filename)
>        /* The default DW_ID_case_sensitive doesn't need to be specified.  */
>        break;
>      }
> +
> +  if (language == DW_LANG_Ada95)
> +    add_AT_flag (die, DW_AT_GNAT_use_descriptive_type, 1);
> +
>    return die;
>  }
>  
> diff --git a/include/dwarf2.def b/include/dwarf2.def
> index 71a37b3..4dd636e 100644
> --- a/include/dwarf2.def
> +++ b/include/dwarf2.def
> @@ -398,7 +398,7 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
>  /* GNAT extensions.  */
>  /* GNAT descriptive type.
>     See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
> -DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
> +DW_AT (DW_AT_GNAT_use_descriptive_type, 0x2301)
>  DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
>  /* UPC extension.  */
>  DW_AT (DW_AT_upc_threads_scaled, 0x3210)
> -- 
> 1.7.0.4
>
Joel Brobecker May 8, 2014, 1:28 p.m. UTC | #2
Ping? I understand there was a freeze period for a while, but the patch
has been out for a little over 3 months, now, and is fairly trivial.
Can someone review it for me?

Suggest also including it in 4.9.

Thank you!

> On Tue, Feb 19, 2013 at 10:50:46PM -0500, Jason Merrill wrote:
> > On 02/19/2013 10:42 PM, Joel Brobecker wrote:
> > >This is useful when a DIE does not have a descriptive type attribute.
> > >In that case, the debugger needs to determine whether the unit
> > >was compiled with a compiler that normally provides that information,
> > >or not.
> > 
> > Ah.  OK, then.  But I'd prefer to call it
> > DW_AT_GNAT_use_descriptive_type, to follow the convention of keeping
> > the vendor tag at the beginning of the name.
> 
> Almost a year ago, you privately approved a small patch of mine,
> with the small request above. I'm sorry I let it drag so long!
> Here is the updated patch.
> 
> include/ChangeLog:
> 
>         * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
>         DW_AT_GNAT_use_descriptive_type.
> 
> gcc/ChangeLog:
> 
>         * dwarf2out.c (gen_compile_unit_die): Add
>         DW_AT_use_GNAT_descriptive_type attribute for Ada units.
> 
> Tested on x86_64-linux.
> 
> I should also adjust the Wiki page accordingly, but the login process
> keeps timing out. I know I have the right login and passwd since
> I succesfully reset them using the passwd recovery procedure, just
> in case the error was due to bad credentials. I'll try again later.
> 
> If approved, I will also take care of coordinating the dwarf2.def
> change with binutils-gdb.git.
> 
> Is this patch still OK to commit?
> 
> Thank you,
> -- 
> Joel

> >From 7aae3721addf6905113d9f0287a5cbb5301a462b Mon Sep 17 00:00:00 2001
> From: Joel Brobecker <brobecker@adacore.com>
> Date: Thu, 3 Jan 2013 09:25:12 -0500
> Subject: [PATCH] [dwarf] Add DW_AT_GNAT_use_descriptive_type flag for Ada units.
> 
> This patch first renames the DW_AT_use_GNAT_descriptive_type DWARF
> attribute into DW_AT_GNAT_use_descriptive_type to better follow
> the usual convention of keeping the vendor tag at the beginning
> of the name.
> 
> It then modifies dwadrf2out to generate this attribute for Ada units.
> 
> include/ChangeLog:
> 
>         * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
>         DW_AT_GNAT_use_descriptive_type.
> 
> gcc/ChangeLog:
> 
>         * dwarf2out.c (gen_compile_unit_die): Add
>         DW_AT_use_GNAT_descriptive_type attribute for Ada units.
> ---
>  gcc/dwarf2out.c    |    4 ++++
>  include/dwarf2.def |    2 +-
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
> index d1ca4ba..057605c 100644
> --- a/gcc/dwarf2out.c
> +++ b/gcc/dwarf2out.c
> @@ -19318,6 +19318,10 @@ gen_compile_unit_die (const char *filename)
>        /* The default DW_ID_case_sensitive doesn't need to be specified.  */
>        break;
>      }
> +
> +  if (language == DW_LANG_Ada95)
> +    add_AT_flag (die, DW_AT_GNAT_use_descriptive_type, 1);
> +
>    return die;
>  }
>  
> diff --git a/include/dwarf2.def b/include/dwarf2.def
> index 71a37b3..4dd636e 100644
> --- a/include/dwarf2.def
> +++ b/include/dwarf2.def
> @@ -398,7 +398,7 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
>  /* GNAT extensions.  */
>  /* GNAT descriptive type.
>     See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
> -DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
> +DW_AT (DW_AT_GNAT_use_descriptive_type, 0x2301)
>  DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
>  /* UPC extension.  */
>  DW_AT (DW_AT_upc_threads_scaled, 0x3210)
> -- 
> 1.7.0.4
>
diff mbox

Patch

From 7aae3721addf6905113d9f0287a5cbb5301a462b Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Thu, 3 Jan 2013 09:25:12 -0500
Subject: [PATCH] [dwarf] Add DW_AT_GNAT_use_descriptive_type flag for Ada units.

This patch first renames the DW_AT_use_GNAT_descriptive_type DWARF
attribute into DW_AT_GNAT_use_descriptive_type to better follow
the usual convention of keeping the vendor tag at the beginning
of the name.

It then modifies dwadrf2out to generate this attribute for Ada units.

include/ChangeLog:

        * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into
        DW_AT_GNAT_use_descriptive_type.

gcc/ChangeLog:

        * dwarf2out.c (gen_compile_unit_die): Add
        DW_AT_use_GNAT_descriptive_type attribute for Ada units.
---
 gcc/dwarf2out.c    |    4 ++++
 include/dwarf2.def |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index d1ca4ba..057605c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19318,6 +19318,10 @@  gen_compile_unit_die (const char *filename)
       /* The default DW_ID_case_sensitive doesn't need to be specified.  */
       break;
     }
+
+  if (language == DW_LANG_Ada95)
+    add_AT_flag (die, DW_AT_GNAT_use_descriptive_type, 1);
+
   return die;
 }
 
diff --git a/include/dwarf2.def b/include/dwarf2.def
index 71a37b3..4dd636e 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -398,7 +398,7 @@  DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
 /* GNAT extensions.  */
 /* GNAT descriptive type.
    See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
-DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
+DW_AT (DW_AT_GNAT_use_descriptive_type, 0x2301)
 DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
 /* UPC extension.  */
 DW_AT (DW_AT_upc_threads_scaled, 0x3210)
-- 
1.7.0.4