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@xxxxxxxxxxxx wrote:
Tim Canham <Timothy.Canham@xxxxxxxxxxxx> 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@xxxxxxxxxxxx MDS Flight Software