AIX DWARF debugging sections

Message ID CAGWvny=suvd=yEC3WYd9YpsLaW_O+zCQSXBm=tfekeutyZ6xUQ@mail.gmail.com
State New, archived
Headers

Commit Message

David Edelsohn Oct. 13, 2015, 3:33 p.m. UTC
  On Mon, Oct 12, 2015 at 2:34 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Thanks, David
>>
>> * xcoffread (dwrf2_xcoff_names): Add .dwmac and .dwpbtyp.
>
> Looks good to me with just one nit.
> the GNU Coding Standards ask us that sentences end with a period. So
> unfortunately, we're going to have to split that line in two.

For full sentences, we might as well document it more completely.

Thanks, David

   { NULL, NULL }, /* eh_frame */
  

Comments

Joel Brobecker Oct. 13, 2015, 4:45 p.m. UTC | #1
> For full sentences, we might as well document it more completely.

Good idea. The patch looks good to me.

> diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
> index 0d49751..e4af37c 100644
> --- a/gdb/xcoffread.c
> +++ b/gdb/xcoffread.c
> @@ -159,11 +159,14 @@ static const struct dwarf2_debug_sections dwarf2_xcoff_nam
> es = {
>    { ".dwabrev", NULL },
>    { ".dwline", NULL },
>    { ".dwloc", NULL },
> -  { NULL, NULL }, /* debug_macinfo */
> -  { NULL, NULL }, /* debug_macro */
> +  /* AIX XCOFF defines one, named DWARF section for macro debug information.
> +     XLC does not generate debug_macinfo for DWARF4 and below.
> +     The section is assigned to debug_macro for DWARF5 and above. */
> +  { NULL, NULL },
> +  { ".dwmac", NULL },
>    { ".dwstr", NULL },
>    { ".dwrnges", NULL },
> -  { NULL, NULL }, /* debug_types */
> +  { ".dwpbtyp", NULL },
>    { NULL, NULL }, /* debug_addr */
>    { ".dwframe", NULL },
>    { NULL, NULL }, /* eh_frame */
  

Patch

diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0d49751..e4af37c 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -159,11 +159,14 @@  static const struct dwarf2_debug_sections dwarf2_xcoff_nam
es = {
   { ".dwabrev", NULL },
   { ".dwline", NULL },
   { ".dwloc", NULL },
-  { NULL, NULL }, /* debug_macinfo */
-  { NULL, NULL }, /* debug_macro */
+  /* AIX XCOFF defines one, named DWARF section for macro debug information.
+     XLC does not generate debug_macinfo for DWARF4 and below.
+     The section is assigned to debug_macro for DWARF5 and above. */
+  { NULL, NULL },
+  { ".dwmac", NULL },
   { ".dwstr", NULL },
   { ".dwrnges", NULL },
-  { NULL, NULL }, /* debug_types */
+  { ".dwpbtyp", NULL },
   { NULL, NULL }, /* debug_addr */
   { ".dwframe", NULL },