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: David Edelsohn <dje dot gcc at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Sep 2015 08:38:34 -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>
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?
- David