Re: AIX DWARF debugging sections

David Edelsohn
2015-10-12T17:41:59Z

On Mon, Oct 12, 2015 at 11:50 AM, Joel Brobecker <brobecker@adacore.com> wrote:

>> AIX XLC apparently will not utilize .dwmac macro section until DWARF5
>> to encore the .debug_macro section, so GCC and GDB should utilize it
>> as .debug_macro and not produce or consume .debug_macinfo.
>
> OK, if macinfo data cannot be generated by XLC, then it would make
> sense to me to just ammend your patch to only update the .debug_macro
> entry. If that's correct, then that avoids the concern I had about
> having two entries with the same section name.

Appended is a revised patch that associates .dwmac with debug_macro.
I will revise GCC accordingly.

Thanks, David

* xcoffread (dwrf2_xcoff_names): Add .dwmac and .dwpbtyp.

diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0d49751..5f27859 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -159,11 +159,11 @@ static const struct dwarf2_debug_sections dwarf2_xcoff_nam
es = {
{ ".dwabrev", NULL },
{ ".dwline", NULL },
{ ".dwloc", NULL },
- { NULL, NULL }, /* debug_macinfo */
- { NULL, NULL }, /* debug_macro */
+ { NULL, NULL }, /* XLC does not generate debug_macinfo for DWARF4 and below *
/
+ { ".dwmac", NULL }, /* debug_macro for DWARF5 and above */
{ ".dwstr", NULL },
{ ".dwrnges", NULL },
- { NULL, NULL }, /* debug_types */
+ { ".dwpbtyp", NULL },
{ NULL, NULL }, /* debug_addr */
{ ".dwframe", NULL },
{ NULL, NULL }, /* eh_frame */