On 05/11/10 15:24, Ian Lance Taylor wrote:
tom<tompotts@xxxxxxxxxxxxxxxxxxxxxx> writes:
I have a program that segfaults when built in release mode but not
when -ggdb is used.
I've tried stripping the executable of debug data but I just cant get
it to fail in the same way.
Is there any way of building the whole project for release and
generating a symbol-file I can use with gdb to backtrace the core
dump ?
That is very odd. Adding or removing -ggdb from the command line should
not make any difference to the generated code. I would recommend
running objdump -d on both executables and look for cases where the code
is different. Any such case is a gcc bug.
Ian
I should add the progam I'm trying to run is a large project configured
with ccmake (somthing I'm not very familiar with and adding -ggdb could
have unforseen consequences. It build/runs fine in a pentium4 build but
configuring for athlon-xp is causing the problems...
I ran objump -d on the two executables as suggested but found the object
names were different (longer in the -ggdb version)- is this down to name
mangling? This may explain why the debug version works - or rather fails
to fail?
Tom