This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: AIX DWARF debugging sections
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Tristan Gingold <gingold at adacore dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 7 Oct 2015 08:49:21 -0400
- Subject: Re: AIX DWARF debugging sections
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnynk4jNchyUNitvTwD1Tq5t4geJvNTg1ALZsMdRYQx6Etg at mail dot gmail dot com> <E9A58816-DE48-4BD2-84D9-90C2D3723D5F at adacore dot com> <20151002213227 dot GA3602 at adacore dot com> <CAGWvnyk5YtqV=kjDa=MVJup7wdt2s=BdADAVAvg+D9rp9ihxfA at mail dot gmail dot com> <CADPb22RhyhWrxLu2vy-TOp7ua97BWBJ6Loa9puoSFiYZq82NBg at mail dot gmail dot com> <20151006165157 dot GA3341 at adacore dot com> <CAGWvnykS9J5cHfbDg4swVhXZdJ+Lzk7JQmikbPrXh2E4p-xshg at mail dot gmail dot com> <CADPb22Q1s4q7NCzUO5iLt0cT8ewH21RhmHTnyPh7AS=4nhFmsw at mail dot gmail dot com>
On Tue, Oct 6, 2015 at 3:59 PM, Doug Evans <dje@google.com> wrote:
> On Tue, Oct 6, 2015 at 11:24 AM, David Edelsohn <dje.gcc@gmail.com> wrote:
>> On Tue, Oct 6, 2015 at 12:51 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>>>> > Because the AIX section does not use the standard name, I am unsure
>>>> > which it represents. The documentation only states "dwmac", which
>>>> > could expand to either name.
>>>> >
>>>> > Thanks, David
>>>>
>>>> Yeah, I think we need to figure out which one it is.
>>>
>>> That's what I have been trying to do, but I don't see any evidence
>>> that GCC emits it, or that binutils handles it. So the answer must
>>> lie somewhere on the system side. David?
>>
>> The official answer from IBM XLC is the section is for both
>> .debug_macinfo and .debug_macro
>>
>> For DWARF4 and below, the dwmac section corresponds to .debug_macinfo.
>> For DWARF5 and above, the dwmac section corresponds to .debug_macro.
>>
>> XLC currently does not generate any macro debugging information for DWARF4.
>
> Huh.
> Let's make sure this is documented in the code.
Is the following sufficient or you would like more exposition?
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0d49751..86d4ca4 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -159,11 +159,11 @@ static const struct dwarf2_debug_sections
dwarf2_xcoff_names = {
{ ".dwabrev", NULL },
{ ".dwline", NULL },
{ ".dwloc", NULL },
- { NULL, NULL }, /* debug_macinfo */
- { NULL, NULL }, /* debug_macro */
+ { ".dwmac", NULL }, /* 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 */
Thanks, David