Message ID | CAGWvnynk4jNchyUNitvTwD1Tq5t4geJvNTg1ALZsMdRYQx6Etg@mail.gmail.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 118792 invoked by alias); 25 Sep 2015 14:53:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 118702 invoked by uid 89); 25 Sep 2015 14:53:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_40, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-io0-f174.google.com Received: from mail-io0-f174.google.com (HELO mail-io0-f174.google.com) (209.85.223.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 25 Sep 2015 14:53:40 +0000 Received: by iofb144 with SMTP id b144so113547171iof.1 for <gdb-patches@sourceware.org>; Fri, 25 Sep 2015 07:53:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.160.194 with SMTP id j185mr6448979ioe.37.1443192818058; Fri, 25 Sep 2015 07:53:38 -0700 (PDT) Received: by 10.36.133.5 with HTTP; Fri, 25 Sep 2015 07:53:38 -0700 (PDT) Date: Fri, 25 Sep 2015 10:53:38 -0400 Message-ID: <CAGWvnynk4jNchyUNitvTwD1Tq5t4geJvNTg1ALZsMdRYQx6Etg@mail.gmail.com> Subject: AIX DWARF debugging sections From: David Edelsohn <dje.gcc@gmail.com> To: Tristan Gingold <gingold@adacore.com>, Joel Brobecker <brobecker@adacore.com> Cc: GDB Patches <gdb-patches@sourceware.org> Content-Type: text/plain; charset=UTF-8 |
Commit Message
David Edelsohn
Sept. 25, 2015, 2:53 p.m. UTC
Initial AIX support for DWARF did not include location lists, debug frame, and macinfo. Support was added in a later update. xcoffread defines most of the sections -- including some that were included later and omitting some that were included in the initial implementation. Does anyone know why pbtyp and mac are not define? I'm not sure if AIX .dwamac is macinfo or macro or both. Thanks, David * xcoffread (dwrf2_xcoff_names): Add .dwmac and .dwpbtyp. { NULL, NULL }, /* eh_frame */
Comments
> On 25 Sep 2015, at 16:53, David Edelsohn <dje.gcc@gmail.com> wrote: > > Initial AIX support for DWARF did not include location lists, debug > frame, and macinfo. Support was added in a later update. > > xcoffread defines most of the sections -- including some that were > included later and omitting some that were included in the initial > implementation. > > Does anyone know why pbtyp and mac are not define? AFAIK, .debug_pubtypes are not read by gdb. > I'm not sure if > AIX .dwamac is macinfo or macro or both. > > Thanks, David Your patch looks ok to me, but should be approved by a global maintainer. Thanks, Tristan.
> > On 25 Sep 2015, at 16:53, David Edelsohn <dje.gcc@gmail.com> wrote: > > > > Initial AIX support for DWARF did not include location lists, debug > > frame, and macinfo. Support was added in a later update. > > > > xcoffread defines most of the sections -- including some that were > > included later and omitting some that were included in the initial > > implementation. > > > > Does anyone know why pbtyp and mac are not define? > > AFAIK, .debug_pubtypes are not read by gdb. > > > I'm not sure if > > AIX .dwamac is macinfo or macro or both. > > > > Thanks, David > > Your patch looks ok to me, but should be approved by > a global maintainer. It looks odd to me that two entries would have the same name. Wouldn't it cause GDB to decode the same section both as .debug_macinfo and .debug_macro?
On Fri, Oct 2, 2015 at 5:32 PM, Joel Brobecker <brobecker@adacore.com> wrote: >> > On 25 Sep 2015, at 16:53, David Edelsohn <dje.gcc@gmail.com> wrote: >> > >> > Initial AIX support for DWARF did not include location lists, debug >> > frame, and macinfo. Support was added in a later update. >> > >> > xcoffread defines most of the sections -- including some that were >> > included later and omitting some that were included in the initial >> > implementation. >> > >> > Does anyone know why pbtyp and mac are not define? >> >> AFAIK, .debug_pubtypes are not read by gdb. >> >> > I'm not sure if >> > AIX .dwamac is macinfo or macro or both. >> > >> > Thanks, David >> >> Your patch looks ok to me, but should be approved by >> a global maintainer. > > It looks odd to me that two entries would have the same name. > Wouldn't it cause GDB to decode the same section both as .debug_macinfo > and .debug_macro? 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
On Fri, Oct 2, 2015 at 3:35 PM, David Edelsohn <dje.gcc@gmail.com> wrote: > On Fri, Oct 2, 2015 at 5:32 PM, Joel Brobecker <brobecker@adacore.com> wrote: >>> > On 25 Sep 2015, at 16:53, David Edelsohn <dje.gcc@gmail.com> wrote: >>> > >>> > Initial AIX support for DWARF did not include location lists, debug >>> > frame, and macinfo. Support was added in a later update. >>> > >>> > xcoffread defines most of the sections -- including some that were >>> > included later and omitting some that were included in the initial >>> > implementation. >>> > >>> > Does anyone know why pbtyp and mac are not define? >>> >>> AFAIK, .debug_pubtypes are not read by gdb. >>> >>> > I'm not sure if >>> > AIX .dwamac is macinfo or macro or both. >>> > >>> > Thanks, David >>> >>> Your patch looks ok to me, but should be approved by >>> a global maintainer. >> >> It looks odd to me that two entries would have the same name. >> Wouldn't it cause GDB to decode the same section both as .debug_macinfo >> and .debug_macro? > > 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.
> > 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?
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? GCC emits it when -g3 is enabled. Ldebug_macinfo vs Ldebug_macro is controlled by dwarf_strict. The current GCC support for DWARF in AIX uses the same section name for both. I am asking the XLC team what they produce for the section. Thanks, David
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. - David
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.
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 0d49751..998ca8f 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 */ + { ".dwmac", NULL }, + { ".dwmac", NULL }, { ".dwstr", NULL }, { ".dwrnges", NULL }, - { NULL, NULL }, /* debug_types */ + { ".dwpbtyp", NULL }, { NULL, NULL }, /* debug_addr */ { ".dwframe", NULL },