From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3172 invoked by alias); 13 Apr 2004 21:20:03 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3164 invoked from network); 13 Apr 2004 21:20:02 -0000 Received: from unknown (HELO smtp.jpl.nasa.gov) (137.78.160.40) by sources.redhat.com with SMTP; 13 Apr 2004 21:20:02 -0000 Received: from jpl.nasa.gov (berea.jpl.nasa.gov [137.78.218.175]) by smtp.jpl.nasa.gov (8.12.10/8.12.10) with ESMTP id i3DLK052005517; Tue, 13 Apr 2004 14:20:00 -0700 (PDT) Message-ID: <407C5980.4090402@jpl.nasa.gov> Date: Tue, 13 Apr 2004 21:20:00 -0000 From: Tim Canham Organization: Jet Propulsion Laboratory User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 MIME-Version: 1.0 To: llewelly@xmission.com CC: gcc-help@gcc.gnu.org Subject: Re: __PRETTY_FUNCTION__ cont References: <407C037D.9030801@jpl.nasa.gov> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00167.txt.bz2 Solved! Thanks for the pointer llewelly... (I should have tried it) whenever you put an assert in your code, the definition of assert w/out -DNDEBUG has a PRETTY_FUNCTION symbol in it. So, #include int main(int argc, char* argv[]) { assert(0); } generates a PRETTY_FUNCTION symbol, even though it isn't in your code. llewelly@xmission.com wrote: > Tim Canham writes: > > >>I posted a message earlier about the __PRETTY_FUNCTION__ symbols in >>our gcc code. A number of people on the list sent messages, the gist >>of which seemed to be that they only appear if they are referenced in >>the code. I was able to reproduce that on a small scale, but something >>in our large build is producing those symbols without us referencing >>them. We don't have them in our code. > > > If you can reproduce this with preprocessed source, please consider > reporting a bug; see gcc.gnu.org/bugs.html . > > >>Is there anything else that >>would cause them to be generated besides user code referring to them? > > > Maybe a macro from a 3rd party lib uses __PRETTY_FUNCTION__ ? > > Have you tried running the preprocessor on each file, and grepping the > output for __PRETTY_FUNCTION__ ? If you have, and > __PRETTY_FUNCTION__ doesn't occur in the preprocessor output, but > does occur in the binary, I think you should report a bug. > > Maybe you can use some shell hackery to remove these unwanted > symbols, like this: > > nm do | grep -v '__PRETTY_FUNCTION__' | sed -e 's/[0-9a-f]* *[a-zA-Z]/-K/' | xargs strip do > -- Timothy K. Canham Jet Propulsion Laboratory Pasadena, CA Timothy.Canham@jpl.nasa.gov MDS Flight Software