This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] DWARF support for AIX v3
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Sep 2015 10:19:41 -0400
- Subject: Re: [PATCH] DWARF support for AIX v3
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnynQevxr0ey85G7940zuHkbZrhNj25U8ZTLO0S9LkgGm_A at mail dot gmail dot com> <CAFiYyc3XqO-54+2eyf966eg5xYiXZHQwFd6FZpoDBn3K-Pd-mQ at mail dot gmail dot com> <CAGWvnynYbt4g_yRfEupPtp3T6SmUEvGNmaBYdSJiVD-Ayz0MqA at mail dot gmail dot com> <4D81760A-DA07-4FE5-9916-08FC5C318C9D at gmail dot com> <20150922135003 dot GA18514 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <CAGWvny=3F4AWTk03ATX8kaB9tPY9GUf_DZpvsGMW93_DCwWbEQ at mail dot gmail dot com>
On Tue, Sep 22, 2015 at 10:09:51AM -0400, David Edelsohn wrote:
> On Tue, Sep 22, 2015 at 9:54 AM, Trevor Saunders <tbsaunde@tbsaunde.org> wrote:
> > On Tue, Sep 22, 2015 at 03:16:28PM +0200, Richard Biener wrote:
> >> On September 22, 2015 2:38:34 PM GMT+02:00, David Edelsohn <dje.gcc@gmail.com> wrote:
> >> >On Tue, Sep 22, 2015 at 4:12 AM, Richard Biener
> >> ><richard.guenther@gmail.com> wrote:
> >> >> On Mon, Sep 21, 2015 at 5:41 PM, David Edelsohn <dje.gcc@gmail.com>
> >> >wrote:
> >> >>> Appended is a patch to support DWARF on AIX and works with GDB and
> >> >AIX
> >> >>> assembler. The AIX assembler prepends the CU length to the section
> >> >>> and does not want the compiler to provide it, so I need to disable
> >> >>> those parts of dwarf2out.c. I know it's ugly, but, on the upside,
> >> >>> this eventually allows GCC to deprecate Stabs, which I think is
> >> >worth
> >> >>> the pain.
> >> >>>
> >> >>> I discovered that -g3 emits the debug_macros section, which AIX also
> >> >>> does not like, so I disable that section as well. As I mentioned in
> >> >>> v2, I moved the calculation of aranges_length to its one use in the
> >> >>> output function instead of calculating it early to avoid an unused
> >> >>> function argument.
> >> >>>
> >> >>> I also switched to XCOFF_DEBUGGING_INFO as the macro to test in
> >> >>> dwarf2out.c. I think a target hook or testing that DWARF section
> >> >>> names have not been overridden to NULL is overkill. Suggestions
> >> >>> welcome, but any solution that disables arbitrary portions of
> >> >>> dwarf2out.c is going to be ugly. I doubt that any other system,
> >> >>> especially ones based on ELF file format, would ever do this.
> >> >>
> >> >> Using an existing macro works for me - but as we are working towards
> >> >> eliminating conditional compilation can you try using
> >> >>
> >> >> if (!XCOFF_DEBUGGING_INFO)
> >> >>
> >> >> ? If the macro is not always defined devise a new one defined from
> >> >> XCOFF_DEBUGGING_INFO.
> >> >
> >> >You prefer that I define a new macro in defaults.h instead of
> >> >
> >> >#ifndef XCOFF_DEBUGGING_INFO
> >> >#define XCOFF_DEBUGGING_INFO 0
> >> >#endif
> >> >
> >> >in dwarf2out.c?
> >>
> >> Or, if that works, add a default for XCOFF_DEBUGGING_INFO.
> >>
> >> I thought of a dwarf2out.c local define.
> >
> > I wouldn't worry about this too much, I have local patches turning the
> > X_DEBUGGING_INFO macros into 0/1 instead of undef / def, so which I
> > expect to commit in the next week or so.
>
> XCOFF_DEBUGGING_INFO currently conditionally includes header files and
> conditionally compiles code that depends on macros only defined for
> AIX. You addressed all of those dependencies?
no, the headers are still conditionally included, only now with #if
XCOFF_DEBUGGING_INFO instead of #ifdef.
Trev
>
> Thanks, David