This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] dwarf2asm.c for AIX


dw2_asm_output_nstring() essentially inlines the version of
OUTPUT_ASCII for the GNU Assembler ELF file format for the debug_asm
case to append the comment and calls OUTPUT_ASCII when not debugging.
The DWARF portion of the GCC testsuite relies on the text that appears
in the comments, so it needs to work somewhat on AIX.

The function previously had been adjusted to emit the AIX assembler
.byte directive.  The AIX assembler escapes double quotes with another
double quote, not a backslash.  The AIX toolchain added support for
the debug_macinfo section and macros with quotes generate assembler
errors when debug_asm is enabled.

This patch adjusts the function to emit a double quote instead of a
backslash when XCOFF_DEBUGGING_INFO is defined for AIX.

Bootstrapped on powerpc-ibm-aix7.2.0.0

Okay?

Thanks, David

Index: dwarf2asm.c
===================================================================
--- dwarf2asm.c (revision 250453)
+++ dwarf2asm.c (working copy)
@@ -345,7 +345,9 @@ dw2_asm_output_nstring (const char *str, size_t or
       for (i = 0; i < len; i++)
        {
          int c = str[i];
-         if (c == '\"' || c == '\\')
+         if (c == '\"')
+           fputc (XCOFF_DEBUGGING_INFO ? '\"' : '\\', asm_out_file);
+         else if (c == '\\')
            fputc ('\\', asm_out_file);
          if (ISPRINT (c))
            fputc (c, asm_out_file);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]