Bug 44171 - gcc -gdwarf-2 -dA unconditionally emits .ascii
Summary: gcc -gdwarf-2 -dA unconditionally emits .ascii
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: assemble-failure
Depends on:
Blocks:
 
Reported: 2010-05-17 17:28 UTC by Rainer Orth
Modified: 2011-07-18 16:15 UTC (History)
2 users (show)

See Also:
Host: i386-pc-solaris2*
Target: i386-pc-solaris2*
Build: i386-pc-solaris2*
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2010-05-17 17:28:34 UTC
In testing patches to support Solaris 9/x86 with Sun as on Solaris 11/x86, I noticed that several testcases with -gdwarf-2 -dA failed, producing invalid
assembler output.  I could trace this down to dwarf2asm.c (dw2_asm_output_nstring)
unconditionally emitting .ascii, which the Solaris 8/x86 as doesn't understand.

This dates back to the initial version of dwarf2asm.c

ASM_OUTPUT_ASCII cannot be used as is since w2_asm_output_nstring adds a comment
after the string without a preceding newline.  My current solution is to add a
variant of ASM_OUTPUT_ASCII, ASM_OUTPUT_ASCII_NONL, with an additional fourth arg
NONL which controls whether or not the newline is printed.

I still have to disentangle the different versions of ASM_OUTPUT_ASCII since
the initial version (which changed config/i386/sysv4.h) ysed .byte directives
to emit the string, which breaks the corresponding testcases, and didn't emit
empty strings at all.
Comment 1 Rainer Orth 2011-07-18 16:15:24 UTC
While this is an issue with very old versions of Solaris 8 (and 9?) as, no fix
is needed with the versions I currently use, so this is probably not worth
bothering with.

  Rainer