This is the mail archive of the gcc-bugs@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]

Re: debug/2714: Stabs truncated on AIX


Now that I'm back from my holiday I can answer in a little more
detail.

>     AIX assembly language does not have a line continuation
>     character.  Neither "?" nor " ?" before a newline or on the
>     next line continues the string.  All variants produce syntax
>     errors from the AIX Assembler.  The continuation character
>     is not documented in the AIX Assembler manual nor mentioned
>     in the AIX Assembler source code.  Is this a GNU Assembler
>     feature?  From where does your recommendation of a "?"
>     continuation character derive?
> 
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2714&database=gcc

I think you are mis-understanding the point. The point is not to get
the assembler to generate a single long string, but rather to have gcc
generate multiple stabs _each_ of which has a string, but which obey
the stab syntax for continued strings. As far as the assembler is
concerned there is no continued string, it just sees a whole bunch of
stab directives, however a debugger understands the internal syntax of
the strings, and therefore realises that the multiple stabs really
represent a single, long, stab string.

gcc already understands how to generate continued stabs, and the patch
I suggested just enables that behaviour, whereas the default AIX
configuration of gcc is to assume that the assembler can handle an
infinitely long string (which, as we have seen it can't).

The recommendation for using a '?' continuation comes from

  http://www.austin.ibm.com/doc_link/en_US/a_doc_lib/files/aixfiles/XCOFF.htm#JTSCi131jbau

which says :-

  Stabstring Grammar

  ... elided ...

  Long stabstrings can be split across multiple symbol table entries
  for easier handling. In the stabstring grammar, a # (pound sign)
  indicates a point at which a stabstring may be continued. A
  continuation is indicated by using either the ? (question mark) or \
  as the last character in the string. The next part of the stabstring
  is in the name of the next symbol table entry. If an alternative for
  a production is empty, the grammar shows the keyword /*EMPTY*/.

Since it also allows \ that may be easier, I recommended ?, since
that is what the IBM compilers use...

Enjoy

-- Jim 

James Cownie	<jcownie@etnus.com>
Etnus, LLC.     +44 117 9071438
http://www.etnus.com


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