From: Tim Canham <Timothy.Canham@jpl.nasa.gov>
To: llewelly@xmission.com
Cc: gcc-help@gcc.gnu.org
Subject: Re: __PRETTY_FUNCTION__ cont
Date: Tue, 13 Apr 2004 21:20:00 -0000 [thread overview]
Message-ID: <407C5980.4090402@jpl.nasa.gov> (raw)
In-Reply-To: <s3r65c3g56u.fsf@xmission.xmission.com>
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 <cassert>
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 <Timothy.Canham@jpl.nasa.gov> 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
prev parent reply other threads:[~2004-04-13 21:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 15:13 Tim Canham
2004-04-13 17:26 ` llewelly
2004-04-13 21:20 ` Tim Canham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=407C5980.4090402@jpl.nasa.gov \
--to=timothy.canham@jpl.nasa.gov \
--cc=gcc-help@gcc.gnu.org \
--cc=llewelly@xmission.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).