gcc believes that it can emit arbitrarily long stab strings on AIX (xcoffout.h contains #define DBX_CONTIN_LENGTH 0). Howeverm the assembler truncates stabs trings after 32767 characters. In C++ code using the STL it is possible to exceed this limit. Release: 2.95.2 Environment: AIX How-To-Repeat: Compile the code -g and then objdump --syms the .o file. Observe that the stabs for _Rb_tree<basic_string<char,string_char_traits<char>, etc... is truncated after 32767 characters.
Fix: Turn on stab continuations in xcoff. You might also need to worry about the fact that IBM use ? as the continuation marker, rather than \ as the last character of a continued stab.
Responsible-Changed-From-To: unassigned->dje Responsible-Changed-Why: AIX
State-Changed-From-To: open->feedback State-Changed-Why: 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?
State-Changed-From-To: feedback->closed State-Changed-Why: No feedback.
From: rodrigc@gcc.gnu.org To: chan1@llnl.gov, dje@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, jcownie@etnus.com Cc: Subject: Re: debug/2714: Stabs truncated on AIX Date: 2 Dec 2001 23:54:25 -0000 Synopsis: Stabs truncated on AIX State-Changed-From-To: feedback->closed State-Changed-By: rodrigc State-Changed-When: Sun Dec 2 15:54:25 2001 State-Changed-Why: No feedback. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2714&database=gcc
From: James Cownie <jcownie@etnus.com> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, jcownie@etnus.com, gcc-bugs@gcc.gnu.org, dje@gcc.gnu.org, chan1@llnl.gov Cc: Subject: Re: debug/2714 Date: Mon, 03 Dec 2001 11:10:11 +0000 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2714&database=gcc I don't know what happened to this mail, but clearly it never got to you, so here it is again... -- Jim To: dje@gcc.gnu.org cc: chan1@llnl.gov, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org Subject: Re: debug/2714: Stabs truncated on AIX In-reply-to: Your message of "10 Aug 2001 22:20:35 -0000." <20010810222035.19493.qmail@sourceware.cygnus.com> Date: Tue, 04 Sep 2001 11:54:23 +0100 From: James Cownie <jcownie@pc2> 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
Author: dje Date: Sat Feb 7 02:34:38 2015 New Revision: 220501 URL: https://gcc.gnu.org/viewcvs?rev=220501&root=gcc&view=rev Log: PR debug/2714 PR bootstrap/64256 * xcoffout.h (DBX_CONTIN_LENGTH): Define as 16384. (DBX_CONTIN_CHAR): Define. Modified: trunk/gcc/ChangeLog trunk/gcc/xcoffout.h